Skip to content

Commit 3b0b692

Browse files
Rakesh KudurumallaJerin Jacob
authored andcommitted
net/cnxk: fix OOP handling for inbound pkts
To handle OOP for inbound packet, processing is done based on NIX_RX_REAS_F flag. However, for the SKUs that does not support reassembly Inbound Out-Of-Place processing test case fails because reassembly flag is not updated in event mode. This patch fixes the same. Fixes: 5e9e008 ("net/cnxk: support inline ingress out-of-place session") Cc: [email protected] Signed-off-by: Rakesh Kudurumalla <[email protected]>
1 parent c5cf846 commit 3b0b692

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

drivers/net/cnxk/cn10k_ethdev_sec.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ PLT_STATIC_ASSERT(RTE_PMD_CNXK_AR_WIN_SIZE_MAX == ROC_AR_WIN_SIZE_MAX);
2828
PLT_STATIC_ASSERT(RTE_PMD_CNXK_LOG_MIN_AR_WIN_SIZE_M1 == ROC_LOG_MIN_AR_WIN_SIZE_M1);
2929
PLT_STATIC_ASSERT(RTE_PMD_CNXK_AR_WINBITS_SZ == ROC_AR_WINBITS_SZ);
3030

31+
cnxk_ethdev_rx_offload_cb_t cnxk_ethdev_rx_offload_cb;
32+
void
33+
cnxk_ethdev_rx_offload_cb_register(cnxk_ethdev_rx_offload_cb_t cb)
34+
{
35+
cnxk_ethdev_rx_offload_cb = cb;
36+
}
37+
3138
static struct rte_cryptodev_capabilities cn10k_eth_sec_crypto_caps[] = {
3239
{ /* AES GCM */
3340
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
@@ -908,6 +915,9 @@ cn10k_eth_sec_session_create(void *device,
908915
!(dev->rx_offload_flags & NIX_RX_REAS_F)) {
909916
dev->rx_offload_flags |= NIX_RX_REAS_F;
910917
cn10k_eth_set_rx_function(eth_dev);
918+
if (cnxk_ethdev_rx_offload_cb)
919+
cnxk_ethdev_rx_offload_cb(eth_dev->data->port_id,
920+
NIX_RX_REAS_F);
911921
}
912922
} else {
913923
struct roc_ot_ipsec_outb_sa *outb_sa, *outb_sa_dptr;

drivers/net/cnxk/cnxk_ethdev.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,10 @@ int cnxk_nix_lookup_mem_metapool_set(struct cnxk_eth_dev *dev);
725725
int cnxk_nix_lookup_mem_metapool_clear(struct cnxk_eth_dev *dev);
726726
__rte_internal
727727
int cnxk_nix_inb_mode_set(struct cnxk_eth_dev *dev, bool use_inl_dev);
728+
typedef void (*cnxk_ethdev_rx_offload_cb_t)(uint16_t port_id, uint64_t flags);
729+
__rte_internal
730+
void cnxk_ethdev_rx_offload_cb_register(cnxk_ethdev_rx_offload_cb_t cb);
731+
728732
struct cnxk_eth_sec_sess *cnxk_eth_sec_sess_get_by_spi(struct cnxk_eth_dev *dev,
729733
uint32_t spi, bool inb);
730734
struct cnxk_eth_sec_sess *

drivers/net/cnxk/version.map

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ EXPERIMENTAL {
2323
INTERNAL {
2424
global:
2525
cnxk_nix_inb_mode_set;
26+
cnxk_ethdev_rx_offload_cb_register;
2627
};

0 commit comments

Comments
 (0)