Lines Matching refs:tx_sc

260 	const struct macsec_tx_sc *tx_sc = &secy->tx_sc;
262 return tx_sc->send_sci ||
263 (secy->n_rx_sc > 1 && !tx_sc->end_station && !tx_sc->scb);
309 const struct macsec_tx_sc *tx_sc = &secy->tx_sc;
319 if (tx_sc->end_station)
321 if (tx_sc->scb)
328 if (tx_sc->encrypt)
333 h->tci_an |= tx_sc->encoding_sa;
522 static void macsec_count_tx(struct sk_buff *skb, struct macsec_tx_sc *tx_sc,
526 struct pcpu_tx_sc_stats *txsc_stats = this_cpu_ptr(tx_sc->stats);
529 if (tx_sc->encrypt) {
564 macsec_count_tx(skb, &macsec->secy.tx_sc, macsec_skb_cb(skb)->tx_sa);
618 struct macsec_tx_sc *tx_sc;
625 tx_sc = &secy->tx_sc;
628 tx_sa = macsec_txsa_get(tx_sc->sa[tx_sc->encoding_sa]);
714 if (tx_sc->encrypt) {
1551 struct macsec_tx_sc *tx_sc;
1567 tx_sc = &secy->tx_sc;
1569 tx_sa = rtnl_dereference(tx_sc->sa[*assoc_num]);
1574 *scp = tx_sc;
2000 struct macsec_tx_sc *tx_sc;
2025 tx_sc = &secy->tx_sc;
2059 tx_sa = rtnl_dereference(tx_sc->sa[assoc_num]);
2087 if (assoc_num == tx_sc->encoding_sa && tx_sa->active)
2120 rcu_assign_pointer(tx_sc->sa[assoc_num], tx_sa);
2267 struct macsec_tx_sc *tx_sc;
2281 &dev, &secy, &tx_sc, &assoc_num);
2312 RCU_INIT_POINTER(tx_sc->sa[assoc_num], NULL);
2352 struct macsec_tx_sc *tx_sc;
2373 &dev, &secy, &tx_sc, &assoc_num);
2401 if (assoc_num == tx_sc->encoding_sa)
2604 struct macsec_tx_sc *tx_sc = &secy->tx_sc;
2611 if (tx_sc->sa[i])
2914 stats = per_cpu_ptr(macsec_priv(dev)->secy.tx_sc.stats, cpu);
3020 struct macsec_tx_sc *tx_sc = &secy->tx_sc;
3048 nla_put_u8(skb, MACSEC_SECY_ATTR_ENCRYPT, tx_sc->encrypt) ||
3049 nla_put_u8(skb, MACSEC_SECY_ATTR_INC_SCI, tx_sc->send_sci) ||
3050 nla_put_u8(skb, MACSEC_SECY_ATTR_ES, tx_sc->end_station) ||
3051 nla_put_u8(skb, MACSEC_SECY_ATTR_SCB, tx_sc->scb) ||
3052 nla_put_u8(skb, MACSEC_SECY_ATTR_ENCODING_SA, tx_sc->encoding_sa))
3078 struct macsec_tx_sc *tx_sc = &secy->tx_sc;
3130 struct macsec_tx_sa *tx_sa = rtnl_dereference(tx_sc->sa[i]);
3458 macsec_count_tx(skb, &macsec->secy.tx_sc, macsec_skb_cb(skb)->tx_sa);
3740 free_percpu(macsec->secy.tx_sc.stats);
3762 struct macsec_tx_sc *tx_sc;
3765 tx_sc = &secy->tx_sc;
3770 tx_sc->encoding_sa = nla_get_u8(data[IFLA_MACSEC_ENCODING_SA]);
3771 tx_sa = rtnl_dereference(tx_sc->sa[tx_sc->encoding_sa]);
3777 tx_sc->encrypt = !!nla_get_u8(data[IFLA_MACSEC_ENCRYPT]);
3783 tx_sc->send_sci = !!nla_get_u8(data[IFLA_MACSEC_INC_SCI]);
3786 tx_sc->end_station = !!nla_get_u8(data[IFLA_MACSEC_ES]);
3789 tx_sc->scb = !!nla_get_u8(data[IFLA_MACSEC_SCB]);
3839 struct macsec_tx_sc tx_sc;
3852 /* Keep a copy of unmodified secy and tx_sc, in case the offload
3856 memcpy(&tx_sc, &macsec->secy.tx_sc, sizeof(tx_sc));
3882 memcpy(&macsec->secy.tx_sc, &tx_sc, sizeof(tx_sc));
3900 struct macsec_tx_sa *sa = rtnl_dereference(macsec->secy.tx_sc.sa[i]);
3903 RCU_INIT_POINTER(macsec->secy.tx_sc.sa[i], NULL);
3997 secy->tx_sc.stats = netdev_alloc_pcpu_stats(struct pcpu_tx_sc_stats);
3998 if (!secy->tx_sc.stats) {
4016 secy->tx_sc.active = true;
4017 secy->tx_sc.encoding_sa = DEFAULT_ENCODING_SA;
4018 secy->tx_sc.encrypt = DEFAULT_ENCRYPT;
4019 secy->tx_sc.send_sci = DEFAULT_SEND_SCI;
4020 secy->tx_sc.end_station = false;
4021 secy->tx_sc.scb = false;
4256 struct macsec_tx_sc *tx_sc = &secy->tx_sc;
4275 nla_put_u8(skb, IFLA_MACSEC_ENCODING_SA, tx_sc->encoding_sa) ||
4276 nla_put_u8(skb, IFLA_MACSEC_ENCRYPT, tx_sc->encrypt) ||
4278 nla_put_u8(skb, IFLA_MACSEC_INC_SCI, tx_sc->send_sci) ||
4279 nla_put_u8(skb, IFLA_MACSEC_ES, tx_sc->end_station) ||
4280 nla_put_u8(skb, IFLA_MACSEC_SCB, tx_sc->scb) ||