Lines Matching refs:tx_sc
292 const struct macsec_tx_sc *tx_sc = &secy->tx_sc;
302 if (tx_sc->end_station)
304 if (tx_sc->scb)
311 if (tx_sc->encrypt)
316 h->tci_an |= tx_sc->encoding_sa;
500 static void macsec_count_tx(struct sk_buff *skb, struct macsec_tx_sc *tx_sc,
504 struct pcpu_tx_sc_stats *txsc_stats = this_cpu_ptr(tx_sc->stats);
507 if (tx_sc->encrypt) {
536 macsec_count_tx(skb, &macsec->secy.tx_sc, macsec_skb_cb(skb)->tx_sa);
590 struct macsec_tx_sc *tx_sc;
597 tx_sc = &secy->tx_sc;
600 tx_sa = macsec_txsa_get(tx_sc->sa[tx_sc->encoding_sa]);
686 if (tx_sc->encrypt) {
1534 struct macsec_tx_sc *tx_sc;
1550 tx_sc = &secy->tx_sc;
1552 tx_sa = rtnl_dereference(tx_sc->sa[*assoc_num]);
1557 *scp = tx_sc;
1969 struct macsec_tx_sc *tx_sc;
1994 tx_sc = &secy->tx_sc;
2028 tx_sa = rtnl_dereference(tx_sc->sa[assoc_num]);
2056 if (assoc_num == tx_sc->encoding_sa && tx_sa->active)
2089 rcu_assign_pointer(tx_sc->sa[assoc_num], tx_sa);
2236 struct macsec_tx_sc *tx_sc;
2250 &dev, &secy, &tx_sc, &assoc_num);
2281 RCU_INIT_POINTER(tx_sc->sa[assoc_num], NULL);
2321 struct macsec_tx_sc *tx_sc;
2342 &dev, &secy, &tx_sc, &assoc_num);
2370 if (assoc_num == tx_sc->encoding_sa)
2573 struct macsec_tx_sc *tx_sc = &secy->tx_sc;
2580 if (tx_sc->sa[i])
2877 stats = per_cpu_ptr(macsec_priv(dev)->secy.tx_sc.stats, cpu);
2983 struct macsec_tx_sc *tx_sc = &secy->tx_sc;
3011 nla_put_u8(skb, MACSEC_SECY_ATTR_ENCRYPT, tx_sc->encrypt) ||
3012 nla_put_u8(skb, MACSEC_SECY_ATTR_INC_SCI, tx_sc->send_sci) ||
3013 nla_put_u8(skb, MACSEC_SECY_ATTR_ES, tx_sc->end_station) ||
3014 nla_put_u8(skb, MACSEC_SECY_ATTR_SCB, tx_sc->scb) ||
3015 nla_put_u8(skb, MACSEC_SECY_ATTR_ENCODING_SA, tx_sc->encoding_sa))
3041 struct macsec_tx_sc *tx_sc = &secy->tx_sc;
3093 struct macsec_tx_sa *tx_sa = rtnl_dereference(tx_sc->sa[i]);
3391 struct metadata_dst *md_dst = secy->tx_sc.md_dst;
3427 macsec_count_tx(skb, &macsec->secy.tx_sc, macsec_skb_cb(skb)->tx_sa);
3710 if (macsec->secy.tx_sc.md_dst)
3711 metadata_dst_free(macsec->secy.tx_sc.md_dst);
3713 free_percpu(macsec->secy.tx_sc.stats);
3737 struct macsec_tx_sc *tx_sc;
3740 tx_sc = &secy->tx_sc;
3745 tx_sc->encoding_sa = nla_get_u8(data[IFLA_MACSEC_ENCODING_SA]);
3746 tx_sa = rtnl_dereference(tx_sc->sa[tx_sc->encoding_sa]);
3752 tx_sc->encrypt = !!nla_get_u8(data[IFLA_MACSEC_ENCRYPT]);
3758 tx_sc->send_sci = !!nla_get_u8(data[IFLA_MACSEC_INC_SCI]);
3761 tx_sc->end_station = !!nla_get_u8(data[IFLA_MACSEC_ES]);
3764 tx_sc->scb = !!nla_get_u8(data[IFLA_MACSEC_SCB]);
3816 struct macsec_tx_sc tx_sc;
3829 /* Keep a copy of unmodified secy and tx_sc, in case the offload
3833 memcpy(&tx_sc, &macsec->secy.tx_sc, sizeof(tx_sc));
3869 memcpy(&macsec->secy.tx_sc, &tx_sc, sizeof(tx_sc));
3887 struct macsec_tx_sa *sa = rtnl_dereference(macsec->secy.tx_sc.sa[i]);
3890 RCU_INIT_POINTER(macsec->secy.tx_sc.sa[i], NULL);
3989 secy->tx_sc.stats = netdev_alloc_pcpu_stats(struct pcpu_tx_sc_stats);
3990 if (!secy->tx_sc.stats)
3993 secy->tx_sc.md_dst = metadata_dst_alloc(0, METADATA_MACSEC, GFP_KERNEL);
3994 if (!secy->tx_sc.md_dst)
4013 secy->tx_sc.md_dst->u.macsec_info.sci = sci;
4014 secy->tx_sc.active = true;
4015 secy->tx_sc.encoding_sa = DEFAULT_ENCODING_SA;
4016 secy->tx_sc.encrypt = DEFAULT_ENCRYPT;
4017 secy->tx_sc.send_sci = DEFAULT_SEND_SCI;
4018 secy->tx_sc.end_station = false;
4019 secy->tx_sc.scb = false;
4266 struct macsec_tx_sc *tx_sc;
4273 tx_sc = &secy->tx_sc;
4291 nla_put_u8(skb, IFLA_MACSEC_ENCODING_SA, tx_sc->encoding_sa) ||
4292 nla_put_u8(skb, IFLA_MACSEC_ENCRYPT, tx_sc->encrypt) ||
4294 nla_put_u8(skb, IFLA_MACSEC_INC_SCI, tx_sc->send_sci) ||
4295 nla_put_u8(skb, IFLA_MACSEC_ES, tx_sc->end_station) ||
4296 nla_put_u8(skb, IFLA_MACSEC_SCB, tx_sc->scb) ||