Searched refs:sa_entry (Results 1 – 8 of 8) sorted by relevance
/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
D | ipsec_offload.c | 133 static int mlx5_create_ipsec_obj(struct mlx5e_ipsec_sa_entry *sa_entry) in mlx5_create_ipsec_obj() argument 135 struct mlx5_accel_esp_xfrm_attrs *attrs = &sa_entry->attrs; in mlx5_create_ipsec_obj() 136 struct mlx5_core_dev *mdev = mlx5e_ipsec_sa2dev(sa_entry); in mlx5_create_ipsec_obj() 160 MLX5_SET(ipsec_obj, obj, dekn, sa_entry->enc_key_id); in mlx5_create_ipsec_obj() 174 sa_entry->ipsec_obj_id = in mlx5_create_ipsec_obj() 180 static void mlx5_destroy_ipsec_obj(struct mlx5e_ipsec_sa_entry *sa_entry) in mlx5_destroy_ipsec_obj() argument 182 struct mlx5_core_dev *mdev = mlx5e_ipsec_sa2dev(sa_entry); in mlx5_destroy_ipsec_obj() 190 MLX5_SET(general_obj_in_cmd_hdr, in, obj_id, sa_entry->ipsec_obj_id); in mlx5_destroy_ipsec_obj() 195 int mlx5_ipsec_create_sa_ctx(struct mlx5e_ipsec_sa_entry *sa_entry) in mlx5_ipsec_create_sa_ctx() argument 197 struct aes_gcm_keymat *aes_gcm = &sa_entry->attrs.aes_gcm; in mlx5_ipsec_create_sa_ctx() [all …]
|
D | ipsec.c | 63 struct mlx5e_ipsec_sa_entry *sa_entry = dwork->sa_entry; in mlx5e_ipsec_handle_tx_limit() local 64 struct xfrm_state *x = sa_entry->x; in mlx5e_ipsec_handle_tx_limit() 66 if (sa_entry->attrs.drop) in mlx5e_ipsec_handle_tx_limit() 72 sa_entry->attrs.drop = true; in mlx5e_ipsec_handle_tx_limit() 75 mlx5e_accel_ipsec_fs_modify(sa_entry); in mlx5e_ipsec_handle_tx_limit() 80 queue_delayed_work(sa_entry->ipsec->wq, &dwork->dwork, in mlx5e_ipsec_handle_tx_limit() 84 static bool mlx5e_ipsec_update_esn_state(struct mlx5e_ipsec_sa_entry *sa_entry) in mlx5e_ipsec_update_esn_state() argument 86 struct xfrm_state *x = sa_entry->x; in mlx5e_ipsec_update_esn_state() 116 overlap = sa_entry->esn_state.overlap; in mlx5e_ipsec_update_esn_state() 124 sa_entry->esn_state.esn = esn; in mlx5e_ipsec_update_esn_state() [all …]
|
D | ipsec.h | 151 struct mlx5e_ipsec_sa_entry *sa_entry; member 161 struct mlx5e_ipsec_sa_entry *sa_entry; member 306 int mlx5e_accel_ipsec_fs_add_rule(struct mlx5e_ipsec_sa_entry *sa_entry); 307 void mlx5e_accel_ipsec_fs_del_rule(struct mlx5e_ipsec_sa_entry *sa_entry); 310 void mlx5e_accel_ipsec_fs_modify(struct mlx5e_ipsec_sa_entry *sa_entry); 311 bool mlx5e_ipsec_fs_tunnel_enabled(struct mlx5e_ipsec_sa_entry *sa_entry); 313 int mlx5_ipsec_create_sa_ctx(struct mlx5e_ipsec_sa_entry *sa_entry); 314 void mlx5_ipsec_free_sa_ctx(struct mlx5e_ipsec_sa_entry *sa_entry); 318 void mlx5_accel_esp_modify_xfrm(struct mlx5e_ipsec_sa_entry *sa_entry, 324 int mlx5e_ipsec_aso_query(struct mlx5e_ipsec_sa_entry *sa_entry, [all …]
|
D | ipsec_fs.c | 1219 static int rx_add_rule(struct mlx5e_ipsec_sa_entry *sa_entry) in rx_add_rule() argument 1221 struct mlx5_accel_esp_xfrm_attrs *attrs = &sa_entry->attrs; in rx_add_rule() 1222 struct mlx5_core_dev *mdev = mlx5e_ipsec_sa2dev(sa_entry); in rx_add_rule() 1223 struct mlx5e_ipsec *ipsec = sa_entry->ipsec; in rx_add_rule() 1254 sa_entry->ipsec_obj_id | BIT(31), in rx_add_rule() 1257 err = mlx5_esw_ipsec_rx_setup_modify_header(sa_entry, &flow_act); in rx_add_rule() 1278 flow_act.crypto.obj_id = sa_entry->ipsec_obj_id; in rx_add_rule() 1298 sa_entry->ipsec_rule.rule = rule; in rx_add_rule() 1299 sa_entry->ipsec_rule.modify_hdr = flow_act.modify_hdr; in rx_add_rule() 1300 sa_entry->ipsec_rule.fc = counter; in rx_add_rule() [all …]
|
D | ipsec_rxtx.c | 267 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() 319 struct mlx5e_ipsec_sa_entry *sa_entry; in mlx5e_ipsec_offload_handle_rx_skb() local 332 sa_entry = xa_load(&ipsec->sadb, sa_handle); in mlx5e_ipsec_offload_handle_rx_skb() 333 if (unlikely(!sa_entry)) { in mlx5e_ipsec_offload_handle_rx_skb() 338 xfrm_state_hold(sa_entry->x); in mlx5e_ipsec_offload_handle_rx_skb() 341 sp->xvec[sp->len++] = sa_entry->x; in mlx5e_ipsec_offload_handle_rx_skb()
|
/Linux-v6.6/drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/ |
D | chcr_ipsec.c | 144 struct ipsec_sa_entry *sa_entry) in ch_ipsec_setauthsize() argument 149 sa_entry->authsize = authsize; in ch_ipsec_setauthsize() 168 struct ipsec_sa_entry *sa_entry) in ch_ipsec_setkey() argument 179 memcpy(sa_entry->salt, key + keylen, 4); in ch_ipsec_setkey() 194 memcpy(sa_entry->key, key, keylen); in ch_ipsec_setkey() 195 sa_entry->enckey_len = keylen; in ch_ipsec_setkey() 200 sa_entry->key_ctx_hdr = FILL_KEY_CTX_HDR(ck_size, in ch_ipsec_setkey() 210 sa_entry->enckey_len = 0; in ch_ipsec_setkey() 217 memcpy(sa_entry->key + (DIV_ROUND_UP(sa_entry->enckey_len, 16) * in ch_ipsec_setkey() 219 sa_entry->kctx_len = ((DIV_ROUND_UP(sa_entry->enckey_len, 16)) << 4) + in ch_ipsec_setkey() [all …]
|
/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/esw/ |
D | ipsec_fs.h | 20 int mlx5_esw_ipsec_rx_setup_modify_header(struct mlx5e_ipsec_sa_entry *sa_entry, 22 void mlx5_esw_ipsec_rx_id_mapping_remove(struct mlx5e_ipsec_sa_entry *sa_entry); 48 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 54 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
|
D | ipsec_fs.c | 195 int mlx5_esw_ipsec_rx_setup_modify_header(struct mlx5e_ipsec_sa_entry *sa_entry, in mlx5_esw_ipsec_rx_setup_modify_header() argument 199 struct mlx5e_ipsec *ipsec = sa_entry->ipsec; in mlx5_esw_ipsec_rx_setup_modify_header() 206 xa_mk_value(sa_entry->ipsec_obj_id), in mlx5_esw_ipsec_rx_setup_modify_header() 229 sa_entry->rx_mapped_id = mapped_id; in mlx5_esw_ipsec_rx_setup_modify_header() 240 void mlx5_esw_ipsec_rx_id_mapping_remove(struct mlx5e_ipsec_sa_entry *sa_entry) in mlx5_esw_ipsec_rx_id_mapping_remove() argument 242 struct mlx5e_ipsec *ipsec = sa_entry->ipsec; in mlx5_esw_ipsec_rx_id_mapping_remove() 244 if (sa_entry->rx_mapped_id) in mlx5_esw_ipsec_rx_id_mapping_remove() 246 sa_entry->rx_mapped_id); in mlx5_esw_ipsec_rx_id_mapping_remove()
|