Home
last modified time | relevance | path

Searched refs:sa_entry (Results 1 – 8 of 8) sorted by relevance

/linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
H A Dipsec_offload.c93 struct mlx5e_ipsec_sa_entry *sa_entry) in mlx5e_ipsec_packet_setup() argument
95 struct mlx5_accel_esp_xfrm_attrs *attrs = &sa_entry->attrs; in mlx5e_ipsec_packet_setup()
127 sa_entry->esn_state.esn); in mlx5e_ipsec_packet_setup()
145 static int mlx5_create_ipsec_obj(struct mlx5e_ipsec_sa_entry *sa_entry) in mlx5_create_ipsec_obj() argument
147 struct mlx5_accel_esp_xfrm_attrs *attrs = &sa_entry->attrs; in mlx5_create_ipsec_obj()
148 struct mlx5_core_dev *mdev = mlx5e_ipsec_sa2dev(sa_entry); in mlx5_create_ipsec_obj()
172 MLX5_SET(ipsec_obj, obj, dekn, sa_entry->enc_key_id); in mlx5_create_ipsec_obj()
182 mlx5e_ipsec_packet_setup(obj, res->pdn, sa_entry); in mlx5_create_ipsec_obj()
186 sa_entry->ipsec_obj_id = in mlx5_create_ipsec_obj()
192 static void mlx5_destroy_ipsec_obj(struct mlx5e_ipsec_sa_entry *sa_entry) in mlx5_destroy_ipsec_obj() argument
[all …]
H A Dipsec.c64 struct mlx5e_ipsec_sa_entry *sa_entry = dwork->sa_entry; in mlx5e_ipsec_handle_sw_limits() local
65 struct xfrm_state *x = sa_entry->x; in mlx5e_ipsec_handle_sw_limits()
67 if (sa_entry->attrs.drop) in mlx5e_ipsec_handle_sw_limits()
72 sa_entry->attrs.drop = true; in mlx5e_ipsec_handle_sw_limits()
75 mlx5e_accel_ipsec_fs_modify(sa_entry); in mlx5e_ipsec_handle_sw_limits()
87 queue_delayed_work(sa_entry->ipsec->wq, &dwork->dwork, in mlx5e_ipsec_handle_sw_limits()
91 static bool mlx5e_ipsec_update_esn_state(struct mlx5e_ipsec_sa_entry *sa_entry) in mlx5e_ipsec_update_esn_state() argument
93 struct xfrm_state *x = sa_entry->x; in mlx5e_ipsec_update_esn_state()
112 overlap = sa_entry in mlx5e_ipsec_update_esn_state()
146 mlx5e_ipsec_init_limits(struct mlx5e_ipsec_sa_entry * sa_entry,struct mlx5_accel_esp_xfrm_attrs * attrs) mlx5e_ipsec_init_limits() argument
259 mlx5e_ipsec_init_macs(struct mlx5e_ipsec_sa_entry * sa_entry,struct mlx5_accel_esp_xfrm_attrs * attrs) mlx5e_ipsec_init_macs() argument
393 mlx5e_ipsec_build_accel_xfrm_attrs(struct mlx5e_ipsec_sa_entry * sa_entry,struct mlx5_accel_esp_xfrm_attrs * attrs) mlx5e_ipsec_build_accel_xfrm_attrs() argument
647 struct mlx5e_ipsec_sa_entry *sa_entry = work->sa_entry; mlx5e_ipsec_modify_state() local
655 mlx5e_ipsec_set_esn_ops(struct mlx5e_ipsec_sa_entry * sa_entry) mlx5e_ipsec_set_esn_ops() argument
675 struct mlx5e_ipsec_sa_entry *sa_entry = work->sa_entry; mlx5e_ipsec_handle_netdev_event() local
695 mlx5_ipsec_create_work(struct mlx5e_ipsec_sa_entry * sa_entry) mlx5_ipsec_create_work() argument
748 mlx5e_ipsec_create_dwork(struct mlx5e_ipsec_sa_entry * sa_entry) mlx5e_ipsec_create_dwork() argument
776 struct mlx5e_ipsec_sa_entry *sa_entry = NULL; mlx5e_xfrm_add_state() local
909 struct mlx5e_ipsec_sa_entry *sa_entry = to_ipsec_sa_entry(x); mlx5e_xfrm_del_state() local
922 struct mlx5e_ipsec_sa_entry *sa_entry = to_ipsec_sa_entry(x); mlx5e_xfrm_free_state() local
950 struct mlx5e_ipsec_sa_entry *sa_entry; mlx5e_ipsec_netevent_event() local
1062 struct mlx5e_ipsec_sa_entry *sa_entry = to_ipsec_sa_entry(x); mlx5e_xfrm_advance_esn_state() local
1079 struct mlx5e_ipsec_sa_entry *sa_entry = to_ipsec_sa_entry(x); mlx5e_xfrm_update_stats() local
[all...]
H A Dipsec.h161 struct mlx5e_ipsec_sa_entry *sa_entry; member
171 struct mlx5e_ipsec_sa_entry *sa_entry; member
317 int mlx5e_accel_ipsec_fs_add_rule(struct mlx5e_ipsec_sa_entry *sa_entry);
318 void mlx5e_accel_ipsec_fs_del_rule(struct mlx5e_ipsec_sa_entry *sa_entry);
321 void mlx5e_accel_ipsec_fs_modify(struct mlx5e_ipsec_sa_entry *sa_entry);
322 bool mlx5e_ipsec_fs_tunnel_allowed(struct mlx5e_ipsec_sa_entry *sa_entry);
324 int mlx5_ipsec_create_sa_ctx(struct mlx5e_ipsec_sa_entry *sa_entry);
325 void mlx5_ipsec_free_sa_ctx(struct mlx5e_ipsec_sa_entry *sa_entry);
329 void mlx5_accel_esp_modify_xfrm(struct mlx5e_ipsec_sa_entry *sa_entry,
335 int mlx5e_ipsec_aso_query(struct mlx5e_ipsec_sa_entry *sa_entry,
[all …]
H A Dipsec_fs.c179 static void ipsec_rx_rule_add_match_obj(struct mlx5e_ipsec_sa_entry *sa_entry, in ipsec_rx_rule_add_match_obj() argument
183 struct mlx5e_ipsec *ipsec = sa_entry->ipsec; in ipsec_rx_rule_add_match_obj()
186 mlx5_esw_ipsec_rx_rule_add_match_obj(sa_entry, spec); in ipsec_rx_rule_add_match_obj()
192 sa_entry->ipsec_obj_id | BIT(31)); in ipsec_rx_rule_add_match_obj()
198 static int rx_add_rule_drop_auth_trailer(struct mlx5e_ipsec_sa_entry *sa_entry, in rx_add_rule_drop_auth_trailer() argument
201 struct mlx5e_ipsec *ipsec = sa_entry->ipsec; in rx_add_rule_drop_auth_trailer()
222 sa_entry->ipsec_rule.auth.fc = flow_counter; in rx_add_rule_drop_auth_trailer()
234 ipsec_rx_rule_add_match_obj(sa_entry, rx, spec); in rx_add_rule_drop_auth_trailer()
242 sa_entry->ipsec_rule.auth.rule = rule; in rx_add_rule_drop_auth_trailer()
251 sa_entry->ipsec_rule.trailer.fc = flow_counter; in rx_add_rule_drop_auth_trailer()
[all …]
H A Dipsec_rxtx.c267 struct mlx5e_ipsec_sa_entry *sa_entry; in mlx5e_ipsec_handle_tx_skb() local
296 sa_entry = (struct mlx5e_ipsec_sa_entry *)x->xso.offload_handle; in mlx5e_ipsec_handle_tx_skb()
297 sa_entry->set_iv_op(skb, x, xo); in mlx5e_ipsec_handle_tx_skb()
313 struct mlx5e_ipsec_sa_entry *sa_entry; in mlx5e_ipsec_offload_handle_rx_skb() local
326 sa_entry = xa_load(&ipsec->sadb, sa_handle); in mlx5e_ipsec_offload_handle_rx_skb()
327 if (unlikely(!sa_entry)) { in mlx5e_ipsec_offload_handle_rx_skb()
336 xfrm_state_hold(sa_entry->x); in mlx5e_ipsec_offload_handle_rx_skb()
339 sp->xvec[sp->len++] = sa_entry->x; in mlx5e_ipsec_offload_handle_rx_skb()
/linux/drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/
H A Dchcr_ipsec.c143 struct ipsec_sa_entry *sa_entry) in ch_ipsec_setauthsize() argument
148 sa_entry->authsize = authsize; in ch_ipsec_setauthsize()
167 struct ipsec_sa_entry *sa_entry) in ch_ipsec_setkey() argument
178 memcpy(sa_entry->salt, key + keylen, 4); in ch_ipsec_setkey()
193 memcpy(sa_entry->key, key, keylen); in ch_ipsec_setkey()
194 sa_entry->enckey_len = keylen; in ch_ipsec_setkey()
199 sa_entry->key_ctx_hdr = FILL_KEY_CTX_HDR(ck_size, in ch_ipsec_setkey()
209 sa_entry->enckey_len = 0; in ch_ipsec_setkey()
216 memcpy(sa_entry->key + (DIV_ROUND_UP(sa_entry->enckey_len, 16) * in ch_ipsec_setkey()
218 sa_entry->kctx_len = ((DIV_ROUND_UP(sa_entry->enckey_len, 16)) << 4) + in ch_ipsec_setkey()
[all …]
/linux/drivers/net/ethernet/mellanox/mlx5/core/esw/
H A Dipsec_fs.c43 int mlx5_esw_ipsec_rx_setup_modify_header(struct mlx5e_ipsec_sa_entry *sa_entry, in mlx5_esw_ipsec_rx_setup_modify_header() argument
47 struct mlx5e_ipsec *ipsec = sa_entry->ipsec; in mlx5_esw_ipsec_rx_setup_modify_header()
54 xa_mk_value(sa_entry->ipsec_obj_id), in mlx5_esw_ipsec_rx_setup_modify_header()
77 sa_entry->rx_mapped_id = mapped_id; in mlx5_esw_ipsec_rx_setup_modify_header()
88 void mlx5_esw_ipsec_rx_rule_add_match_obj(struct mlx5e_ipsec_sa_entry *sa_entry, in mlx5_esw_ipsec_rx_rule_add_match_obj() argument
96 sa_entry->rx_mapped_id << ESW_ZONE_ID_BITS); in mlx5_esw_ipsec_rx_rule_add_match_obj()
101 void mlx5_esw_ipsec_rx_id_mapping_remove(struct mlx5e_ipsec_sa_entry *sa_entry) in mlx5_esw_ipsec_rx_id_mapping_remove() argument
103 struct mlx5e_ipsec *ipsec = sa_entry->ipsec; in mlx5_esw_ipsec_rx_id_mapping_remove()
105 if (sa_entry->rx_mapped_id) in mlx5_esw_ipsec_rx_id_mapping_remove()
107 sa_entry->rx_mapped_id); in mlx5_esw_ipsec_rx_id_mapping_remove()
H A Dipsec_fs.h15 int mlx5_esw_ipsec_rx_setup_modify_header(struct mlx5e_ipsec_sa_entry *sa_entry,
17 void mlx5_esw_ipsec_rx_id_mapping_remove(struct mlx5e_ipsec_sa_entry *sa_entry);
23 void mlx5_esw_ipsec_rx_rule_add_match_obj(struct mlx5e_ipsec_sa_entry *sa_entry,
35 static inline int mlx5_esw_ipsec_rx_setup_modify_header(struct mlx5e_ipsec_sa_entry *sa_entry, in mlx5_esw_ipsec_rx_setup_modify_header() argument
41 static inline void mlx5_esw_ipsec_rx_id_mapping_remove(struct mlx5e_ipsec_sa_entry *sa_entry) {} in mlx5_esw_ipsec_rx_id_mapping_remove() argument
54 mlx5_esw_ipsec_rx_rule_add_match_obj(struct mlx5e_ipsec_sa_entry *sa_entry, in mlx5_esw_ipsec_rx_rule_add_match_obj() argument