Lines Matching refs:tx_sc
292 const struct macsec_tx_sc *tx_sc = &secy->tx_sc; in macsec_fill_sectag() local
302 if (tx_sc->end_station) in macsec_fill_sectag()
304 if (tx_sc->scb) in macsec_fill_sectag()
311 if (tx_sc->encrypt) in macsec_fill_sectag()
316 h->tci_an |= tx_sc->encoding_sa; in macsec_fill_sectag()
500 static void macsec_count_tx(struct sk_buff *skb, struct macsec_tx_sc *tx_sc, in macsec_count_tx() argument
504 struct pcpu_tx_sc_stats *txsc_stats = this_cpu_ptr(tx_sc->stats); in macsec_count_tx()
507 if (tx_sc->encrypt) { in macsec_count_tx()
542 macsec_count_tx(skb, &macsec->secy.tx_sc, macsec_skb_cb(skb)->tx_sa); in macsec_encrypt_done()
596 struct macsec_tx_sc *tx_sc; in macsec_encrypt() local
603 tx_sc = &secy->tx_sc; in macsec_encrypt()
606 tx_sa = macsec_txsa_get(tx_sc->sa[tx_sc->encoding_sa]); in macsec_encrypt()
692 if (tx_sc->encrypt) { in macsec_encrypt()
1536 struct macsec_tx_sc *tx_sc; in get_txsa_from_nl() local
1552 tx_sc = &secy->tx_sc; in get_txsa_from_nl()
1554 tx_sa = rtnl_dereference(tx_sc->sa[*assoc_num]); in get_txsa_from_nl()
1559 *scp = tx_sc; in get_txsa_from_nl()
1971 struct macsec_tx_sc *tx_sc; in macsec_add_txsa() local
1996 tx_sc = &secy->tx_sc; in macsec_add_txsa()
2030 tx_sa = rtnl_dereference(tx_sc->sa[assoc_num]); in macsec_add_txsa()
2058 if (assoc_num == tx_sc->encoding_sa && tx_sa->active) in macsec_add_txsa()
2091 rcu_assign_pointer(tx_sc->sa[assoc_num], tx_sa); in macsec_add_txsa()
2238 struct macsec_tx_sc *tx_sc; in macsec_del_txsa() local
2252 &dev, &secy, &tx_sc, &assoc_num); in macsec_del_txsa()
2283 RCU_INIT_POINTER(tx_sc->sa[assoc_num], NULL); in macsec_del_txsa()
2323 struct macsec_tx_sc *tx_sc; in macsec_upd_txsa() local
2344 &dev, &secy, &tx_sc, &assoc_num); in macsec_upd_txsa()
2372 if (assoc_num == tx_sc->encoding_sa) in macsec_upd_txsa()
2573 struct macsec_tx_sc *tx_sc = &secy->tx_sc; in macsec_is_configured() local
2580 if (tx_sc->sa[i]) in macsec_is_configured()
2875 stats = per_cpu_ptr(macsec_priv(dev)->secy.tx_sc.stats, cpu); in get_tx_sc_stats()
2981 struct macsec_tx_sc *tx_sc = &secy->tx_sc; in nla_put_secy() local
3009 nla_put_u8(skb, MACSEC_SECY_ATTR_ENCRYPT, tx_sc->encrypt) || in nla_put_secy()
3010 nla_put_u8(skb, MACSEC_SECY_ATTR_INC_SCI, tx_sc->send_sci) || in nla_put_secy()
3011 nla_put_u8(skb, MACSEC_SECY_ATTR_ES, tx_sc->end_station) || in nla_put_secy()
3012 nla_put_u8(skb, MACSEC_SECY_ATTR_SCB, tx_sc->scb) || in nla_put_secy()
3013 nla_put_u8(skb, MACSEC_SECY_ATTR_ENCODING_SA, tx_sc->encoding_sa)) in nla_put_secy()
3039 struct macsec_tx_sc *tx_sc = &secy->tx_sc; in dump_secy() local
3091 struct macsec_tx_sa *tx_sa = rtnl_dereference(tx_sc->sa[i]); in dump_secy()
3389 struct metadata_dst *md_dst = secy->tx_sc.md_dst; in macsec_start_xmit()
3425 macsec_count_tx(skb, &macsec->secy.tx_sc, macsec_skb_cb(skb)->tx_sa); in macsec_start_xmit()
3708 if (macsec->secy.tx_sc.md_dst) in macsec_free_netdev()
3709 metadata_dst_free(macsec->secy.tx_sc.md_dst); in macsec_free_netdev()
3711 free_percpu(macsec->secy.tx_sc.stats); in macsec_free_netdev()
3735 struct macsec_tx_sc *tx_sc; in macsec_changelink_common() local
3738 tx_sc = &secy->tx_sc; in macsec_changelink_common()
3743 tx_sc->encoding_sa = nla_get_u8(data[IFLA_MACSEC_ENCODING_SA]); in macsec_changelink_common()
3744 tx_sa = rtnl_dereference(tx_sc->sa[tx_sc->encoding_sa]); in macsec_changelink_common()
3750 tx_sc->encrypt = !!nla_get_u8(data[IFLA_MACSEC_ENCRYPT]); in macsec_changelink_common()
3756 tx_sc->send_sci = !!nla_get_u8(data[IFLA_MACSEC_INC_SCI]); in macsec_changelink_common()
3759 tx_sc->end_station = !!nla_get_u8(data[IFLA_MACSEC_ES]); in macsec_changelink_common()
3762 tx_sc->scb = !!nla_get_u8(data[IFLA_MACSEC_SCB]); in macsec_changelink_common()
3812 struct macsec_tx_sc tx_sc; in macsec_changelink() local
3829 memcpy(&tx_sc, &macsec->secy.tx_sc, sizeof(tx_sc)); in macsec_changelink()
3855 memcpy(&macsec->secy.tx_sc, &tx_sc, sizeof(tx_sc)); in macsec_changelink()
3873 struct macsec_tx_sa *sa = rtnl_dereference(macsec->secy.tx_sc.sa[i]); in macsec_del_dev()
3876 RCU_INIT_POINTER(macsec->secy.tx_sc.sa[i], NULL); in macsec_del_dev()
3975 secy->tx_sc.stats = netdev_alloc_pcpu_stats(struct pcpu_tx_sc_stats); in macsec_add_dev()
3976 if (!secy->tx_sc.stats) { in macsec_add_dev()
3981 secy->tx_sc.md_dst = metadata_dst_alloc(0, METADATA_MACSEC, GFP_KERNEL); in macsec_add_dev()
3982 if (!secy->tx_sc.md_dst) { in macsec_add_dev()
3983 free_percpu(secy->tx_sc.stats); in macsec_add_dev()
4001 secy->tx_sc.md_dst->u.macsec_info.sci = sci; in macsec_add_dev()
4002 secy->tx_sc.active = true; in macsec_add_dev()
4003 secy->tx_sc.encoding_sa = DEFAULT_ENCODING_SA; in macsec_add_dev()
4004 secy->tx_sc.encrypt = DEFAULT_ENCRYPT; in macsec_add_dev()
4005 secy->tx_sc.send_sci = DEFAULT_SEND_SCI; in macsec_add_dev()
4006 secy->tx_sc.end_station = false; in macsec_add_dev()
4007 secy->tx_sc.scb = false; in macsec_add_dev()
4242 struct macsec_tx_sc *tx_sc = &secy->tx_sc; in macsec_fill_info() local
4261 nla_put_u8(skb, IFLA_MACSEC_ENCODING_SA, tx_sc->encoding_sa) || in macsec_fill_info()
4262 nla_put_u8(skb, IFLA_MACSEC_ENCRYPT, tx_sc->encrypt) || in macsec_fill_info()
4264 nla_put_u8(skb, IFLA_MACSEC_INC_SCI, tx_sc->send_sci) || in macsec_fill_info()
4265 nla_put_u8(skb, IFLA_MACSEC_ES, tx_sc->end_station) || in macsec_fill_info()
4266 nla_put_u8(skb, IFLA_MACSEC_SCB, tx_sc->scb) || in macsec_fill_info()