Skip to content

Commit

Permalink
net/cnxk: fix inline device RQ tag mask
Browse files Browse the repository at this point in the history
[ upstream commit 82529cf ]

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: ee48f71 ("common/cnxk: support NIX inline inbound and outbound setup")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
  • Loading branch information
nithind1988 authored and kevintraynor committed Mar 1, 2022
1 parent dbafc47 commit 12640e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/common/cnxk/roc_nix_inl.c
Expand Up @@ -533,7 +533,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 = 1;
Expand Down
9 changes: 9 additions & 0 deletions drivers/net/cnxk/cnxk_ethdev.c
Expand Up @@ -3,6 +3,8 @@
*/
#include <cnxk_ethdev.h>

#include <rte_eventdev.h>

static inline uint64_t
nix_get_rx_offload_capa(struct cnxk_eth_dev *dev)
{
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 12640e7

Please sign in to comment.