Lines Matching refs:sa_num
628 u8 sa_num, bool sa_active) in cn10k_mcs_link_tx_sa2sc() argument
635 if (txsc->encoding_sa != sa_num) in cn10k_mcs_link_tx_sa2sc()
647 map_req->sa_index0 = txsc->hw_sa_id[sa_num]; in cn10k_mcs_link_tx_sa2sc()
964 u8 sa_num = 0; in cn10k_mcs_delete_txsc() local
969 txsc, sa_num); in cn10k_mcs_delete_txsc()
970 cn10k_mcs_free_txsa(pfvf, txsc->hw_sa_id[sa_num]); in cn10k_mcs_delete_txsc()
972 sa_num++; in cn10k_mcs_delete_txsc()
1020 u8 sa_num = 0; in cn10k_mcs_delete_rxsc() local
1025 sa_num, false); in cn10k_mcs_delete_rxsc()
1026 cn10k_mcs_free_rxsa(pfvf, rxsc->hw_sa_id[sa_num]); in cn10k_mcs_delete_rxsc()
1028 sa_num++; in cn10k_mcs_delete_rxsc()
1040 struct macsec_tx_sa *sw_tx_sa, u8 sa_num) in cn10k_mcs_secy_tx_cfg() argument
1043 cn10k_mcs_write_tx_sa_plcy(pfvf, secy, txsc, sa_num); in cn10k_mcs_secy_tx_cfg()
1044 cn10k_write_tx_sa_pn(pfvf, txsc, sa_num, sw_tx_sa->next_pn); in cn10k_mcs_secy_tx_cfg()
1045 cn10k_mcs_link_tx_sa2sc(pfvf, secy, txsc, sa_num, in cn10k_mcs_secy_tx_cfg()
1064 u8 sa_num; in cn10k_mcs_secy_rx_cfg() local
1072 for (sa_num = 0; sa_num < CN10K_MCS_SA_PER_SC; sa_num++) { in cn10k_mcs_secy_rx_cfg()
1073 sw_rx_sa = rcu_dereference_bh(sw_rx_sc->sa[sa_num]); in cn10k_mcs_secy_rx_cfg()
1078 sa_num, sw_rx_sa->active); in cn10k_mcs_secy_rx_cfg()
1079 cn10k_mcs_write_rx_sa_pn(pfvf, mcs_rx_sc, sa_num, in cn10k_mcs_secy_rx_cfg()
1179 u8 sa_num; in cn10k_mdo_open() local
1186 sa_num = txsc->encoding_sa; in cn10k_mdo_open()
1187 sw_tx_sa = rcu_dereference_bh(secy->tx_sc.sa[sa_num]); in cn10k_mdo_open()
1189 err = cn10k_mcs_secy_tx_cfg(pfvf, secy, txsc, sw_tx_sa, sa_num); in cn10k_mdo_open()
1250 u8 sa_num; in cn10k_mdo_upd_secy() local
1260 sa_num = txsc->encoding_sa; in cn10k_mdo_upd_secy()
1261 sw_tx_sa = rcu_dereference_bh(secy->tx_sc.sa[sa_num]); in cn10k_mdo_upd_secy()
1263 cn10k_mcs_link_tx_sa2sc(pfvf, secy, txsc, sa_num, active); in cn10k_mdo_upd_secy()
1302 u8 sa_num = ctx->sa.assoc_num; in cn10k_mdo_add_txsa() local
1310 if (sa_num >= CN10K_MCS_SA_PER_SC) in cn10k_mdo_add_txsa()
1313 if (cn10k_mcs_alloc_txsa(pfvf, &txsc->hw_sa_id[sa_num])) in cn10k_mdo_add_txsa()
1316 memcpy(&txsc->sa_key[sa_num], ctx->sa.key, secy->key_len); in cn10k_mdo_add_txsa()
1317 memcpy(&txsc->salt[sa_num], sw_tx_sa->key.salt.bytes, MACSEC_SALT_LEN); in cn10k_mdo_add_txsa()
1318 txsc->ssci[sa_num] = sw_tx_sa->ssci; in cn10k_mdo_add_txsa()
1320 txsc->sa_bmap |= 1 << sa_num; in cn10k_mdo_add_txsa()
1323 err = cn10k_mcs_write_tx_sa_plcy(pfvf, secy, txsc, sa_num); in cn10k_mdo_add_txsa()
1327 err = cn10k_write_tx_sa_pn(pfvf, txsc, sa_num, in cn10k_mdo_add_txsa()
1333 sa_num, sw_tx_sa->active); in cn10k_mdo_add_txsa()
1347 u8 sa_num = ctx->sa.assoc_num; in cn10k_mdo_upd_txsa() local
1355 if (sa_num >= CN10K_MCS_SA_PER_SC) in cn10k_mdo_upd_txsa()
1361 err = cn10k_write_tx_sa_pn(pfvf, txsc, sa_num, in cn10k_mdo_upd_txsa()
1368 sa_num, sw_tx_sa->active); in cn10k_mdo_upd_txsa()
1380 u8 sa_num = ctx->sa.assoc_num; in cn10k_mdo_del_txsa() local
1387 if (sa_num >= CN10K_MCS_SA_PER_SC) in cn10k_mdo_del_txsa()
1390 cn10k_mcs_free_txsa(pfvf, txsc->hw_sa_id[sa_num]); in cn10k_mdo_del_txsa()
1391 txsc->sa_bmap &= ~(1 << sa_num); in cn10k_mdo_del_txsa()
1475 u8 sa_num = ctx->sa.assoc_num; in cn10k_mdo_add_rxsa() local
1483 if (sa_num >= CN10K_MCS_SA_PER_SC) in cn10k_mdo_add_rxsa()
1486 if (cn10k_mcs_alloc_rxsa(pfvf, &rxsc->hw_sa_id[sa_num])) in cn10k_mdo_add_rxsa()
1489 memcpy(&rxsc->sa_key[sa_num], ctx->sa.key, ctx->secy->key_len); in cn10k_mdo_add_rxsa()
1490 memcpy(&rxsc->salt[sa_num], rx_sa->key.salt.bytes, MACSEC_SALT_LEN); in cn10k_mdo_add_rxsa()
1491 rxsc->ssci[sa_num] = rx_sa->ssci; in cn10k_mdo_add_rxsa()
1493 rxsc->sa_bmap |= 1 << sa_num; in cn10k_mdo_add_rxsa()
1497 sa_num, sa_in_use); in cn10k_mdo_add_rxsa()
1501 err = cn10k_mcs_write_rx_sa_pn(pfvf, rxsc, sa_num, in cn10k_mdo_add_rxsa()
1518 u8 sa_num = ctx->sa.assoc_num; in cn10k_mdo_upd_rxsa() local
1526 if (sa_num >= CN10K_MCS_SA_PER_SC) in cn10k_mdo_upd_rxsa()
1530 err = cn10k_mcs_write_rx_sa_plcy(pfvf, secy, rxsc, sa_num, sa_in_use); in cn10k_mdo_upd_rxsa()
1537 err = cn10k_mcs_write_rx_sa_pn(pfvf, rxsc, sa_num, in cn10k_mdo_upd_rxsa()
1551 u8 sa_num = ctx->sa.assoc_num; in cn10k_mdo_del_rxsa() local
1558 if (sa_num >= CN10K_MCS_SA_PER_SC) in cn10k_mdo_del_rxsa()
1561 cn10k_mcs_write_rx_sa_plcy(pfvf, ctx->secy, rxsc, sa_num, false); in cn10k_mdo_del_rxsa()
1562 cn10k_mcs_free_rxsa(pfvf, rxsc->hw_sa_id[sa_num]); in cn10k_mdo_del_rxsa()
1564 rxsc->sa_bmap &= ~(1 << sa_num); in cn10k_mdo_del_rxsa()
1631 u8 sa_num = ctx->sa.assoc_num; in cn10k_mdo_get_tx_sa_stats() local
1638 if (sa_num >= CN10K_MCS_SA_PER_SC) in cn10k_mdo_get_tx_sa_stats()
1641 cn10k_mcs_sa_stats(pfvf, txsc->hw_sa_id[sa_num], &rsp, MCS_TX, false); in cn10k_mdo_get_tx_sa_stats()
1697 u8 sa_num = ctx->sa.assoc_num; in cn10k_mdo_get_rx_sa_stats() local
1704 if (sa_num >= CN10K_MCS_SA_PER_SC) in cn10k_mdo_get_rx_sa_stats()
1707 cn10k_mcs_sa_stats(pfvf, rxsc->hw_sa_id[sa_num], &rsp, MCS_RX, false); in cn10k_mdo_get_rx_sa_stats()