Lines Matching refs:tx_sc
246 const struct macsec_tx_sc *tx_sc = &secy->tx_sc; in send_sci() local
248 return tx_sc->send_sci || in send_sci()
249 (secy->n_rx_sc > 1 && !tx_sc->end_station && !tx_sc->scb); in send_sci()
295 const struct macsec_tx_sc *tx_sc = &secy->tx_sc; in macsec_fill_sectag() local
305 if (tx_sc->end_station) in macsec_fill_sectag()
307 if (tx_sc->scb) in macsec_fill_sectag()
314 if (tx_sc->encrypt) in macsec_fill_sectag()
319 h->tci_an |= tx_sc->encoding_sa; in macsec_fill_sectag()
499 static void macsec_count_tx(struct sk_buff *skb, struct macsec_tx_sc *tx_sc, in macsec_count_tx() argument
502 struct pcpu_tx_sc_stats *txsc_stats = this_cpu_ptr(tx_sc->stats); in macsec_count_tx()
505 if (tx_sc->encrypt) { in macsec_count_tx()
541 macsec_count_tx(skb, &macsec->secy.tx_sc, macsec_skb_cb(skb)->tx_sa); in macsec_encrypt_done()
593 struct macsec_tx_sc *tx_sc; in macsec_encrypt() local
600 tx_sc = &secy->tx_sc; in macsec_encrypt()
603 tx_sa = macsec_txsa_get(tx_sc->sa[tx_sc->encoding_sa]); in macsec_encrypt()
689 if (tx_sc->encrypt) { in macsec_encrypt()
1511 struct macsec_tx_sc *tx_sc; in get_txsa_from_nl() local
1527 tx_sc = &secy->tx_sc; in get_txsa_from_nl()
1529 tx_sa = rtnl_dereference(tx_sc->sa[*assoc_num]); in get_txsa_from_nl()
1534 *scp = tx_sc; in get_txsa_from_nl()
1958 struct macsec_tx_sc *tx_sc; in macsec_add_txsa() local
1983 tx_sc = &secy->tx_sc; in macsec_add_txsa()
2017 tx_sa = rtnl_dereference(tx_sc->sa[assoc_num]); in macsec_add_txsa()
2045 if (assoc_num == tx_sc->encoding_sa && tx_sa->active) in macsec_add_txsa()
2077 rcu_assign_pointer(tx_sc->sa[assoc_num], tx_sa); in macsec_add_txsa()
2224 struct macsec_tx_sc *tx_sc; in macsec_del_txsa() local
2238 &dev, &secy, &tx_sc, &assoc_num); in macsec_del_txsa()
2269 RCU_INIT_POINTER(tx_sc->sa[assoc_num], NULL); in macsec_del_txsa()
2309 struct macsec_tx_sc *tx_sc; in macsec_upd_txsa() local
2330 &dev, &secy, &tx_sc, &assoc_num); in macsec_upd_txsa()
2358 if (assoc_num == tx_sc->encoding_sa) in macsec_upd_txsa()
2559 struct macsec_tx_sc *tx_sc = &secy->tx_sc; in macsec_is_configured() local
2566 if (tx_sc->sa[i]) in macsec_is_configured()
2866 stats = per_cpu_ptr(macsec_priv(dev)->secy.tx_sc.stats, cpu); in get_tx_sc_stats()
2972 struct macsec_tx_sc *tx_sc = &secy->tx_sc; in nla_put_secy() local
3000 nla_put_u8(skb, MACSEC_SECY_ATTR_ENCRYPT, tx_sc->encrypt) || in nla_put_secy()
3001 nla_put_u8(skb, MACSEC_SECY_ATTR_INC_SCI, tx_sc->send_sci) || in nla_put_secy()
3002 nla_put_u8(skb, MACSEC_SECY_ATTR_ES, tx_sc->end_station) || in nla_put_secy()
3003 nla_put_u8(skb, MACSEC_SECY_ATTR_SCB, tx_sc->scb) || in nla_put_secy()
3004 nla_put_u8(skb, MACSEC_SECY_ATTR_ENCODING_SA, tx_sc->encoding_sa)) in nla_put_secy()
3030 struct macsec_tx_sc *tx_sc = &secy->tx_sc; in dump_secy() local
3082 struct macsec_tx_sa *tx_sa = rtnl_dereference(tx_sc->sa[i]); in dump_secy()
3409 macsec_count_tx(skb, &macsec->secy.tx_sc, macsec_skb_cb(skb)->tx_sa); in macsec_start_xmit()
3704 free_percpu(macsec->secy.tx_sc.stats); in macsec_free_netdev()
3726 struct macsec_tx_sc *tx_sc; in macsec_changelink_common() local
3729 tx_sc = &secy->tx_sc; in macsec_changelink_common()
3734 tx_sc->encoding_sa = nla_get_u8(data[IFLA_MACSEC_ENCODING_SA]); in macsec_changelink_common()
3735 tx_sa = rtnl_dereference(tx_sc->sa[tx_sc->encoding_sa]); in macsec_changelink_common()
3744 tx_sc->encrypt = !!nla_get_u8(data[IFLA_MACSEC_ENCRYPT]); in macsec_changelink_common()
3750 tx_sc->send_sci = !!nla_get_u8(data[IFLA_MACSEC_INC_SCI]); in macsec_changelink_common()
3753 tx_sc->end_station = !!nla_get_u8(data[IFLA_MACSEC_ES]); in macsec_changelink_common()
3756 tx_sc->scb = !!nla_get_u8(data[IFLA_MACSEC_SCB]); in macsec_changelink_common()
3796 struct macsec_tx_sc tx_sc; in macsec_changelink() local
3813 memcpy(&tx_sc, &macsec->secy.tx_sc, sizeof(tx_sc)); in macsec_changelink()
3840 memcpy(&macsec->secy.tx_sc, &tx_sc, sizeof(tx_sc)); in macsec_changelink()
3858 struct macsec_tx_sa *sa = rtnl_dereference(macsec->secy.tx_sc.sa[i]); in macsec_del_dev()
3861 RCU_INIT_POINTER(macsec->secy.tx_sc.sa[i], NULL); in macsec_del_dev()
3955 secy->tx_sc.stats = netdev_alloc_pcpu_stats(struct pcpu_tx_sc_stats); in macsec_add_dev()
3956 if (!secy->tx_sc.stats) { in macsec_add_dev()
3974 secy->tx_sc.active = true; in macsec_add_dev()
3975 secy->tx_sc.encoding_sa = DEFAULT_ENCODING_SA; in macsec_add_dev()
3976 secy->tx_sc.encrypt = DEFAULT_ENCRYPT; in macsec_add_dev()
3977 secy->tx_sc.send_sci = DEFAULT_SEND_SCI; in macsec_add_dev()
3978 secy->tx_sc.end_station = false; in macsec_add_dev()
3979 secy->tx_sc.scb = false; in macsec_add_dev()
4205 struct macsec_tx_sc *tx_sc = &secy->tx_sc; in macsec_fill_info() local
4224 nla_put_u8(skb, IFLA_MACSEC_ENCODING_SA, tx_sc->encoding_sa) || in macsec_fill_info()
4225 nla_put_u8(skb, IFLA_MACSEC_ENCRYPT, tx_sc->encrypt) || in macsec_fill_info()
4227 nla_put_u8(skb, IFLA_MACSEC_INC_SCI, tx_sc->send_sci) || in macsec_fill_info()
4228 nla_put_u8(skb, IFLA_MACSEC_ES, tx_sc->end_station) || in macsec_fill_info()
4229 nla_put_u8(skb, IFLA_MACSEC_SCB, tx_sc->scb) || in macsec_fill_info()