From: <skori@marvell.com>
To: Aman Singh <aman.deep.singh@intel.com>
Cc: <dev@dpdk.org>, Sunil Kumar Kori <skori@marvell.com>
Subject: [PATCH v2 2/2] app/testpmd: clear stale internal len information
Date: Wed, 21 May 2025 10:41:43 +0530 [thread overview]
Message-ID: <20250521051154.19595-2-skori@marvell.com> (raw)
In-Reply-To: <20250521051154.19595-1-skori@marvell.com>
From: Sunil Kumar Kori <skori@marvell.com>
hdr_lens is used to maintain header lengths after parsing packets.
When port receives different type of packets (say first is VXLAN
packet and second is GRE packet).
For first packet, L2/L3/L4 lengths are set for inner and outer header
alongwith tunnel_len.
Now for second packet, tunnel_len is added more than its size it
contains stale value which further leads to wrong header pointers.
Hence clearing stale information before processing each packet.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
app/test-pmd/csumonly.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index fa0002d321..203af35cf0 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -627,7 +627,6 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
uint32_t rx_bad_outer_l4_csum;
uint32_t rx_bad_outer_ip_csum;
struct testpmd_offload_info info;
- struct rte_net_hdr_lens hdr_lens = {0};
uint32_t ptype;
/* receive a burst of packet */
@@ -666,6 +665,8 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
#endif
for (i = 0; i < nb_rx; i++) {
+ struct rte_net_hdr_lens hdr_lens = {0};
+
if (likely(i < nb_rx - 1))
rte_prefetch0(rte_pktmbuf_mtod(pkts_burst[i + 1],
void *));
--
2.43.0
next prev parent reply other threads:[~2025-05-21 5:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 16:06 [PATCH 1/2] net: fix offset calculation for GENEVE packet skori
2025-05-19 16:06 ` [PATCH 2/2] app/testpmd: clear stale internal len information skori
2025-05-20 21:17 ` Stephen Hemminger
2025-05-21 5:01 ` [EXTERNAL] " Sunil Kumar Kori
2025-05-21 5:11 ` [PATCH v2 1/2] net: fix offset calculation for GENEVE packet skori
2025-05-21 5:11 ` skori [this message]
2025-05-21 9:33 ` huangdengdui
2025-05-20 21:21 ` [PATCH " Stephen Hemminger
2025-05-21 4:57 ` [EXTERNAL] " Sunil Kumar Kori
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=20250521051154.19595-2-skori@marvell.com \
--to=skori@marvell.com \
--cc=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
/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).