Lines Matching refs:icv_len
317 else if (secy->icv_len != DEFAULT_ICV_LEN) in macsec_fill_sectag()
389 static bool macsec_validate_skb(struct sk_buff *skb, u16 icv_len, bool xpn) in macsec_validate_skb() argument
393 int extra_len = macsec_extra_len(!!(h->tci_an & MACSEC_TCI_SC)) + icv_len; in macsec_validate_skb()
648 skb_put(skb, secy->icv_len); in macsec_encrypt()
692 secy->icv_len; in macsec_encrypt()
697 aead_request_set_ad(req, skb->len - secy->icv_len); in macsec_encrypt()
813 static void macsec_finalize_skb(struct sk_buff *skb, u8 icv_len, u8 hdr_len) in macsec_finalize_skb() argument
818 pskb_trim_unique(skb, skb->len - icv_len); in macsec_finalize_skb()
854 macsec_finalize_skb(skb, macsec->secy.icv_len, in macsec_decrypt_done()
883 u16 icv_len = secy->icv_len; in macsec_decrypt() local
941 aead_request_set_crypt(req, sg, sg, icv_len, iv); in macsec_decrypt()
942 aead_request_set_ad(req, skb->len - icv_len); in macsec_decrypt()
1154 if (!macsec_validate_skb(skb, secy->icv_len, secy->xpn)) { in macsec_handle_frame()
1228 macsec_finalize_skb(skb, secy->icv_len, in macsec_handle_frame()
1306 static struct crypto_aead *macsec_alloc_tfm(char *key, int key_len, int icv_len) in macsec_alloc_tfm() argument
1321 ret = crypto_aead_setauthsize(tfm, icv_len); in macsec_alloc_tfm()
1332 int icv_len) in init_rx_sa() argument
1338 rx_sa->key.tfm = macsec_alloc_tfm(sak, key_len, icv_len); in init_rx_sa()
1431 int icv_len) in init_tx_sa() argument
1437 tx_sa->key.tfm = macsec_alloc_tfm(sak, key_len, icv_len); in init_tx_sa()
1789 secy->key_len, secy->icv_len); in macsec_add_rxsa()
2031 secy->key_len, secy->icv_len); in macsec_add_txsa()
2996 nla_put_u8(skb, MACSEC_SECY_ATTR_ICV_LEN, secy->icv_len) || in nla_put_secy()
3638 unsigned int extra = macsec->secy.icv_len + macsec_extra_len(true); in macsec_change_mtu()
3947 static int macsec_add_dev(struct net_device *dev, sci_t sci, u8 icv_len) in macsec_add_dev() argument
3968 secy->icv_len = icv_len; in macsec_add_dev()
3993 u8 icv_len = DEFAULT_ICV_LEN; in macsec_newlink() local
4022 icv_len = nla_get_u8(data[IFLA_MACSEC_ICV_LEN]); in macsec_newlink()
4023 mtu = real_dev->mtu - icv_len - macsec_extra_len(true); in macsec_newlink()
4060 err = macsec_add_dev(dev, sci, icv_len); in macsec_newlink()
4108 u8 icv_len = DEFAULT_ICV_LEN; in macsec_validate_attr() local
4119 icv_len = nla_get_u8(data[IFLA_MACSEC_ICV_LEN]); in macsec_validate_attr()
4120 if (icv_len != DEFAULT_ICV_LEN) { in macsec_validate_attr()
4126 icv_len); in macsec_validate_attr()
4139 if (icv_len < MACSEC_MIN_ICV_LEN || in macsec_validate_attr()
4140 icv_len > MACSEC_STD_ICV_LEN) in macsec_validate_attr()
4222 nla_put_u8(skb, IFLA_MACSEC_ICV_LEN, secy->icv_len) || in macsec_fill_info()
4313 unsigned int mtu = real_dev->mtu - (m->secy.icv_len + in macsec_notify()