From: <skori@marvell.com>
To: Jie Hai <haijie1@huawei.com>
Cc: <dev@dpdk.org>, Sunil Kumar Kori <skori@marvell.com>
Subject: [PATCH 1/2] net: fix offset calculation for GENEVE packet
Date: Mon, 19 May 2025 21:36:55 +0530 [thread overview]
Message-ID: <20250519160711.4024414-1-skori@marvell.com> (raw)
From: Sunil Kumar Kori <skori@marvell.com>
While parsing packet headers, offset must be added to get next
header but for geneve header parsing offset is overwritten.
Also inner_l2_len is not set in case of geneve packets.
Fixes: 64ed7f854cf4 ("net: add tunnel packet type parsing")
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
lib/net/rte_net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/net/rte_net.c b/lib/net/rte_net.c
index be24690fdf..8a3ebf8478 100644
--- a/lib/net/rte_net.c
+++ b/lib/net/rte_net.c
@@ -251,7 +251,8 @@ ptype_tunnel_with_udp(uint16_t *proto, const struct rte_mbuf *m,
if (unlikely(gnh == NULL))
return 0;
geneve_len = sizeof(*gnh) + gnh->opt_len * 4;
- *off = geneve_len;
+ hdr_lens->inner_l2_len = sizeof(struct rte_udp_hdr) + geneve_len;
+ *off += geneve_len;
*proto = gnh->proto;
if (gnh->proto == 0)
*proto = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
--
2.43.0
next 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 skori [this message]
2025-05-19 16:06 ` [PATCH 2/2] app/testpmd: clear stale internal len information skori
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-1-skori@marvell.com \
--to=skori@marvell.com \
--cc=dev@dpdk.org \
--cc=haijie1@huawei.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).