Home
last modified time | relevance | path

Searched refs:ipsec (Results 1 – 25 of 36) sorted by relevance

12

/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
Dipsec_fs.c43 static struct mlx5e_ipsec_rx *ipsec_rx(struct mlx5e_ipsec *ipsec, u32 family, int type) in ipsec_rx() argument
45 if (ipsec->is_uplink_rep && type == XFRM_DEV_OFFLOAD_PACKET) in ipsec_rx()
46 return ipsec->rx_esw; in ipsec_rx()
49 return ipsec->rx_ipv4; in ipsec_rx()
51 return ipsec->rx_ipv6; in ipsec_rx()
54 static struct mlx5e_ipsec_tx *ipsec_tx(struct mlx5e_ipsec *ipsec, int type) in ipsec_tx() argument
56 if (ipsec->is_uplink_rep && type == XFRM_DEV_OFFLOAD_PACKET) in ipsec_tx()
57 return ipsec->tx_esw; in ipsec_tx()
59 return ipsec->tx; in ipsec_tx()
232 static void ipsec_rx_ft_disconnect(struct mlx5e_ipsec *ipsec, u32 family) in ipsec_rx_ft_disconnect() argument
[all …]
Dipsec.c80 queue_delayed_work(sa_entry->ipsec->wq, &dwork->dwork, in mlx5e_ipsec_handle_tx_limit()
649 struct mlx5e_ipsec *ipsec; in mlx5e_xfrm_add_state() local
655 if (!priv->ipsec) in mlx5e_xfrm_add_state()
658 ipsec = priv->ipsec; in mlx5e_xfrm_add_state()
665 sa_entry->ipsec = ipsec; in mlx5e_xfrm_add_state()
714 err = xa_insert_bh(&ipsec->sadb, sa_entry->ipsec_obj_id, sa_entry, in mlx5e_xfrm_add_state()
722 queue_delayed_work(ipsec->wq, &sa_entry->dwork->dwork, in mlx5e_xfrm_add_state()
727 xa_set_mark(&ipsec->sadb, sa_entry->ipsec_obj_id, in mlx5e_xfrm_add_state()
756 struct mlx5e_ipsec *ipsec = sa_entry->ipsec; in mlx5e_xfrm_del_state() local
762 old = xa_erase_bh(&ipsec->sadb, sa_entry->ipsec_obj_id); in mlx5e_xfrm_del_state()
[all …]
Dipsec_stats.c69 if (!priv->ipsec) in MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS()
81 if (!priv->ipsec) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STRS()
95 if (!priv->ipsec) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS()
98 mlx5e_accel_ipsec_fs_read_stats(priv, &priv->ipsec->hw_stats); in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS()
100 data[idx++] = MLX5E_READ_CTR_ATOMIC64(&priv->ipsec->hw_stats, in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS()
108 return priv->ipsec ? NUM_IPSEC_SW_COUNTERS : 0; in MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS()
117 if (priv->ipsec) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STRS()
128 if (priv->ipsec) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS()
130 data[idx++] = MLX5E_READ_CTR_ATOMIC64(&priv->ipsec->sw_stats, in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS()
Dipsec_rxtx.c273 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()
318 struct mlx5e_ipsec *ipsec = priv->ipsec; in mlx5e_ipsec_offload_handle_rx_skb() local
327 atomic64_inc(&ipsec->sw_stats.ipsec_rx_drop_sp_alloc); in mlx5e_ipsec_offload_handle_rx_skb()
332 sa_entry = xa_load(&ipsec->sadb, sa_handle); in mlx5e_ipsec_offload_handle_rx_skb()
335 atomic64_inc(&ipsec->sw_stats.ipsec_rx_drop_sadb_miss); in mlx5e_ipsec_offload_handle_rx_skb()
358 atomic64_inc(&ipsec->sw_stats.ipsec_rx_drop_syndrome); in mlx5e_ipsec_offload_handle_rx_skb()
364 struct mlx5e_ipsec *ipsec = priv->ipsec; in mlx5_esw_ipsec_rx_make_metadata() local
[all …]
Dipsec_offload.c361 struct mlx5e_ipsec *ipsec = sa_entry->ipsec; in mlx5e_ipsec_handle_limits() local
362 struct mlx5e_ipsec_aso *aso = ipsec->aso; in mlx5e_ipsec_handle_limits()
448 aso = sa_entry->ipsec->aso; in mlx5e_ipsec_handle_event()
474 struct mlx5e_ipsec *ipsec = container_of(nb, struct mlx5e_ipsec, nb); in mlx5e_ipsec_event() local
490 sa_entry = xa_load(&ipsec->sadb, be32_to_cpu(object->obj_id)); in mlx5e_ipsec_event()
501 queue_work(ipsec->wq, &work->work); in mlx5e_ipsec_event()
505 int mlx5e_ipsec_aso_init(struct mlx5e_ipsec *ipsec) in mlx5e_ipsec_aso_init() argument
507 struct mlx5_core_dev *mdev = ipsec->mdev; in mlx5e_ipsec_aso_init()
513 aso = kzalloc(sizeof(*ipsec->aso), GFP_KERNEL); in mlx5e_ipsec_aso_init()
533 ipsec->nb.notifier_call = mlx5e_ipsec_event; in mlx5e_ipsec_aso_init()
[all …]
Den_accel.h114 struct mlx5e_accel_tx_ipsec_state ipsec; member
136 if (unlikely(!mlx5e_ipsec_handle_tx_skb(dev, skb, &state->ipsec))) in mlx5e_accel_tx_begin()
158 return mlx5e_ipsec_tx_ids_len(&state->ipsec); in mlx5e_accel_tx_ids_len()
198 state->ipsec.xo && state->ipsec.tailen) in mlx5e_accel_tx_finish()
199 mlx5e_ipsec_handle_tx_wqe(wqe, &state->ipsec, inlseg); in mlx5e_accel_tx_finish()
Dipsec.h258 struct mlx5e_ipsec *ipsec; member
293 struct mlx5e_ipsec *ipsec; member
304 void mlx5e_accel_ipsec_fs_cleanup(struct mlx5e_ipsec *ipsec);
305 int mlx5e_accel_ipsec_fs_init(struct mlx5e_ipsec *ipsec);
321 int mlx5e_ipsec_aso_init(struct mlx5e_ipsec *ipsec);
322 void mlx5e_ipsec_aso_cleanup(struct mlx5e_ipsec *ipsec);
334 return sa_entry->ipsec->mdev; in mlx5e_ipsec_sa2dev()
340 return pol_entry->ipsec->mdev; in mlx5e_ipsec_pol2dev()
/Linux-v6.6/drivers/net/ethernet/intel/ixgbevf/
Dipsec.c103 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 …]
DMakefile13 ixgbevf-$(CONFIG_IXGBEVF_IPSEC) += ipsec.o
/Linux-v6.6/drivers/net/netdevsim/
Dipsec.c17 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()
68 static int nsim_ipsec_find_empty_idx(struct nsim_ipsec *ipsec) in nsim_ipsec_find_empty_idx() argument
72 if (ipsec->count == NSIM_IPSEC_MAX_SA_COUNT) in nsim_ipsec_find_empty_idx()
77 if (!ipsec->sa[i].used) in nsim_ipsec_find_empty_idx()
131 struct nsim_ipsec *ipsec; in nsim_ipsec_add_sa() local
140 ipsec = &ns->ipsec; in nsim_ipsec_add_sa()
158 ret = nsim_ipsec_find_empty_idx(ipsec); in nsim_ipsec_add_sa()
[all …]
DMakefile14 netdevsim-objs += ipsec.o
Dnetdevsim.h117 struct nsim_ipsec ipsec; member
/Linux-v6.6/drivers/net/ethernet/intel/ixgbe/
Dixgbe_ipsec.c305 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-v6.6/drivers/net/ethernet/mellanox/mlx5/core/esw/
Dipsec_fs.c24 static void esw_ipsec_rx_status_drop_destroy(struct mlx5e_ipsec *ipsec, in esw_ipsec_rx_status_drop_destroy() argument
29 mlx5_fc_destroy(ipsec->mdev, rx->status_drop_cnt); in esw_ipsec_rx_status_drop_destroy()
32 static void esw_ipsec_rx_status_pass_destroy(struct mlx5e_ipsec *ipsec, in esw_ipsec_rx_status_pass_destroy() argument
36 mlx5_chains_put_table(esw_chains(ipsec->mdev->priv.eswitch), 0, 1, 0); in esw_ipsec_rx_status_pass_destroy()
39 static int esw_ipsec_rx_status_drop_create(struct mlx5e_ipsec *ipsec, in esw_ipsec_rx_status_drop_create() argument
44 struct mlx5_core_dev *mdev = ipsec->mdev; in esw_ipsec_rx_status_drop_create()
109 static int esw_ipsec_rx_status_pass_create(struct mlx5e_ipsec *ipsec, in esw_ipsec_rx_status_pass_create() argument
134 mlx5_core_warn(ipsec->mdev, in esw_ipsec_rx_status_pass_create()
148 void mlx5_esw_ipsec_rx_status_destroy(struct mlx5e_ipsec *ipsec, in mlx5_esw_ipsec_rx_status_destroy() argument
151 esw_ipsec_rx_status_pass_destroy(ipsec, rx); in mlx5_esw_ipsec_rx_status_destroy()
[all …]
Dipsec_fs.h11 void mlx5_esw_ipsec_rx_status_destroy(struct mlx5e_ipsec *ipsec,
13 int mlx5_esw_ipsec_rx_status_create(struct mlx5e_ipsec *ipsec,
16 void mlx5_esw_ipsec_rx_create_attr_set(struct mlx5e_ipsec *ipsec,
18 int mlx5_esw_ipsec_rx_status_pass_dest_get(struct mlx5e_ipsec *ipsec,
25 void mlx5_esw_ipsec_tx_create_attr_set(struct mlx5e_ipsec *ipsec,
29 static inline void mlx5_esw_ipsec_rx_status_destroy(struct mlx5e_ipsec *ipsec, in mlx5_esw_ipsec_rx_status_destroy() argument
32 static inline int mlx5_esw_ipsec_rx_status_create(struct mlx5e_ipsec *ipsec, in mlx5_esw_ipsec_rx_status_create() argument
39 static inline void mlx5_esw_ipsec_rx_create_attr_set(struct mlx5e_ipsec *ipsec, in mlx5_esw_ipsec_rx_create_attr_set() argument
42 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
62 static inline void mlx5_esw_ipsec_tx_create_attr_set(struct mlx5e_ipsec *ipsec, in mlx5_esw_ipsec_tx_create_attr_set() argument
/Linux-v6.6/drivers/net/ethernet/netronome/nfp/
DMakefile83 nfp-$(CONFIG_NFP_NET_IPSEC) += crypto/ipsec.o nfd3/ipsec.o nfdk/ipsec.o
/Linux-v6.6/drivers/net/ethernet/netronome/nfp/nfdk/
Ddp.c176 struct sk_buff *skb, bool *ipsec) in nfp_nfdk_prep_tx_meta() argument
187 *ipsec = nfp_net_ipsec_tx_prep(dp, skb, &offload_info); in nfp_nfdk_prep_tx_meta()
195 if (!(md_dst || vlan_insert || *ipsec)) in nfp_nfdk_prep_tx_meta()
201 (*ipsec ? NFP_NET_META_IPSEC_FIELD_SIZE : 0); in nfp_nfdk_prep_tx_meta()
223 if (*ipsec) { in nfp_nfdk_prep_tx_meta()
265 bool ipsec = false; in nfp_nfdk_tx() local
286 metadata = nfp_nfdk_prep_tx_meta(dp, nn->app, skb, &ipsec); in nfp_nfdk_tx()
384 if (ipsec) in nfp_nfdk_tx()
390 if (!ipsec) in nfp_nfdk_tx()
399 if (!ipsec) in nfp_nfdk_tx()
/Linux-v6.6/tools/testing/selftests/net/
D.gitignore15 ipsec
Dxfrm_policy.sh402 ip netns exec ns3 iptables -p icmp -A FORWARD -m policy --dir out --pol ipsec
403 ip netns exec ns4 iptables -p icmp -A FORWARD -m policy --dir out --pol ipsec
DMakefile67 TEST_GEN_FILES += ipsec
/Linux-v6.6/arch/mips/boot/dts/brcm/
Dbcm6368.dtsi231 clock-names = "ipsec";
234 reset-names = "ipsec";
/Linux-v6.6/drivers/net/ethernet/netronome/nfp/nfd3/
Ddp.c172 u64 tls_handle, bool *ipsec) in nfp_nfd3_prep_tx_meta() argument
183 *ipsec = nfp_net_ipsec_tx_prep(dp, skb, &offload_info); in nfp_nfd3_prep_tx_meta()
191 if (!(md_dst || tls_handle || vlan_insert || *ipsec)) in nfp_nfd3_prep_tx_meta()
198 (*ipsec ? NFP_NET_META_IPSEC_FIELD_SIZE : 0); in nfp_nfd3_prep_tx_meta()
228 if (*ipsec) { in nfp_nfd3_prep_tx_meta()
266 bool ipsec = false; in nfp_nfd3_tx() local
294 md_bytes = nfp_nfd3_prep_tx_meta(dp, skb, tls_handle, &ipsec); in nfp_nfd3_tx()
327 if (ipsec) in nfp_nfd3_tx()
/Linux-v6.6/Documentation/networking/
Dindex.rst64 ipsec
/Linux-v6.6/drivers/net/bonding/
Dbond_main.c430 struct bond_ipsec *ipsec; in bond_ipsec_add_sa() local
454 ipsec = kmalloc(sizeof(*ipsec), GFP_ATOMIC); in bond_ipsec_add_sa()
455 if (!ipsec) { in bond_ipsec_add_sa()
463 ipsec->xs = xs; in bond_ipsec_add_sa()
464 INIT_LIST_HEAD(&ipsec->list); in bond_ipsec_add_sa()
466 list_add(&ipsec->list, &bond->ipsec_list); in bond_ipsec_add_sa()
469 kfree(ipsec); in bond_ipsec_add_sa()
478 struct bond_ipsec *ipsec; in bond_ipsec_add_sa_all() local
499 list_for_each_entry(ipsec, &bond->ipsec_list, list) { in bond_ipsec_add_sa_all()
500 ipsec->xs->xso.real_dev = slave->dev; in bond_ipsec_add_sa_all()
[all …]
/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/
DMakefile72 esw/devlink_port.o esw/vporttbl.o esw/qos.o esw/ipsec.o
104 mlx5_core-$(CONFIG_MLX5_EN_IPSEC) += en_accel/ipsec.o en_accel/ipsec_rxtx.o \

12