From: Dengdui Huang <huangdengdui@huawei.com>
To: <dev@dpdk.org>
Cc: <stephen@networkplumber.org>, <jasvinder.singh@intel.com>,
<thomas@monjalon.net>, <aman.deep.singh@intel.com>,
<lihuisong@huawei.com>, <fengchengwen@huawei.com>
Subject: [PATCH v3 3/4] net: fix GENEVE packet parsing
Date: Fri, 16 May 2025 17:28:39 +0800 [thread overview]
Message-ID: <20250516092840.2061252-4-huangdengdui@huawei.com> (raw)
In-Reply-To: <20250516092840.2061252-1-huangdengdui@huawei.com>
When the GENEVE packet is processed, the offset is
not changed correctly. As a result, the inner packet
is incorrectly parsed. This patch fixes it.
Fixes: 64ed7f854cf4 ("net: add tunnel packet type parsing")
Cc: stable@dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
lib/net/rte_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/net/rte_net.c b/lib/net/rte_net.c
index 67d57d5f04..cd8cc0d0c8 100644
--- a/lib/net/rte_net.c
+++ b/lib/net/rte_net.c
@@ -260,7 +260,7 @@ 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;
+ *off += geneve_len;
hdr_lens->tunnel_len = geneve_len;
*proto = gnh->proto;
if (gnh->proto == 0)
--
2.33.0
next prev parent reply other threads:[~2025-05-16 9:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 8:43 [PATCH] net: fix GTP " Dengdui Huang
2025-04-11 9:54 ` Jie Hai
2025-04-17 12:37 ` [PATCH v2] " Dengdui Huang
2025-05-06 6:02 ` huangdengdui
2025-05-16 9:28 ` [PATCH v3 0/4] bugfix about parse tunnel packet with UDP Dengdui Huang
2025-05-16 9:28 ` [PATCH v3 1/4] net: fix GTP packet parsing Dengdui Huang
2025-05-16 9:28 ` [PATCH v3 2/4] net: fix parse the tunnel length of tunnel packet with UDP Dengdui Huang
2025-05-16 9:28 ` Dengdui Huang [this message]
2025-05-16 9:28 ` [PATCH v3 4/4] app/testpmd: fix obtain inner info of tunnel packet Dengdui Huang
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=20250516092840.2061252-4-huangdengdui@huawei.com \
--to=huangdengdui@huawei.com \
--cc=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=jasvinder.singh@intel.com \
--cc=lihuisong@huawei.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/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).