* [PATCH 0/2] L4 protocol retrieval from L3 header @ 2025-11-05 2:47 Mingjin Ye 2025-11-05 2:47 ` [PATCH 1/2] app/testpmd: revert " Mingjin Ye 2025-11-05 2:47 ` [PATCH 2/2] app/testpmd: fix the IPv6 extension offset Mingjin Ye 0 siblings, 2 replies; 6+ messages in thread From: Mingjin Ye @ 2025-11-05 2:47 UTC (permalink / raw) To: dev; +Cc: Mingjin Ye Mainly processed the IPv6 extension header without offsetting to the start position of the extension header. The parsed inner protocol is incorrect. Mingjin Ye (2): app/testpmd: revert L4 protocol retrieval from L3 header app/testpmd: fix the IPv6 extension offset app/test-pmd/csumonly.c | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] app/testpmd: revert L4 protocol retrieval from L3 header 2025-11-05 2:47 [PATCH 0/2] L4 protocol retrieval from L3 header Mingjin Ye @ 2025-11-05 2:47 ` Mingjin Ye 2025-11-10 9:56 ` fengchengwen 2025-11-05 2:47 ` [PATCH 2/2] app/testpmd: fix the IPv6 extension offset Mingjin Ye 1 sibling, 1 reply; 6+ messages in thread From: Mingjin Ye @ 2025-11-05 2:47 UTC (permalink / raw) To: dev; +Cc: Mingjin Ye, stable, Aman Singh This reverts commit 496159613ffc7b6ba592432a1ba4d1a38f6935de. When the TX IP checksum offload feature is enabled, it may result in internal UDP checksum errors in VXLAN tunnel packets. Fixes: 496159613ffc ("app/testpmd: fix L4 protocol retrieval from L3 header") Cc: stable@dpdk.org Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com> --- app/test-pmd/csumonly.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index a6e872e5a4..d355dbd8c0 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -525,8 +525,20 @@ get_tunnel_ol_flags_by_ptype(uint32_t ptype) } } +static void +parse_inner_l4_proto(void *outer_l3_hdr, + struct testpmd_offload_info *info) +{ + struct rte_ipv4_hdr *ipv4_hdr = outer_l3_hdr; + struct rte_ipv6_hdr *ipv6_hdr = outer_l3_hdr; + if (info->ethertype == _htons(RTE_ETHER_TYPE_IPV4)) + info->l4_proto = ipv4_hdr->next_proto_id; + else + info->l4_proto = ipv6_hdr->proto; +} + static uint8_t -parse_l4_proto(const struct rte_mbuf *m, uint32_t off, uint32_t ptype, bool parse_inner) +parse_l4_proto(const struct rte_mbuf *m, uint32_t off, uint32_t ptype) { int frag = 0, ret; @@ -545,19 +557,16 @@ parse_l4_proto(const struct rte_mbuf *m, uint32_t off, uint32_t ptype, bool pars if (unlikely(ip6h == NULL)) return 0; - if (!parse_inner && (ptype & RTE_PTYPE_L3_MASK) != RTE_PTYPE_L3_IPV6_EXT) - return ip6h->proto; - - if (parse_inner && (ptype & RTE_PTYPE_INNER_L3_MASK) != RTE_PTYPE_INNER_L3_IPV6_EXT) - return ip6h->proto; + if ((ptype & RTE_PTYPE_INNER_L3_MASK) == + RTE_PTYPE_INNER_L3_IPV6_EXT) { + ret = rte_net_skip_ip6_ext(ip6h->proto, m, &off, &frag); + if (ret < 0) + return 0; + return ret; + } - off += sizeof(struct rte_ipv6_hdr); - ret = rte_net_skip_ip6_ext(ip6h->proto, m, &off, &frag); - if (ret < 0) - return 0; - return ret; + return ip6h->proto; } - return 0; } @@ -696,7 +705,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) info.l4_len = hdr_lens.l4_len; info.ethertype = get_ethertype_by_ptype(eth_hdr, ptype & RTE_PTYPE_L3_MASK); - info.l4_proto = parse_l4_proto(m, info.l2_len, ptype, false); + info.l4_proto = parse_l4_proto(m, info.l2_len, ptype); l3_hdr = (char *)eth_hdr + info.l2_len; /* check if it's a supported tunnel */ @@ -714,11 +723,9 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) } /* update l3_hdr and outer_l3_hdr if a tunnel was parsed */ if (info.is_tunnel) { - uint16_t l3_off = info.outer_l2_len + info.outer_l3_len + info.l2_len; - outer_l3_hdr = l3_hdr; l3_hdr = (char *)l3_hdr + info.outer_l3_len + info.l2_len; - info.l4_proto = parse_l4_proto(m, l3_off, ptype, true); + parse_inner_l4_proto(l3_hdr, &info); } /* step 2: depending on user command line configuration, * recompute checksum either in software or flag the -- 2.25.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] app/testpmd: revert L4 protocol retrieval from L3 header 2025-11-05 2:47 ` [PATCH 1/2] app/testpmd: revert " Mingjin Ye @ 2025-11-10 9:56 ` fengchengwen 2025-11-12 9:01 ` Ye, MingjinX 0 siblings, 1 reply; 6+ messages in thread From: fengchengwen @ 2025-11-10 9:56 UTC (permalink / raw) To: Mingjin Ye, dev; +Cc: stable, Aman Singh Hi Mingjin, Could you please detail the step of testcase? we will try to reproduce it and see how to solve it. Thanks. On 11/5/2025 10:47 AM, Mingjin Ye wrote: > This reverts commit 496159613ffc7b6ba592432a1ba4d1a38f6935de. > > When the TX IP checksum offload feature is enabled, it may result in > internal UDP checksum errors in VXLAN tunnel packets. > > Fixes: 496159613ffc ("app/testpmd: fix L4 protocol retrieval from L3 header") > Cc: stable@dpdk.org > > Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 1/2] app/testpmd: revert L4 protocol retrieval from L3 header 2025-11-10 9:56 ` fengchengwen @ 2025-11-12 9:01 ` Ye, MingjinX 2025-11-13 12:20 ` fengchengwen 0 siblings, 1 reply; 6+ messages in thread From: Ye, MingjinX @ 2025-11-12 9:01 UTC (permalink / raw) To: fengchengwen, dev; +Cc: stable, Singh, Aman Deep Hi Chengwen, Please refer to Bugzilla for more information. Bugzilla: https://bugs.dpdk.org/show_bug.cgi?id=1813 Thanks~ > -----Original Message----- > From: fengchengwen <fengchengwen@huawei.com> > Sent: Monday, November 10, 2025 5:56 PM > To: Ye, MingjinX <mingjinx.ye@intel.com>; dev@dpdk.org > Cc: stable@dpdk.org; Singh, Aman Deep <aman.deep.singh@intel.com> > Subject: Re: [PATCH 1/2] app/testpmd: revert L4 protocol retrieval from L3 > header > > Hi Mingjin, > > Could you please detail the step of testcase? we will try to reproduce it and > see how to solve it. > > Thanks. > > On 11/5/2025 10:47 AM, Mingjin Ye wrote: > > This reverts commit 496159613ffc7b6ba592432a1ba4d1a38f6935de. > > > > When the TX IP checksum offload feature is enabled, it may result in > > internal UDP checksum errors in VXLAN tunnel packets. > > > > Fixes: 496159613ffc ("app/testpmd: fix L4 protocol retrieval from L3 > > header") > > Cc: stable@dpdk.org > > > > Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] app/testpmd: revert L4 protocol retrieval from L3 header 2025-11-12 9:01 ` Ye, MingjinX @ 2025-11-13 12:20 ` fengchengwen 0 siblings, 0 replies; 6+ messages in thread From: fengchengwen @ 2025-11-13 12:20 UTC (permalink / raw) To: Ye, MingjinX, dev; +Cc: stable, Singh, Aman Deep Hi Mingjin, We have reproduce this bug in our platform, and trying to fix the solution. Thanks On 11/12/2025 5:01 PM, Ye, MingjinX wrote: > Hi Chengwen, > > Please refer to Bugzilla for more information. > Bugzilla: https://bugs.dpdk.org/show_bug.cgi?id=1813 > > Thanks~ > >> -----Original Message----- >> From: fengchengwen <fengchengwen@huawei.com> >> Sent: Monday, November 10, 2025 5:56 PM >> To: Ye, MingjinX <mingjinx.ye@intel.com>; dev@dpdk.org >> Cc: stable@dpdk.org; Singh, Aman Deep <aman.deep.singh@intel.com> >> Subject: Re: [PATCH 1/2] app/testpmd: revert L4 protocol retrieval from L3 >> header >> >> Hi Mingjin, >> >> Could you please detail the step of testcase? we will try to reproduce it and >> see how to solve it. >> >> Thanks. >> >> On 11/5/2025 10:47 AM, Mingjin Ye wrote: >>> This reverts commit 496159613ffc7b6ba592432a1ba4d1a38f6935de. >>> >>> When the TX IP checksum offload feature is enabled, it may result in >>> internal UDP checksum errors in VXLAN tunnel packets. >>> >>> Fixes: 496159613ffc ("app/testpmd: fix L4 protocol retrieval from L3 >>> header") >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com> > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] app/testpmd: fix the IPv6 extension offset 2025-11-05 2:47 [PATCH 0/2] L4 protocol retrieval from L3 header Mingjin Ye 2025-11-05 2:47 ` [PATCH 1/2] app/testpmd: revert " Mingjin Ye @ 2025-11-05 2:47 ` Mingjin Ye 1 sibling, 0 replies; 6+ messages in thread From: Mingjin Ye @ 2025-11-05 2:47 UTC (permalink / raw) To: dev; +Cc: Mingjin Ye, stable, Aman Singh The skip ipv6 extension must be offset after the IPv6 header. Fixes: 76730c7b9b5a ("app/testpmd: use packet type parsing API") Cc: stable@dpdk.org Signed-off-by: Mingjin Ye <mingjinx.ye@intel.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 d355dbd8c0..4b24bde190 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -559,6 +559,7 @@ parse_l4_proto(const struct rte_mbuf *m, uint32_t off, uint32_t ptype) if ((ptype & RTE_PTYPE_INNER_L3_MASK) == RTE_PTYPE_INNER_L3_IPV6_EXT) { + off += sizeof(struct rte_ipv6_hdr); ret = rte_net_skip_ip6_ext(ip6h->proto, m, &off, &frag); if (ret < 0) return 0; -- 2.25.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-11-13 12:20 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-11-05 2:47 [PATCH 0/2] L4 protocol retrieval from L3 header Mingjin Ye 2025-11-05 2:47 ` [PATCH 1/2] app/testpmd: revert " Mingjin Ye 2025-11-10 9:56 ` fengchengwen 2025-11-12 9:01 ` Ye, MingjinX 2025-11-13 12:20 ` fengchengwen 2025-11-05 2:47 ` [PATCH 2/2] app/testpmd: fix the IPv6 extension offset Mingjin Ye
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).