| /dpdk/drivers/net/sfc/ |
| H A D | sfc.c | 32 sfc_repr_supported(const struct sfc_adapter *sa) in sfc_repr_supported() argument 34 if (!sa->switchdev) in sfc_repr_supported() 57 sfc_dma_alloc(struct sfc_adapter *sa, const char *name, uint16_t id, in sfc_dma_alloc() argument 64 sfc_log_init(sa, "name=%s id=%u len=%zu socket_id=%d", in sfc_dma_alloc() 67 mz = rte_eth_dma_zone_reserve(sa->eth_dev, name, id, len, in sfc_dma_alloc() 70 sfc_err(sa, "cannot reserve DMA zone for %s:%u %#x@%d: %s", in sfc_dma_alloc() 80 rc = sfc_nic_dma_mz_map(sa, mz, addr_type, &esmp->esm_addr); in sfc_dma_alloc() 89 sfc_info(sa, in sfc_dma_alloc() 98 sfc_dma_free(const struct sfc_adapter *sa, efsys_mem_t *esmp) in sfc_dma_free() argument 102 sfc_log_init(sa, "name=%s", esmp->esm_mz->name); in sfc_dma_free() [all …]
|
| H A D | sfc_intr.c | 30 sfc_intr_handle_mgmt_evq(struct sfc_adapter *sa) in sfc_intr_handle_mgmt_evq() argument 34 rte_spinlock_lock(&sa->mgmt_evq_lock); in sfc_intr_handle_mgmt_evq() 36 evq = sa->mgmt_evq; in sfc_intr_handle_mgmt_evq() 38 if (!sa->mgmt_evq_running) { in sfc_intr_handle_mgmt_evq() 39 sfc_log_init(sa, "interrupt on not running management EVQ %u", in sfc_intr_handle_mgmt_evq() 45 sfc_err(sa, "cannot prime EVQ %u", evq->evq_index); in sfc_intr_handle_mgmt_evq() 48 rte_spinlock_unlock(&sa->mgmt_evq_lock); in sfc_intr_handle_mgmt_evq() 54 struct sfc_adapter *sa = (struct sfc_adapter *)cb_arg; in sfc_intr_line_handler() local 55 efx_nic_t *enp = sa->nic; in sfc_intr_line_handler() 58 unsigned int lsc_seq = sa->port.lsc_seq; in sfc_intr_line_handler() [all …]
|
| H A D | sfc_repr_proxy.c | 38 sfc_repr_proxy_by_adapter(struct sfc_adapter *sa) in sfc_repr_proxy_by_adapter() argument 40 return &sa->repr_proxy; in sfc_repr_proxy_by_adapter() 47 struct sfc_adapter *sa; in sfc_get_adapter_by_pf_port_id() local 52 sa = sfc_adapter_by_eth_dev(dev); in sfc_get_adapter_by_pf_port_id() 54 return sa; in sfc_get_adapter_by_pf_port_id() 316 sfc_repr_proxy_txq_info_get(struct sfc_adapter *sa, unsigned int repr_queue_id) in sfc_repr_proxy_txq_info_get() argument 318 struct sfc_adapter_shared *sas = sfc_sa2shared(sa); in sfc_repr_proxy_txq_info_get() 322 dp_txq = &sa->repr_proxy.dp_txq[repr_queue_id]; in sfc_repr_proxy_txq_info_get() 328 sfc_repr_proxy_txq_attach(struct sfc_adapter *sa) in sfc_repr_proxy_txq_attach() argument 330 struct sfc_adapter_shared * const sas = sfc_sa2shared(sa); in sfc_repr_proxy_txq_attach() [all …]
|
| H A D | sfc_mae_counter.c | 46 sfc_mae_counter_get_service_lcore(struct sfc_adapter *sa) in sfc_mae_counter_get_service_lcore() argument 50 cid = sfc_get_service_lcore(sa->socket_id); in sfc_mae_counter_get_service_lcore() 54 if (sa->socket_id != SOCKET_ID_ANY) in sfc_mae_counter_get_service_lcore() 58 sfc_warn(sa, "failed to get service lcore for counter service"); in sfc_mae_counter_get_service_lcore() 59 } else if (sa->socket_id != SOCKET_ID_ANY) { in sfc_mae_counter_get_service_lcore() 60 sfc_warn(sa, in sfc_mae_counter_get_service_lcore() 62 sa->socket_id, rte_lcore_to_socket_id(cid)); in sfc_mae_counter_get_service_lcore() 68 sfc_mae_counter_rxq_required(struct sfc_adapter *sa) in sfc_mae_counter_rxq_required() argument 70 const efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic); in sfc_mae_counter_rxq_required() 79 sfc_mae_counter_fw_rsrc_enable(struct sfc_adapter *sa, in sfc_mae_counter_fw_rsrc_enable() argument [all …]
|
| H A D | sfc_port.c | 41 sfc_port_update_mac_stats(struct sfc_adapter *sa, boolean_t force_upload) in sfc_port_update_mac_stats() argument 43 struct sfc_port *port = &sa->port; in sfc_port_update_mac_stats() 50 SFC_ASSERT(sfc_adapter_is_locked(sa)); in sfc_port_update_mac_stats() 52 if (sa->state != SFC_ETHDEV_STARTED) in sfc_port_update_mac_stats() 72 rc = efx_mac_stats_upload(sa->nic, esmp); in sfc_port_update_mac_stats() 84 rc = efx_mac_stats_update(sa->nic, esmp, in sfc_port_update_mac_stats() 96 sfc_port_reset_sw_stats(struct sfc_adapter *sa) in sfc_port_reset_sw_stats() argument 98 struct sfc_port *port = &sa->port; in sfc_port_reset_sw_stats() 108 sfc_port_reset_mac_stats(struct sfc_adapter *sa) in sfc_port_reset_mac_stats() argument 112 SFC_ASSERT(sfc_adapter_is_locked(sa)); in sfc_port_reset_mac_stats() [all …]
|
| H A D | sfc_nic_dma.c | 39 struct sfc_adapter *sa; member 50 struct sfc_adapter *sa = register_data->sa; in sfc_nic_dma_register_mempool_chunk() local 51 struct sfc_adapter_shared *sas = sfc_sa2shared(sa); in sfc_nic_dma_register_mempool_chunk() 69 rc = efx_nic_dma_config_add(sa->nic, memhdr->iova, memhdr->len, in sfc_nic_dma_register_mempool_chunk() 72 sfc_err(sa, in sfc_nic_dma_register_mempool_chunk() 80 sfc_info(sa, in sfc_nic_dma_register_mempool_chunk() 88 sfc_err(sa, "failed to add regioned NIC DMA mapping: %s", in sfc_nic_dma_register_mempool_chunk() 95 sfc_nic_dma_register_mempool(struct sfc_adapter *sa, struct rte_mempool *mp) in sfc_nic_dma_register_mempool() argument 98 .sa = sa, in sfc_nic_dma_register_mempool() 104 SFC_ASSERT(sfc_adapter_is_locked(sa)); in sfc_nic_dma_register_mempool() [all …]
|
| H A D | sfc_flow_tunnel.c | 19 sfc_ft_is_supported(struct sfc_adapter *sa) in sfc_ft_is_supported() argument 21 SFC_ASSERT(sfc_adapter_is_locked(sa)); in sfc_ft_is_supported() 23 return ((sa->priv.dp_rx->features & SFC_DP_RX_FEAT_FLOW_MARK) != 0 && in sfc_ft_is_supported() 24 sa->mae.status == SFC_MAE_STATUS_ADMIN); in sfc_ft_is_supported() 28 sfc_ft_is_active(struct sfc_adapter *sa) in sfc_ft_is_active() argument 30 SFC_ASSERT(sfc_adapter_is_locked(sa)); in sfc_ft_is_active() 32 return ((sa->negotiated_rx_metadata & in sfc_ft_is_active() 37 sfc_ft_ctx_pick(struct sfc_adapter *sa, uint32_t flow_mark) in sfc_ft_ctx_pick() argument 41 SFC_ASSERT(sfc_adapter_is_locked(sa)); in sfc_ft_ctx_pick() 45 struct sfc_ft_ctx *ft_ctx = &sa->ft_ctx_pool[ft_ctx_id]; in sfc_ft_ctx_pick() [all …]
|
| H A D | sfc_sriov.c | 45 sfc_sriov_attach(struct sfc_adapter *sa) in sfc_sriov_attach() argument 47 const struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(sa->eth_dev); in sfc_sriov_attach() 48 struct sfc_sriov *sriov = &sa->sriov; in sfc_sriov_attach() 53 sfc_log_init(sa, "entry"); in sfc_sriov_attach() 56 if (sa->switchdev || sriov->num_vfs == 0) in sfc_sriov_attach() 82 sfc_log_init(sa, "done"); in sfc_sriov_attach() 91 sfc_sriov_detach(struct sfc_adapter *sa) in sfc_sriov_detach() argument 93 struct sfc_sriov *sriov = &sa->sriov; in sfc_sriov_detach() 95 sfc_log_init(sa, "entry"); in sfc_sriov_detach() 101 sfc_log_init(sa, "done"); in sfc_sriov_detach() [all …]
|
| H A D | sfc_sw_stats.c | 30 typedef void sfc_get_sw_stat_val_t(struct sfc_adapter *sa, uint16_t qid, 42 sfc_sw_stat_get_rx_good_pkts_bytes(struct sfc_adapter *sa, uint16_t qid, in sfc_sw_stat_get_rx_good_pkts_bytes() argument 46 struct sfc_adapter_shared *sas = sfc_sa2shared(sa); in sfc_sw_stat_get_rx_good_pkts_bytes() 65 sfc_sw_stat_get_tx_good_pkts_bytes(struct sfc_adapter *sa, uint16_t qid, in sfc_sw_stat_get_tx_good_pkts_bytes() argument 69 struct sfc_adapter_shared *sas = sfc_sa2shared(sa); in sfc_sw_stat_get_tx_good_pkts_bytes() 88 sfc_get_sw_stat_val_rx_dbells(struct sfc_adapter *sa, uint16_t qid, in sfc_get_sw_stat_val_rx_dbells() argument 91 struct sfc_adapter_shared *sas = sfc_sa2shared(sa); in sfc_get_sw_stat_val_rx_dbells() 103 sfc_get_sw_stat_val_tx_dbells(struct sfc_adapter *sa, uint16_t qid, in sfc_get_sw_stat_val_tx_dbells() argument 106 struct sfc_adapter_shared *sas = sfc_sa2shared(sa); in sfc_get_sw_stat_val_tx_dbells() 165 sfc_sw_stat_get_name(struct sfc_adapter *sa, in sfc_sw_stat_get_name() argument [all …]
|
| H A D | sfc.h | 333 sfc_sa2shared(struct sfc_adapter *sa) in sfc_sa2shared() argument 335 return sa->priv.shared; in sfc_sa2shared() 343 #define sfc_adapter_lock_init(sa) rte_spinlock_init(&(sa)->lock) argument 344 #define sfc_adapter_is_locked(sa) rte_spinlock_is_locked(&(sa)->lock) argument 345 #define sfc_adapter_lock(sa) rte_spinlock_lock(&(sa)->lock) argument 346 #define sfc_adapter_trylock(sa) rte_spinlock_trylock(&(sa)->lock) argument 347 #define sfc_adapter_unlock(sa) rte_spinlock_unlock(&(sa)->lock) argument 348 #define sfc_adapter_lock_fini(sa) RTE_SET_USED(sa) argument 356 bool sfc_repr_supported(const struct sfc_adapter *sa); 378 int sfc_dma_alloc(struct sfc_adapter *sa, const char *name, uint16_t id, [all …]
|
| H A D | sfc_mcdi.c | 22 struct sfc_adapter *sa = cookie; in sfc_mcdi_dma_alloc() local 24 return sfc_dma_alloc(sa, name, 0, EFX_NIC_DMA_ADDR_MCDI_BUF, len, in sfc_mcdi_dma_alloc() 25 sa->socket_id, esmp); in sfc_mcdi_dma_alloc() 32 const struct sfc_adapter *sa = cookie; in sfc_mcdi_dma_free() local 34 sfc_dma_free(sa, esmp); in sfc_mcdi_dma_free() 41 struct sfc_adapter *sa = cookie; in sfc_mcdi_sched_restart() local 43 sfc_schedule_restart(sa); in sfc_mcdi_sched_restart() 50 struct sfc_adapter *sa = cookie; in sfc_mcdi_mgmt_evq_poll() local 52 sfc_ev_mgmt_qpoll(sa); in sfc_mcdi_mgmt_evq_poll() 63 sfc_mcdi_init(struct sfc_adapter *sa) in sfc_mcdi_init() argument [all …]
|
| H A D | sfc_ev.c | 72 sfc_err(evq->sa, in sfc_ev_nop_rx() 112 sfc_err(evq->sa, in sfc_ev_efx_rx() 127 sfc_err(evq->sa, in sfc_ev_efx_rx() 161 SFC_ASSERT(evq->sa->priv.dp_rx->qrx_ev != NULL); in sfc_ev_dp_rx() 162 return evq->sa->priv.dp_rx->qrx_ev(dp_rxq, id); in sfc_ev_dp_rx() 171 sfc_err(evq->sa, in sfc_ev_nop_rx_packets() 187 SFC_ASSERT(evq->sa->priv.dp_rx->qrx_ev != NULL); in sfc_ev_dp_rx_packets() 188 return evq->sa->priv.dp_rx->qrx_ev(dp_rxq, num_packets); in sfc_ev_dp_rx_packets() 197 sfc_err(evq->sa, in sfc_ev_nop_rx_ps() 214 if (evq->sa->priv.dp_rx->qrx_ps_ev != NULL) in sfc_ev_dp_rx_ps() [all …]
|
| H A D | sfc_filter.c | 19 sfc_filter_is_match_supported(struct sfc_adapter *sa, uint32_t match) in sfc_filter_is_match_supported() argument 21 struct sfc_filter *filter = &sa->filter; in sfc_filter_is_match_supported() 33 sfc_filter_cache_match_supported(struct sfc_adapter *sa) in sfc_filter_cache_match_supported() argument 35 struct sfc_filter *filter = &sa->filter; in sfc_filter_cache_match_supported() 53 rc = efx_filter_supported_filters(sa->nic, buf, num, &num); in sfc_filter_cache_match_supported() 76 sfc_filter_attach(struct sfc_adapter *sa) in sfc_filter_attach() argument 81 sfc_log_init(sa, "entry"); in sfc_filter_attach() 83 rc = efx_filter_init(sa->nic); in sfc_filter_attach() 87 rc = sfc_filter_cache_match_supported(sa); in sfc_filter_attach() 91 efx_filter_fini(sa->nic); in sfc_filter_attach() [all …]
|
| H A D | sfc_rx.c | 59 sfc_rx_get_pushed(struct sfc_adapter *sa, struct sfc_dp_rxq *dp_rxq) in sfc_rx_get_pushed() argument 61 SFC_ASSERT(sa->priv.dp_rx->get_pushed != NULL); in sfc_rx_get_pushed() 63 return sa->priv.dp_rx->get_pushed(dp_rxq); in sfc_rx_get_pushed() 110 rxq->evq->sa->eth_dev->data->rx_mbuf_alloc_failed += in sfc_efx_rx_qrefill() 451 struct sfc_adapter *sa; in sfc_rxq_by_dp_rxq() local 456 sa = sfc_adapter_by_eth_dev(eth_dev); in sfc_rxq_by_dp_rxq() 458 SFC_ASSERT(dpq->queue_id < sfc_sa2shared(sa)->rxq_count); in sfc_rxq_by_dp_rxq() 459 return &sa->rxq_ctrl[dpq->queue_id]; in sfc_rxq_by_dp_rxq() 676 sfc_rx_qflush(struct sfc_adapter *sa, sfc_sw_index_t sw_index) in sfc_rx_qflush() argument 678 struct sfc_adapter_shared *sas = sfc_sa2shared(sa); in sfc_rx_qflush() [all …]
|
| H A D | sfc_tx.c | 51 sfc_tx_get_offload_mask(struct sfc_adapter *sa) in sfc_tx_get_offload_mask() argument 53 const efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic); in sfc_tx_get_offload_mask() 62 if (!sa->tso) in sfc_tx_get_offload_mask() 65 if (!sa->tso_encap || in sfc_tx_get_offload_mask() 70 if (!sa->tso_encap || in sfc_tx_get_offload_mask() 79 sfc_tx_get_dev_offload_caps(struct sfc_adapter *sa) in sfc_tx_get_dev_offload_caps() argument 81 return sa->priv.dp_tx->dev_offload_capa & sfc_tx_get_offload_mask(sa); in sfc_tx_get_dev_offload_caps() 85 sfc_tx_get_queue_offload_caps(struct sfc_adapter *sa) in sfc_tx_get_queue_offload_caps() argument 87 return sa->priv.dp_tx->queue_offload_capa & sfc_tx_get_offload_mask(sa); in sfc_tx_get_queue_offload_caps() 91 sfc_tx_qcheck_conf(struct sfc_adapter *sa, unsigned int txq_max_fill_level, in sfc_tx_qcheck_conf() argument [all …]
|
| H A D | sfc_mae_counter.h | 33 bool sfc_mae_counter_rxq_required(struct sfc_adapter *sa); 35 int sfc_mae_counter_rxq_attach(struct sfc_adapter *sa); 36 void sfc_mae_counter_rxq_detach(struct sfc_adapter *sa); 38 int sfc_mae_counter_rxq_init(struct sfc_adapter *sa); 39 void sfc_mae_counter_rxq_fini(struct sfc_adapter *sa); 44 int sfc_mae_counter_fw_rsrc_enable(struct sfc_adapter *sa, 46 int sfc_mae_counter_fw_rsrc_disable(struct sfc_adapter *sa, 48 int sfc_mae_counter_get(struct sfc_adapter *sa, 52 int sfc_mae_counter_start(struct sfc_adapter *sa); 53 void sfc_mae_counter_stop(struct sfc_adapter *sa); [all …]
|
| H A D | sfc_rx.h | 124 struct sfc_rxq *sfc_rxq_ctrl_by_ethdev_qid(struct sfc_adapter *sa, 127 int sfc_rx_configure(struct sfc_adapter *sa); 128 void sfc_rx_close(struct sfc_adapter *sa); 129 int sfc_rx_start(struct sfc_adapter *sa); 130 void sfc_rx_stop(struct sfc_adapter *sa); 132 int sfc_rx_qinit_info(struct sfc_adapter *sa, sfc_sw_index_t sw_index, 134 int sfc_rx_qinit(struct sfc_adapter *sa, unsigned int rx_queue_id, 138 void sfc_rx_qfini(struct sfc_adapter *sa, sfc_sw_index_t sw_index); 139 int sfc_rx_qstart(struct sfc_adapter *sa, sfc_sw_index_t sw_index); 140 void sfc_rx_qstop(struct sfc_adapter *sa, sfc_sw_index_t sw_index); [all …]
|
| /dpdk/lib/ipsec/ |
| H A D | sa.c | 11 #include "sa.h" 88 rte_ipsec_sa_type(const struct rte_ipsec_sa *sa) in rte_ipsec_sa_type() argument 90 return sa->type; in rte_ipsec_sa_type() 160 rte_ipsec_sa_fini(struct rte_ipsec_sa *sa) in rte_ipsec_sa_fini() argument 162 memset(sa, 0, sa->size); in rte_ipsec_sa_fini() 254 esp_inb_init(struct rte_ipsec_sa *sa) in esp_inb_init() argument 257 sa->ctp.cipher.offset = sizeof(struct rte_esp_hdr) + sa->iv_len; in esp_inb_init() 258 sa in esp_inb_init() 284 esp_inb_tun_init(struct rte_ipsec_sa * sa,const struct rte_ipsec_sa_prm * prm) esp_inb_tun_init() argument 294 esp_outb_init(struct rte_ipsec_sa * sa,uint32_t hlen,uint64_t sqn) esp_outb_init() argument 354 esp_outb_tun_init(struct rte_ipsec_sa * sa,const struct rte_ipsec_sa_prm * prm) esp_outb_tun_init() argument 383 esp_sa_init(struct rte_ipsec_sa * sa,const struct rte_ipsec_sa_prm * prm,const struct crypto_xform * cxf) esp_sa_init() argument 513 fill_sa_replay(struct rte_ipsec_sa * sa,uint32_t wnd_sz,uint32_t nb_bucket,uint64_t sqn) fill_sa_replay() argument 549 rte_ipsec_sa_init(struct rte_ipsec_sa * sa,const struct rte_ipsec_sa_prm * prm,uint32_t size) rte_ipsec_sa_init() argument 691 lksd_none_pkt_func_select(const struct rte_ipsec_sa * sa,struct rte_ipsec_sa_pkt_func * pf) lksd_none_pkt_func_select() argument 729 cpu_crypto_pkt_func_select(const struct rte_ipsec_sa * sa,struct rte_ipsec_sa_pkt_func * pf) cpu_crypto_pkt_func_select() argument 771 inline_crypto_pkt_func_select(const struct rte_ipsec_sa * sa,struct rte_ipsec_sa_pkt_func * pf) inline_crypto_pkt_func_select() argument 808 ipsec_sa_pkt_func_select(const struct rte_ipsec_session * ss,const struct rte_ipsec_sa * sa,struct rte_ipsec_sa_pkt_func * pf) ipsec_sa_pkt_func_select() argument [all...] |
| H A D | ipsec_telemetry.c | 14 const struct rte_ipsec_sa *sa; member 28 const struct rte_ipsec_sa *sa = entry->sa; in handle_telemetry_cmd_ipsec_sa_list() local 29 rte_tel_data_add_array_uint(data, rte_be_to_cpu_32(sa->spi)); in handle_telemetry_cmd_ipsec_sa_list() 51 const struct rte_ipsec_sa *sa; in handle_telemetry_cmd_ipsec_sa_stats() local 64 sa = entry->sa; in handle_telemetry_cmd_ipsec_sa_stats() 71 if (sa_spi && (sa_spi != sa->spi)) in handle_telemetry_cmd_ipsec_sa_stats() 83 sa->statistics.count); in handle_telemetry_cmd_ipsec_sa_stats() 86 sa->statistics.bytes - in handle_telemetry_cmd_ipsec_sa_stats() 87 (sa->statistics.count * sa->hdr_len)); in handle_telemetry_cmd_ipsec_sa_stats() 90 sa->statistics.errors.count); in handle_telemetry_cmd_ipsec_sa_stats() [all …]
|
| H A D | ipsec_sqn.h | 16 #define IS_ESN(sa) ((sa)->sqn_mask == UINT64_MAX) argument 18 #define SQN_ATOMIC(sa) ((sa)->type & RTE_IPSEC_SATP_SQN_ATOM) argument 93 esn_inb_check_sqn(const struct replay_sqn *rsn, const struct rte_ipsec_sa *sa, in esn_inb_check_sqn() argument 99 if (sa->replay.win_sz == 0) in esn_inb_check_sqn() 107 if (sqn == 0 || sqn + sa->replay.win_sz < rsn->sqn) in esn_inb_check_sqn() 112 bucket = (sqn >> WINDOW_BUCKET_BITS) & sa->replay.bucket_index_mask; in esn_inb_check_sqn() 125 esn_outb_update_sqn(struct rte_ipsec_sa *sa, uint32_t *num) in esn_outb_update_sqn() argument 130 if (SQN_ATOMIC(sa)) in esn_outb_update_sqn() 131 sqn = rte_atomic_fetch_add_explicit(&sa->sqn.outb, n, rte_memory_order_relaxed) + n; in esn_outb_update_sqn() 133 sqn = sa->sqn.outb + n; in esn_outb_update_sqn() [all …]
|
| H A D | esp_outb.c | 11 #include "sa.h" 18 typedef int32_t (*esp_outb_prepare_t)(struct rte_ipsec_sa *sa, rte_be64_t sqc, 28 const struct rte_ipsec_sa *sa, const union sym_op_data *icv, in sop_ciph_auth_prepare() argument 31 sop->cipher.data.offset = sa->ctp.cipher.offset + pofs; in sop_ciph_auth_prepare() 32 sop->cipher.data.length = sa->ctp.cipher.length + plen; in sop_ciph_auth_prepare() 33 sop->auth.data.offset = sa->ctp.auth.offset + pofs; in sop_ciph_auth_prepare() 34 sop->auth.data.length = sa->ctp.auth.length + plen; in sop_ciph_auth_prepare() 45 const struct rte_ipsec_sa *sa, const union sym_op_data *icv, in sop_aead_prepare() argument 48 sop->aead.data.offset = sa->ctp.cipher.offset + pofs; in sop_aead_prepare() 49 sop->aead.data.length = sa in sop_aead_prepare() 61 outb_cop_prepare(struct rte_crypto_op * cop,const struct rte_ipsec_sa * sa,const uint64_t ivp[IPSEC_MAX_IV_QWORD],const union sym_op_data * icv,uint32_t hlen,uint32_t plen) outb_cop_prepare() argument 139 outb_tun_pkt_prepare(struct rte_ipsec_sa * sa,rte_be64_t sqc,const uint64_t ivp[IPSEC_MAX_IV_QWORD],struct rte_mbuf * mb,union sym_op_data * icv,uint8_t sqh_len,uint8_t tso) outb_tun_pkt_prepare() argument 244 outb_pkt_xprepare(const struct rte_ipsec_sa * sa,rte_be64_t sqc,const union sym_op_data * icv) outb_pkt_xprepare() argument 299 struct rte_ipsec_sa *sa; esp_outb_tun_prepare() local 346 outb_trs_pkt_prepare(struct rte_ipsec_sa * sa,rte_be64_t sqc,const uint64_t ivp[IPSEC_MAX_IV_QWORD],struct rte_mbuf * mb,union sym_op_data * icv,uint8_t sqh_len,uint8_t tso) outb_trs_pkt_prepare() argument 449 struct rte_ipsec_sa *sa; esp_outb_trs_prepare() local 497 outb_cpu_crypto_prepare(const struct rte_ipsec_sa * sa,uint32_t * pofs,uint32_t plen,void * iv) outb_cpu_crypto_prepare() argument 540 struct rte_ipsec_sa *sa; cpu_outb_pkt_prepare() local 630 struct rte_ipsec_sa *sa; esp_outb_sqh_process() local 727 struct rte_ipsec_sa *sa; inline_outb_tun_pkt_process() local 795 struct rte_ipsec_sa *sa; inline_outb_trs_pkt_process() local [all...] |
| H A D | esp_inb.c | 17 typedef uint16_t (*esp_inb_process_t)(struct rte_ipsec_sa *sa, 27 const struct rte_ipsec_sa *sa, const union sym_op_data *icv, in sop_ciph_auth_prepare() argument 30 sop->cipher.data.offset = pofs + sa->ctp.cipher.offset; in sop_ciph_auth_prepare() 31 sop->cipher.data.length = plen - sa->ctp.cipher.length; in sop_ciph_auth_prepare() 32 sop->auth.data.offset = pofs + sa->ctp.auth.offset; in sop_ciph_auth_prepare() 33 sop->auth.data.length = plen - sa->ctp.auth.length; in sop_ciph_auth_prepare() 44 const struct rte_ipsec_sa *sa, const union sym_op_data *icv, in sop_aead_prepare() argument 47 sop->aead.data.offset = pofs + sa->ctp.cipher.offset; in sop_aead_prepare() 48 sop->aead.data.length = plen - sa->ctp.cipher.length; in sop_aead_prepare() 51 sop->aead.aad.data = icv->va + sa->icv_len; in sop_aead_prepare() [all …]
|
| /dpdk/examples/ipsec-secgw/ |
| H A D | ipsec.c | 23 set_ipsec_conf(struct ipsec_sa *sa, struct rte_security_ipsec_xform *ipsec) in set_ipsec_conf() argument 28 if (IS_IP4_TUNNEL(sa->flags)) { in set_ipsec_conf() 34 (uint8_t *)&sa->src.ip.ip4, 4); in set_ipsec_conf() 37 (uint8_t *)&sa->dst.ip.ip4, 4); in set_ipsec_conf() 38 } else if (IS_IP6_TUNNEL(sa->flags)) { in set_ipsec_conf() 44 tunnel->ipv6.src_addr = sa->src.ip.ip6; in set_ipsec_conf() 45 tunnel->ipv6.dst_addr = sa->dst.ip.ip6; in set_ipsec_conf() 51 ipsec->options.udp_encap = sa->udp_encap; in set_ipsec_conf() 52 if (IS_HW_REASSEMBLY_EN(sa->flags)) in set_ipsec_conf() 237 struct ipsec_sa *sa, struc in verify_security_capabilities() 241 create_lookaside_session(struct ipsec_ctx * ipsec_ctx_lcore[],struct socket_ctx * skt_ctx,const struct eventmode_conf * em_conf,struct ipsec_sa * sa,struct rte_ipsec_session * ips) create_lookaside_session() argument 419 create_inline_session(struct socket_ctx * skt_ctx,struct ipsec_sa * sa,struct rte_ipsec_session * ips) create_inline_session() argument 713 create_ipsec_esp_flow(struct ipsec_sa * sa) create_ipsec_esp_flow() argument 817 struct ipsec_sa *sa; ipsec_enqueue() local 933 struct ipsec_sa *sa; ipsec_inline_dequeue() local 960 struct ipsec_sa *sa; ipsec_dequeue() local [all...] |
| H A D | esp.c | 25 esp_inbound(struct rte_mbuf *m, struct ipsec_sa *sa, in esp_inbound() argument 32 RTE_ASSERT(sa != NULL); in esp_inbound() 33 if (ipsec_get_action_type(sa) == in esp_inbound() 53 sizeof(struct rte_esp_hdr) - sa->iv_len - sa->digest_len; in esp_inbound() 55 if ((payload_len & (sa->block_size - 1)) || (payload_len <= 0)) { in esp_inbound() 57 payload_len, sa->block_size); in esp_inbound() 64 if (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) { in esp_inbound() 66 ip_hdr_len + sizeof(struct rte_esp_hdr) + sa->iv_len; in esp_inbound() 75 icb->salt = sa->salt; in esp_inbound() 86 rte_pktmbuf_pkt_len(m) - sa->digest_len); in esp_inbound() [all …]
|
| /dpdk/app/test/ |
| H A D | test_ipsec_perf.c | 159 fill_ipsec_param(struct ipsec_sa *sa) in fill_ipsec_param() argument 161 struct rte_ipsec_sa_prm *prm = &sa->sa_prm; in fill_ipsec_param() 165 prm->flags = sa->sa_flags; in fill_ipsec_param() 168 prm->ipsec_xform = sa->ipsec_xform; in fill_ipsec_param() 170 prm->ipsec_xform.replay_win_sz = sa->replay_win_sz; in fill_ipsec_param() 177 if (sa->type == RTE_CRYPTO_SYM_XFORM_AEAD) { in fill_ipsec_param() 178 sa->aead_xform.type = sa->type; in fill_ipsec_param() 179 sa->aead_xform.aead.algo = aead_algo->algo; in fill_ipsec_param() 180 sa->aead_xform.next = NULL; in fill_ipsec_param() 181 sa->aead_xform.aead.digest_length = aead_algo->digest_len; in fill_ipsec_param() [all …]
|