/Linux-v6.6/drivers/net/netdevsim/ |
D | macsec.c | 55 __func__, sci_to_cpu(ctx->secy->sci), idx); in nsim_macsec_add_secy() 58 ns->macsec.nsim_secy[idx].sci = ctx->secy->sci; in nsim_macsec_add_secy() 69 idx = nsim_macsec_find_secy(ns, ctx->secy->sci); in nsim_macsec_upd_secy() 72 __func__, sci_to_cpu(ctx->secy->sci)); in nsim_macsec_upd_secy() 77 __func__, sci_to_cpu(ctx->secy->sci), idx); in nsim_macsec_upd_secy() 87 idx = nsim_macsec_find_secy(ns, ctx->secy->sci); in nsim_macsec_del_secy() 90 __func__, sci_to_cpu(ctx->secy->sci)); in nsim_macsec_del_secy() 95 __func__, sci_to_cpu(ctx->secy->sci), idx); in nsim_macsec_del_secy() 107 struct nsim_secy *secy; in nsim_macsec_add_rxsc() local 110 idx = nsim_macsec_find_secy(ns, ctx->secy->sci); in nsim_macsec_add_rxsc() [all …]
|
/Linux-v6.6/drivers/net/ |
D | macsec.c | 53 #define for_each_rxsc(secy, sc) \ argument 54 for (sc = rcu_dereference_bh(secy->rx_sc); \ 57 #define for_each_rxsc_rtnl(secy, sc) \ argument 58 for (sc = rtnl_dereference(secy->rx_sc); \ 98 struct macsec_secy secy; member 289 const struct macsec_secy *secy, u32 pn, in macsec_fill_sectag() argument 292 const struct macsec_tx_sc *tx_sc = &secy->tx_sc; in macsec_fill_sectag() 299 memcpy(&h->secure_channel_id, &secy->sci, in macsec_fill_sectag() 313 else if (secy->icv_len != MACSEC_DEFAULT_ICV_LEN) in macsec_fill_sectag() 445 static void __macsec_pn_wrapped(struct macsec_secy *secy, in __macsec_pn_wrapped() argument [all …]
|
/Linux-v6.6/drivers/net/ethernet/marvell/octeontx2/nic/ |
D | cn10k_macsec.c | 97 struct macsec_secy *secy) in cn10k_mcs_get_txsc() argument 102 if (txsc->sw_secy == secy) in cn10k_mcs_get_txsc() 110 struct macsec_secy *secy, in cn10k_mcs_get_rxsc() argument 116 if (rxsc->sw_rxsc == rx_sc && rxsc->sw_secy == secy) in cn10k_mcs_get_rxsc() 260 struct macsec_secy *secy, u8 hw_secy_id) in cn10k_mcs_write_rx_secy() argument 276 policy = FIELD_PREP(MCS_RX_SECY_PLCY_RW_MASK, secy->replay_window); in cn10k_mcs_write_rx_secy() 277 if (secy->replay_protect) in cn10k_mcs_write_rx_secy() 282 switch (secy->key_len) { in cn10k_mcs_write_rx_secy() 284 cipher = secy->xpn ? MCS_GCM_AES_XPN_128 : MCS_GCM_AES_128; in cn10k_mcs_write_rx_secy() 287 cipher = secy->xpn ? MCS_GCM_AES_XPN_256 : MCS_GCM_AES_256; in cn10k_mcs_write_rx_secy() [all …]
|
/Linux-v6.6/drivers/net/ethernet/aquantia/atlantic/ |
D | aq_macsec.c | 32 static int aq_clear_secy(struct aq_nic_s *nic, const struct macsec_secy *secy, 36 const struct macsec_secy *secy); 50 const struct macsec_secy *secy) in aq_get_txsc_idx_from_secy() argument 54 if (unlikely(!secy)) in aq_get_txsc_idx_from_secy() 58 if (macsec_cfg->aq_txsc[i].sw_secy == secy) in aq_get_txsc_idx_from_secy() 296 ret = aq_apply_secy_cfg(nic, ctx->secy); in aq_mdo_dev_open() 319 const struct macsec_secy *secy = aq_txsc->sw_secy; in aq_set_txsc() local 325 aq_ether_addr_to_mac(tx_class_rec.mac_sa, secy->netdev->dev_addr); in aq_set_txsc() 327 put_unaligned_be64((__force u64)secy->sci, tx_class_rec.sci); in aq_set_txsc() 343 sc_rec.protect = secy->protect_frames; in aq_set_txsc() [all …]
|
/Linux-v6.6/drivers/net/phy/mscc/ |
D | mscc_macsec.c | 429 if (priv->secy->replay_protect) in vsc8584_macsec_flow() 431 if (priv->secy->validate_frames == MACSEC_VALIDATE_STRICT) in vsc8584_macsec_flow() 433 else if (priv->secy->validate_frames == MACSEC_VALIDATE_CHECK) in vsc8584_macsec_flow() 436 if (priv->secy->protect_frames) in vsc8584_macsec_flow() 438 if (priv->secy->tx_sc.encrypt) in vsc8584_macsec_flow() 440 if (priv->secy->tx_sc.send_sci) in vsc8584_macsec_flow() 530 ret = vsc8584_macsec_derive_key(key, priv->secy->key_len, hkey); in vsc8584_macsec_transformation() 534 switch (priv->secy->key_len) { in vsc8584_macsec_transformation() 546 (CONTROL_TYPE_EGRESS | CONTROL_AN(priv->secy->tx_sc.encoding_sa)) : in vsc8584_macsec_transformation() 563 for (i = 0; i < priv->secy->key_len / sizeof(u32); i++) in vsc8584_macsec_transformation() [all …]
|
D | mscc.h | 387 struct macsec_secy *secy; member
|
/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
D | macsec.c | 353 obj_attrs.replay_window = ctx->secy->replay_window; in mlx5e_macsec_init_sa() 354 obj_attrs.replay_protect = ctx->secy->replay_protect; in mlx5e_macsec_init_sa() 408 mlx5e_macsec_cleanup_sa(macsec, rx_sa, false, ctx->secy->netdev, *fs_id); in macsec_rx_sa_active_update() 422 const struct macsec_secy *secy = ctx->secy; in mlx5e_macsec_secy_features_validate() local 424 if (secy->validate_frames != MACSEC_VALIDATE_STRICT) { in mlx5e_macsec_secy_features_validate() 430 if (secy->icv_len != MACSEC_DEFAULT_ICV_LEN) { in mlx5e_macsec_secy_features_validate() 436 if (!secy->protect_frames) { in mlx5e_macsec_secy_features_validate() 442 if (!ctx->secy->tx_sc.encrypt) { in mlx5e_macsec_secy_features_validate() 459 if (iter->netdev == ctx->secy->netdev) in mlx5e_macsec_get_macsec_device_context() 481 const struct macsec_tx_sc *tx_sc = &ctx->secy->tx_sc; in mlx5e_macsec_add_txsa() [all …]
|
/Linux-v6.6/include/net/ |
D | macsec.h | 258 struct macsec_secy *secy; member 308 void macsec_pn_wrapped(struct macsec_secy *secy, struct macsec_tx_sa *tx_sa); 309 static inline bool macsec_send_sci(const struct macsec_secy *secy) in macsec_send_sci() argument 311 const struct macsec_tx_sc *tx_sc = &secy->tx_sc; in macsec_send_sci() 314 (secy->n_rx_sc > 1 && !tx_sc->end_station && !tx_sc->scb); in macsec_send_sci()
|
/Linux-v6.6/drivers/net/ethernet/marvell/octeontx2/af/ |
D | mcs.c | 310 for (id = 0; id < map->secy.max; id++) { in mcs_clear_all_stats() 317 for (id = 0; id < map->secy.max; id++) { in mcs_clear_all_stats() 406 void mcs_rx_sc_cam_write(struct mcs *mcs, u64 sci, u64 secy, int sc_id) in mcs_rx_sc_cam_write() argument 409 mcs_reg_write(mcs, MCSX_CPM_RX_SLAVE_SC_CAMX(1, sc_id), secy); in mcs_rx_sc_cam_write() 433 val = (map->secy & 0x7F) | (map->ctrl_pkt & 0x1) << 8; in cn10kb_mcs_flowid_secy_map() 514 __set_bit(secy_id, mcs->rx.secy.bmap); in mcs_install_flowid_bypass_entry() 515 __set_bit(secy_id, mcs->tx.secy.bmap); in mcs_install_flowid_bypass_entry() 530 map.secy = secy_id; in mcs_install_flowid_bypass_entry() 732 for (id = 0; id < map->secy.max; id++) { in mcs_free_all_rsrc() 735 mcs_free_rsrc(&map->secy, map->secy2pf_map, in mcs_free_all_rsrc() [all …]
|
D | mcs.h | 102 u8 secy; member 116 struct rsrc_bmap secy; member 190 void mcs_rx_sc_cam_write(struct mcs *mcs, u64 sci, u64 secy, int sc_id);
|
D | mcs_rvu_if.c | 610 map.secy = req->secy_id; in rvu_mbox_handler_mcs_flowid_entry_write() 654 rc = mcs_free_rsrc(&map->secy, map->secy2pf_map, req->rsrc_id, pcifunc); in rvu_mbox_handler_mcs_free_resources() 715 rsrc_id = mcs_alloc_rsrc(&map->secy, map->secy2pf_map, pcifunc); in rvu_mbox_handler_mcs_alloc_resources()
|
D | mcs_cnf10kb.c | 77 val = (map->secy & 0x3F) | (map->ctrl_pkt & 0x1) << 6; in cnf10kb_mcs_flowid_secy_map()
|
D | rvu_debugfs.c | 430 map = &mcs->tx.secy; in rvu_dbg_mcs_tx_secy_stats_display() 473 map = &mcs->rx.secy; in rvu_dbg_mcs_rx_secy_stats_display()
|
/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
D | macsec_fs.c | 614 const struct macsec_secy *secy = ctx->secy; in macsec_fs_tx_create_sectag_header() local 615 bool sci_present = macsec_send_sci(secy); in macsec_fs_tx_create_sectag_header() 619 tx_sc = &secy->tx_sc; in macsec_fs_tx_create_sectag_header() 624 memcpy(§ag.sci, &secy->sci, in macsec_fs_tx_create_sectag_header() 636 else if (secy->icv_len != MACSEC_DEFAULT_ICV_LEN) in macsec_fs_tx_create_sectag_header() 879 err = macsec_fs_id_add(&macsec_fs->macsec_devices_list, *fs_id, macsec_ctx->secy->netdev, in macsec_fs_tx_add_rule() 889 macsec_fs_tx_del_rule(macsec_fs, tx_rule, macsec_ctx->secy->netdev); in macsec_fs_tx_add_rule() 1828 err = macsec_fs_id_add(&macsec_fs->macsec_devices_list, fs_id, macsec_ctx->secy->netdev, in macsec_fs_rx_add_rule() 1839 macsec_fs_rx_del_rule(macsec_fs, rx_rule, macsec_ctx->secy->netdev, fs_id); in macsec_fs_rx_add_rule() 2088 .macdev = macsec_ctx->secy->netdev, in mlx5_macsec_fs_add_rule()
|