DPDK patches and discussions
 help / color / mirror / Atom feed
From: Harman Kalra <hkalra@marvell.com>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	Harman Kalra <hkalra@marvell.com>
Cc: <dev@dpdk.org>, <jerinj@marvell.com>,
	Amit Prakash Shukla <amitprakashs@marvell.com>
Subject: [PATCH v2 1/5] net/cnxk: fix stale offload flag reset
Date: Mon, 24 Jun 2024 17:27:29 +0530	[thread overview]
Message-ID: <20240624115733.191307-1-hkalra@marvell.com> (raw)
In-Reply-To: <20240624074822.88955-1-hkalra@marvell.com>

From: Amit Prakash Shukla <amitprakashs@marvell.com>

mbuf buffer is not reset on tx and hence few fields has stale data from
previous packets. Due to stale offload flags, in one of the scenarios
with OVS, VxLAN offload flag was set while packet did not have the VxLAN
header. In the OVS packet path, the flag was read and accordingly VxLAN
processing was done but as packet did not have VxLAN header it caused
segfault.

This patch resets mbuf offload flags in rx burst function.

Fixes: 46ebc0323151 ("net/cnxk: add eswitch Rx/Tx")

Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
---
V2:
 * Added fixes tag
       
drivers/net/cnxk/cnxk_eswitch_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/cnxk/cnxk_eswitch_rxtx.c b/drivers/net/cnxk/cnxk_eswitch_rxtx.c
index d57e32b091..0200392f2d 100644
--- a/drivers/net/cnxk/cnxk_eswitch_rxtx.c
+++ b/drivers/net/cnxk/cnxk_eswitch_rxtx.c
@@ -194,7 +194,7 @@ cnxk_eswitch_dev_rx_burst(struct cnxk_eswitch_dev *eswitch_dev, uint16_t qid,
 			mbuf->vlan_tci = rx->vtag0_tci;
 		/* Populate RSS hash */
 		mbuf->hash.rss = cqe->tag;
-		mbuf->ol_flags |= RTE_MBUF_F_RX_RSS_HASH;
+		mbuf->ol_flags = RTE_MBUF_F_RX_RSS_HASH;
 		pkts[pkt] = mbuf;
 		roc_prefetch_store_keep(mbuf);
 		plt_esw_dbg("Packet %d rec on queue %d esw qid %d hash %x mbuf %p vlan tci %d",
-- 
2.18.0


  parent reply	other threads:[~2024-06-24 11:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24  7:48 [PATCH 1/6] net/cnxk: " Harman Kalra
2024-06-24  7:48 ` [PATCH 2/6] net/cnxk: add MTU set ops Harman Kalra
2024-06-24  7:48 ` [PATCH 3/6] net/cnxk: add multi seg support in eswitch Harman Kalra
2024-06-24  7:48 ` [PATCH 4/6] net/cnxk: increment number of flow pattern Harman Kalra
2024-06-24  9:14   ` Jerin Jacob
2024-06-24  7:48 ` [PATCH 5/6] net/cnxk: update processing ready message Harman Kalra
2024-06-24  7:48 ` [PATCH 6/6] common/cnxk: flow aginig delaying app shutdown Harman Kalra
2024-06-24  9:13 ` [PATCH 1/6] net/cnxk: stale offload flag reset Jerin Jacob
2024-06-24 11:57 ` Harman Kalra [this message]
2024-06-24 11:57   ` [PATCH v2 2/5] net/cnxk: add MTU set ops Harman Kalra
2024-06-24 11:57   ` [PATCH v2 3/5] net/cnxk: add multi seg support in eswitch Harman Kalra
2024-06-24 11:57   ` [PATCH v2 4/5] net/cnxk: fix invalid pattern count Harman Kalra
2024-06-24 11:57   ` [PATCH v2 5/5] net/cnxk: fix representor port mapping Harman Kalra
2024-06-24 13:24 ` [PATCH v3 1/5] net/cnxk: fix stale offload flag reset Harman Kalra
2024-06-24 13:24   ` [PATCH v3 2/5] net/cnxk: add MTU set ops Harman Kalra
2024-06-24 13:24   ` [PATCH v3 3/5] net/cnxk: add multi seg support in eswitch Harman Kalra
2024-06-24 13:24   ` [PATCH v3 4/5] net/cnxk: fix invalid pattern count Harman Kalra
2024-06-24 13:24   ` [PATCH v3 5/5] net/cnxk: fix representor port mapping Harman Kalra
2024-06-25  9:46     ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240624115733.191307-1-hkalra@marvell.com \
    --to=hkalra@marvell.com \
    --cc=amitprakashs@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).