From: <skori@marvell.com>
To: Aman Singh <aman.deep.singh@intel.com>
Cc: <dev@dpdk.org>, Sunil Kumar Kori <skori@marvell.com>
Subject: [PATCH 2/2] app/testpmd: clear stale internal len information
Date: Mon, 19 May 2025 21:36:56 +0530 [thread overview]
Message-ID: <20250519160711.4024414-2-skori@marvell.com> (raw)
In-Reply-To: <20250519160711.4024414-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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index fa0002d321..4d02d622d6 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -670,6 +670,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
rte_prefetch0(rte_pktmbuf_mtod(pkts_burst[i + 1],
void *));
+ memset(&hdr_lens, 0, sizeof(struct rte_net_hdr_lens));
m = pkts_burst[i];
info.is_tunnel = 0;
info.pkt_len = rte_pktmbuf_pkt_len(m);
--
2.43.0
prev parent reply other threads:[~2025-05-19 16:07 UTC|newest]
Thread overview: 2+ 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 ` skori [this message]
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=20250519160711.4024414-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).