Searched refs:sa_entry (Results 1 – 7 of 7) sorted by relevance
/linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
H A D | ipsec_offload.c | 93 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 D | ipsec.c | 64 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->esn_state.overlap; in mlx5e_ipsec_update_esn_state() 124 if (sa_entry->esn_state.esn_msb) in mlx5e_ipsec_update_esn_state() [all …]
|
H A D | ipsec_fs.c | 178 static void ipsec_rx_rule_add_match_obj(struct mlx5e_ipsec_sa_entry *sa_entry, in ipsec_rx_rule_add_match_obj() argument 182 struct mlx5e_ipsec *ipsec = sa_entry->ipsec; in ipsec_rx_rule_add_match_obj() 185 mlx5_esw_ipsec_rx_rule_add_match_obj(sa_entry, spec); in ipsec_rx_rule_add_match_obj() 191 sa_entry->ipsec_obj_id | BIT(31)); in ipsec_rx_rule_add_match_obj() 197 static int rx_add_rule_drop_auth_trailer(struct mlx5e_ipsec_sa_entry *sa_entry, in rx_add_rule_drop_auth_trailer() argument 200 struct mlx5e_ipsec *ipsec = sa_entry->ipsec; in rx_add_rule_drop_auth_trailer() 221 sa_entry->ipsec_rule.auth.fc = flow_counter; in rx_add_rule_drop_auth_trailer() 233 ipsec_rx_rule_add_match_obj(sa_entry, rx, spec); in rx_add_rule_drop_auth_trailer() 241 sa_entry->ipsec_rule.auth.rule = rule; in rx_add_rule_drop_auth_trailer() 250 sa_entry->ipsec_rule.trailer.fc = flow_counter; in rx_add_rule_drop_auth_trailer() [all …]
|
H A 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() 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/mellanox/mlx5/core/esw/ |
H A D | ipsec_fs.c | 43 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 D | ipsec_fs.h | 15 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
|
/linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
H A D | cn10k_ipsec.c | 521 struct cn10k_tx_sa_s *sa_entry) in cn10k_outb_prepare_sa() argument 531 memset(sa_entry, 0, sizeof(struct cn10k_tx_sa_s)); in cn10k_outb_prepare_sa() 535 sa_entry->ctx_size = (pf->ipsec.sa_size / OTX2_ALIGN) & 0xF; in cn10k_outb_prepare_sa() 536 sa_entry->hw_ctx_off = cn10k_ipsec_get_hw_ctx_offset(); in cn10k_outb_prepare_sa() 537 sa_entry->ctx_push_size = cn10k_ipsec_get_ctx_push_size(); in cn10k_outb_prepare_sa() 540 sa_entry->ctx_hdr_size = 1; in cn10k_outb_prepare_sa() 543 sa_entry->aop_valid = 1; in cn10k_outb_prepare_sa() 546 sa_entry->sa_dir = CN10K_IPSEC_SA_DIR_OUTB; in cn10k_outb_prepare_sa() 547 sa_entry->ipsec_protocol = CN10K_IPSEC_SA_IPSEC_PROTO_ESP; in cn10k_outb_prepare_sa() 548 sa_entry->enc_type = CN10K_IPSEC_SA_ENCAP_TYPE_AES_GCM; in cn10k_outb_prepare_sa() [all …]
|