| /linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
| H A D | ipsec_fs.c | 75 static struct mlx5e_ipsec_rx *ipsec_rx(struct mlx5e_ipsec *ipsec, u32 family, int type) in ipsec_rx() argument 77 if (ipsec->is_uplink_rep && type == XFRM_DEV_OFFLOAD_PACKET) in ipsec_rx() 78 return ipsec->rx_esw; in ipsec_rx() 81 return ipsec->rx_ipv4; in ipsec_rx() 83 return ipsec->rx_ipv6; in ipsec_rx() 86 static struct mlx5e_ipsec_tx *ipsec_tx(struct mlx5e_ipsec *ipsec, int type) in ipsec_tx() argument 88 if (ipsec->is_uplink_rep && type == XFRM_DEV_OFFLOAD_PACKET) in ipsec_tx() 89 return ipsec->tx_esw; in ipsec_tx() 91 return ipsec->tx; in ipsec_tx() 164 static void ipsec_rx_status_drop_destroy(struct mlx5e_ipsec *ipsec, in ipsec_rx_status_drop_destroy() argument [all …]
|
| H A D | ipsec.c | 87 queue_delayed_work(sa_entry->ipsec->wq, &dwork->dwork, in mlx5e_ipsec_handle_sw_limits() 777 struct mlx5e_ipsec *ipsec; in mlx5e_xfrm_add_state() local 783 if (!priv->ipsec) in mlx5e_xfrm_add_state() 786 ipsec = priv->ipsec; in mlx5e_xfrm_add_state() 794 sa_entry->ipsec = ipsec; in mlx5e_xfrm_add_state() 856 err = xa_insert_bh(&ipsec->sadb, sa_entry->ipsec_obj_id, sa_entry, in mlx5e_xfrm_add_state() 864 queue_delayed_work(ipsec->wq, &sa_entry->dwork->dwork, in mlx5e_xfrm_add_state() 868 xa_lock_bh(&ipsec->sadb); in mlx5e_xfrm_add_state() 869 __xa_set_mark(&ipsec->sadb, sa_entry->ipsec_obj_id, in mlx5e_xfrm_add_state() 871 xa_unlock_bh(&ipsec->sadb); in mlx5e_xfrm_add_state() [all …]
|
| H A D | ipsec_stats.c | 69 if (!priv->ipsec) in MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS() 81 if (!priv->ipsec) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STRS() 92 if (!priv->ipsec) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS() 95 mlx5e_accel_ipsec_fs_read_stats(priv, &priv->ipsec->hw_stats); in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS() 99 MLX5E_READ_CTR_ATOMIC64(&priv->ipsec->hw_stats, in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS() 105 return priv->ipsec ? NUM_IPSEC_SW_COUNTERS : 0; in MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS() 114 if (priv->ipsec) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STRS() 123 if (priv->ipsec) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS() 127 &priv->ipsec->sw_stats, in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS()
|
| H A D | ipsec_rxtx.c | 273 atomic64_inc(&priv->ipsec->sw_stats.ipsec_tx_drop_bundle); in mlx5e_ipsec_handle_tx_skb() 279 atomic64_inc(&priv->ipsec->sw_stats.ipsec_tx_drop_no_state); in mlx5e_ipsec_handle_tx_skb() 286 atomic64_inc(&priv->ipsec->sw_stats.ipsec_tx_drop_not_ip); in mlx5e_ipsec_handle_tx_skb() 292 atomic64_inc(&priv->ipsec->sw_stats.ipsec_tx_drop_trailer); in mlx5e_ipsec_handle_tx_skb() 312 struct mlx5e_ipsec *ipsec = priv->ipsec; in mlx5e_ipsec_offload_handle_rx_skb() local 321 atomic64_inc(&ipsec->sw_stats.ipsec_rx_drop_sp_alloc); in mlx5e_ipsec_offload_handle_rx_skb() 326 sa_entry = xa_load(&ipsec->sadb, sa_handle); in mlx5e_ipsec_offload_handle_rx_skb() 329 atomic64_inc(&ipsec->sw_stats.ipsec_rx_drop_sadb_miss); in mlx5e_ipsec_offload_handle_rx_skb() 349 struct mlx5e_ipsec *ipsec = priv->ipsec; in mlx5_esw_ipsec_rx_make_metadata() local 353 if (!ipsec || !ipsec->is_uplink_rep) in mlx5_esw_ipsec_rx_make_metadata() [all …]
|
| H A D | ipsec_offload.c | 478 struct mlx5e_ipsec *ipsec = container_of(nb, struct mlx5e_ipsec, nb); in mlx5e_ipsec_event() local 494 sa_entry = xa_load(&ipsec->sadb, be32_to_cpu(object->obj_id)); in mlx5e_ipsec_event() 505 queue_work(ipsec->wq, &work->work); in mlx5e_ipsec_event() 509 int mlx5e_ipsec_aso_init(struct mlx5e_ipsec *ipsec) in mlx5e_ipsec_aso_init() argument 511 struct mlx5_core_dev *mdev = ipsec->mdev; in mlx5e_ipsec_aso_init() 517 aso = kzalloc_obj(*ipsec->aso); in mlx5e_ipsec_aso_init() 537 ipsec->nb.notifier_call = mlx5e_ipsec_event; in mlx5e_ipsec_aso_init() 538 mlx5_notifier_register(mdev, &ipsec->nb); in mlx5e_ipsec_aso_init() 540 ipsec->aso = aso; in mlx5e_ipsec_aso_init() 551 void mlx5e_ipsec_aso_cleanup(struct mlx5e_ipsec *ipsec) in mlx5e_ipsec_aso_cleanup() argument [all …]
|
| H A D | en_accel.h | 108 struct mlx5e_accel_tx_ipsec_state ipsec; member 137 if (unlikely(!mlx5e_ipsec_handle_tx_skb(dev, skb, &state->ipsec))) in mlx5e_accel_tx_begin() 165 return mlx5e_ipsec_tx_ids_len(&state->ipsec); in mlx5e_accel_tx_ids_len() 216 state->ipsec.xo && state->ipsec.tailen) in mlx5e_accel_tx_finish() 217 mlx5e_ipsec_handle_tx_wqe(wqe, &state->ipsec, inlseg); in mlx5e_accel_tx_finish()
|
| H A D | ipsec.h | 279 struct mlx5e_ipsec *ipsec; member 305 struct mlx5e_ipsec *ipsec; member 316 void mlx5e_accel_ipsec_fs_cleanup(struct mlx5e_ipsec *ipsec); 317 int mlx5e_accel_ipsec_fs_init(struct mlx5e_ipsec *ipsec, struct mlx5_devcom_comp_dev **devcom); 333 int mlx5e_ipsec_aso_init(struct mlx5e_ipsec *ipsec); 334 void mlx5e_ipsec_aso_cleanup(struct mlx5e_ipsec *ipsec); 351 return sa_entry->ipsec->mdev; in mlx5e_ipsec_sa2dev() 357 return pol_entry->ipsec->mdev; in mlx5e_ipsec_pol2dev()
|
| /linux/drivers/net/ethernet/intel/ixgbevf/ |
| H A D | ipsec.c | 103 struct ixgbevf_ipsec *ipsec = adapter->ipsec; in ixgbevf_ipsec_restore() local 112 struct rx_sa *r = &ipsec->rx_tbl[i]; in ixgbevf_ipsec_restore() 113 struct tx_sa *t = &ipsec->tx_tbl[i]; in ixgbevf_ipsec_restore() 140 int ixgbevf_ipsec_find_empty_idx(struct ixgbevf_ipsec *ipsec, bool rxtable) in ixgbevf_ipsec_find_empty_idx() argument 145 if (ipsec->num_rx_sa == IXGBE_IPSEC_MAX_SA_COUNT) in ixgbevf_ipsec_find_empty_idx() 150 if (!ipsec->rx_tbl[i].used) in ixgbevf_ipsec_find_empty_idx() 154 if (ipsec->num_tx_sa == IXGBE_IPSEC_MAX_SA_COUNT) in ixgbevf_ipsec_find_empty_idx() 159 if (!ipsec->tx_tbl[i].used) in ixgbevf_ipsec_find_empty_idx() 178 struct xfrm_state *ixgbevf_ipsec_find_rx_state(struct ixgbevf_ipsec *ipsec, in ixgbevf_ipsec_find_rx_state() argument 186 hash_for_each_possible_rcu(ipsec->rx_sa_list, rsa, hlist, in ixgbevf_ipsec_find_rx_state() [all …]
|
| H A D | Makefile | 10 ixgbevf-$(CONFIG_IXGBEVF_IPSEC) += ipsec.o
|
| /linux/drivers/net/ethernet/intel/ixgbe/ |
| H A D | ixgbe_ipsec.c | 305 struct ixgbe_ipsec *ipsec = adapter->ipsec; in ixgbe_ipsec_restore() local 319 struct rx_sa *r = &ipsec->rx_tbl[i]; in ixgbe_ipsec_restore() 320 struct tx_sa *t = &ipsec->tx_tbl[i]; in ixgbe_ipsec_restore() 341 struct rx_ip_sa *ipsa = &ipsec->ip_tbl[i]; in ixgbe_ipsec_restore() 355 static int ixgbe_ipsec_find_empty_idx(struct ixgbe_ipsec *ipsec, bool rxtable) in ixgbe_ipsec_find_empty_idx() argument 360 if (ipsec->num_rx_sa == IXGBE_IPSEC_MAX_SA_COUNT) in ixgbe_ipsec_find_empty_idx() 365 if (!ipsec->rx_tbl[i].used) in ixgbe_ipsec_find_empty_idx() 369 if (ipsec->num_tx_sa == IXGBE_IPSEC_MAX_SA_COUNT) in ixgbe_ipsec_find_empty_idx() 374 if (!ipsec->tx_tbl[i].used) in ixgbe_ipsec_find_empty_idx() 392 static struct xfrm_state *ixgbe_ipsec_find_rx_state(struct ixgbe_ipsec *ipsec, in ixgbe_ipsec_find_rx_state() argument [all …]
|
| /linux/drivers/net/netdevsim/ |
| H A D | ipsec.c | 17 struct nsim_ipsec *ipsec = &ns->ipsec; in nsim_dbg_netdev_ops_read() local 26 bufsize = (ipsec->count * 4 * 60) + 60; in nsim_dbg_netdev_ops_read() 34 ipsec->count, ipsec->tx); in nsim_dbg_netdev_ops_read() 37 struct nsim_sa *sap = &ipsec->sa[i]; in nsim_dbg_netdev_ops_read() 72 static int nsim_ipsec_find_empty_idx(struct nsim_ipsec *ipsec) in nsim_ipsec_find_empty_idx() argument 76 if (ipsec->count == NSIM_IPSEC_MAX_SA_COUNT) in nsim_ipsec_find_empty_idx() 81 if (!ipsec->sa[i].used) in nsim_ipsec_find_empty_idx() 136 struct nsim_ipsec *ipsec; in nsim_ipsec_add_sa() local 143 ipsec = &ns->ipsec; in nsim_ipsec_add_sa() 161 ret = nsim_ipsec_find_empty_idx(ipsec); in nsim_ipsec_add_sa() [all …]
|
| H A D | Makefile | 14 netdevsim-objs += ipsec.o
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/esw/ |
| H A D | ipsec_fs.c | 24 void mlx5_esw_ipsec_rx_create_attr_set(struct mlx5e_ipsec *ipsec, in mlx5_esw_ipsec_rx_create_attr_set() argument 34 int mlx5_esw_ipsec_rx_status_pass_dest_get(struct mlx5e_ipsec *ipsec, in mlx5_esw_ipsec_rx_status_pass_dest_get() argument 38 dest->ft = mlx5_chains_get_table(esw_chains(ipsec->mdev->priv.eswitch), 0, 1, 0); in mlx5_esw_ipsec_rx_status_pass_dest_get() 47 struct mlx5e_ipsec *ipsec = sa_entry->ipsec; in mlx5_esw_ipsec_rx_setup_modify_header() local 48 struct mlx5_core_dev *mdev = ipsec->mdev; in mlx5_esw_ipsec_rx_setup_modify_header() 53 err = xa_alloc_bh(&ipsec->ipsec_obj_id_map, &mapped_id, in mlx5_esw_ipsec_rx_setup_modify_header() 84 xa_erase_bh(&ipsec->ipsec_obj_id_map, mapped_id); in mlx5_esw_ipsec_rx_setup_modify_header() 103 struct mlx5e_ipsec *ipsec = sa_entry->ipsec; in mlx5_esw_ipsec_rx_id_mapping_remove() local 106 xa_erase_bh(&ipsec->ipsec_obj_id_map, in mlx5_esw_ipsec_rx_id_mapping_remove() 113 struct mlx5e_ipsec *ipsec = priv->ipsec; in mlx5_esw_ipsec_rx_ipsec_obj_id_search() local [all …]
|
| H A D | ipsec_fs.h | 11 void mlx5_esw_ipsec_rx_create_attr_set(struct mlx5e_ipsec *ipsec, 13 int mlx5_esw_ipsec_rx_status_pass_dest_get(struct mlx5e_ipsec *ipsec, 20 void mlx5_esw_ipsec_tx_create_attr_set(struct mlx5e_ipsec *ipsec, 26 static inline void mlx5_esw_ipsec_rx_create_attr_set(struct mlx5e_ipsec *ipsec, in mlx5_esw_ipsec_rx_create_attr_set() argument 29 static inline int mlx5_esw_ipsec_rx_status_pass_dest_get(struct mlx5e_ipsec *ipsec, in mlx5_esw_ipsec_rx_status_pass_dest_get() argument 49 static inline void mlx5_esw_ipsec_tx_create_attr_set(struct mlx5e_ipsec *ipsec, in mlx5_esw_ipsec_tx_create_attr_set() argument
|
| /linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
| H A D | cn10k_ipsec.c | 27 state = atomic_cmpxchg(&pf->ipsec.cpt_state, in cn10k_cpt_device_set_inuse() 41 atomic_set(&pf->ipsec.cpt_state, CN10K_CPT_HW_AVAILABLE); in cn10k_cpt_device_set_available() 46 atomic_set(&pf->ipsec.cpt_state, CN10K_CPT_HW_UNAVAILABLE); in cn10k_cpt_device_set_unavailable() 235 struct cn10k_cpt_inst_queue *iq = &pf->ipsec.iq; in cn10k_outb_cptlf_iq_alloc() 257 struct cn10k_cpt_inst_queue *iq = &pf->ipsec.iq; in cn10k_outb_cptlf_iq_free() 281 otx2_write64(pf, CN10K_CPT_LF_Q_BASE, pf->ipsec.iq.dma_addr); in cn10k_outb_cptlf_iq_init() 333 pf->ipsec.io_addr = (__force u64)otx2_get_regaddr(pf, in cn10k_outb_cpt_init() 397 tar_addr |= pf->ipsec.io_addr | (((size / 16) - 1) & 0x7) << 4; in cn10k_cpt_inst_flush() 535 sa_entry->ctx_size = (pf->ipsec.sa_size / OTX2_ALIGN) & 0xF; in cn10k_outb_prepare_sa() 681 err = qmem_alloc(pf->dev, &sa_info, pf->ipsec.sa_size, OTX2_ALIGN); in cn10k_ipsec_outb_add_state() [all …]
|
| /linux/drivers/net/ethernet/netronome/nfp/ |
| H A D | Makefile | 83 nfp-$(CONFIG_NFP_NET_IPSEC) += crypto/ipsec.o nfd3/ipsec.o nfdk/ipsec.o
|
| /linux/drivers/net/ethernet/netronome/nfp/nfdk/ |
| H A D | dp.c | 179 struct sk_buff *skb, bool *ipsec) in nfp_nfdk_prep_tx_meta() argument 190 *ipsec = nfp_net_ipsec_tx_prep(dp, skb, &offload_info); in nfp_nfdk_prep_tx_meta() 198 if (!(md_dst || vlan_insert || *ipsec)) in nfp_nfdk_prep_tx_meta() 204 (*ipsec ? NFP_NET_META_IPSEC_FIELD_SIZE : 0); in nfp_nfdk_prep_tx_meta() 226 if (*ipsec) { in nfp_nfdk_prep_tx_meta() 268 bool ipsec = false; in nfp_nfdk_tx() local 289 metadata = nfp_nfdk_prep_tx_meta(dp, nn->app, skb, &ipsec); in nfp_nfdk_tx() 387 if (ipsec) in nfp_nfdk_tx() 393 if (!ipsec) in nfp_nfdk_tx() 402 if (!ipsec) in nfp_nfdk_tx()
|
| /linux/tools/testing/selftests/drivers/net/bonding/ |
| H A D | bond_ipsec_offload.sh | 31 ipsec0=/sys/kernel/debug/netdevsim/netdevsim0/ports/0/ipsec 32 ipsec1=/sys/kernel/debug/netdevsim/netdevsim0/ports/1/ipsec
|
| /linux/drivers/net/ethernet/netronome/nfp/nfd3/ |
| H A D | dp.c | 175 u64 tls_handle, bool *ipsec) in nfp_nfd3_prep_tx_meta() argument 186 *ipsec = nfp_net_ipsec_tx_prep(dp, skb, &offload_info); in nfp_nfd3_prep_tx_meta() 194 if (!(md_dst || tls_handle || vlan_insert || *ipsec)) in nfp_nfd3_prep_tx_meta() 201 (*ipsec ? NFP_NET_META_IPSEC_FIELD_SIZE : 0); in nfp_nfd3_prep_tx_meta() 231 if (*ipsec) { in nfp_nfd3_prep_tx_meta() 269 bool ipsec = false; in nfp_nfd3_tx() local 297 md_bytes = nfp_nfd3_prep_tx_meta(dp, skb, tls_handle, &ipsec); in nfp_nfd3_tx() 330 if (ipsec) in nfp_nfd3_tx()
|
| /linux/arch/mips/boot/dts/brcm/ |
| H A D | bcm6368.dtsi | 232 clock-names = "ipsec"; 235 reset-names = "ipsec";
|
| /linux/tools/testing/selftests/net/ |
| H A D | .gitignore | 15 ipsec
|
| H A D | Makefile | 138 ipsec \
|
| /linux/Documentation/networking/ |
| H A D | index.rst | 67 ipsec
|
| /linux/Documentation/translations/zh_CN/networking/ |
| H A D | index.rst | 89 * ipsec
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/ |
| H A D | Makefile | 73 esw/devlink_port.o esw/vporttbl.o esw/qos.o esw/ipsec.o 107 mlx5_core-$(CONFIG_MLX5_EN_IPSEC) += en_accel/ipsec.o en_accel/ipsec_rxtx.o \
|