From: Nithin Dabilpuram Date: Tue, 22 Feb 2022 19:35:03 +0000 (+0530) Subject: net/cnxk: fix inline device RQ tag mask X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=82529cff18df734262077661c6a91560b1fd8833;p=dpdk.git net/cnxk: fix inline device RQ tag mask Fix inline device RQ tagmask to get packets with receive errors as type ETHDEV packets to callback handler so that packet buffers can get freed. Currently only IPsec denied packets get the right tag mask. Fixes: ee48f711f3b0 ("common/cnxk: support NIX inline inbound and outbound setup") Cc: stable@dpdk.org Signed-off-by: Nithin Dabilpuram Acked-by: Jerin Jacob --- diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c index 003f972aeb..11a169137b 100644 --- a/drivers/common/cnxk/roc_nix_inl.c +++ b/drivers/common/cnxk/roc_nix_inl.c @@ -584,7 +584,7 @@ roc_nix_inl_dev_rq_get(struct roc_nix_rq *rq) inl_rq->flow_tag_width = 20; /* Special tag mask */ - inl_rq->tag_mask = 0xFFF00000; + inl_rq->tag_mask = rq->tag_mask; inl_rq->tt = SSO_TT_ORDERED; inl_rq->hwgrp = 0; inl_rq->wqe_skip = inl_dev->wqe_skip; diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c index 0558bc3eed..a2b2679398 100644 --- a/drivers/net/cnxk/cnxk_ethdev.c +++ b/drivers/net/cnxk/cnxk_ethdev.c @@ -3,6 +3,8 @@ */ #include +#include + static inline uint64_t nix_get_rx_offload_capa(struct cnxk_eth_dev *dev) { @@ -597,6 +599,13 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid, rxq_sp->qconf.mp = mp; if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SECURITY) { + /* Pass a tagmask used to handle error packets in inline device. + * Ethdev rq's tag_mask field will be overwritten later + * when sso is setup. + */ + rq->tag_mask = + 0x0FF00000 | ((uint32_t)RTE_EVENT_TYPE_ETHDEV << 28); + /* Setup rq reference for inline dev if present */ rc = roc_nix_inl_dev_rq_get(rq); if (rc)