DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sunil Kumar Kori <skori@marvell.com>
To: huangdengdui <huangdengdui@huawei.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: RE: [EXTERNAL] Re: [PATCH v2 1/2] net: fix offset calculation for GENEVE packet
Date: Thu, 22 May 2025 06:12:53 +0000	[thread overview]
Message-ID: <CO6PR18MB3860D1A06FA62129E77B22A7B499A@CO6PR18MB3860.namprd18.prod.outlook.com> (raw)
In-Reply-To: <c6f6d3fb-2ecd-422c-b803-aa0af0b9096b@huawei.com>

> > diff --git a/lib/net/rte_net.c b/lib/net/rte_net.c index
> > be24690fdf..1264f33d61 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;
> > +		*off += geneve_len;
> > +		hdr_lens->inner_l2_len = sizeof(struct rte_udp_hdr) + geneve_len;
> 
> The l2_len in mbuf is also calculated from the outer L4 header, so it is calculated
> in the same way here.
> However, this is easy to be misunderstood, can we add a note to inner_l2_len as
> follows?
> 
> struct rte_net_hdr_lens {
> 	uint8_t l2_len;
> 	/* Outer_L4_len + ... + inner L2_len for tunneling pkt. */
> 	uint8_t inner_l2_len;
> 	uint16_t l3_len;
> 	uint16_t inner_l3_len;
> 	uint16_t tunnel_len;
> 	uint8_t l4_len;
> 	uint8_t inner_l4_len;
> };
> 
IMO, adding documentation should not be an issue and if you feel then please add into your mentioned series.
Other than this, if you find this patch okay then please ack.

  reply	other threads:[~2025-05-22  6:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-19 16:06 [PATCH " 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     ` [PATCH v2 2/2] app/testpmd: clear stale internal len information skori
2025-05-21  9:33     ` [PATCH v2 1/2] net: fix offset calculation for GENEVE packet huangdengdui
2025-05-22  6:12       ` Sunil Kumar Kori [this message]
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=CO6PR18MB3860D1A06FA62129E77B22A7B499A@CO6PR18MB3860.namprd18.prod.outlook.com \
    --to=skori@marvell.com \
    --cc=dev@dpdk.org \
    --cc=huangdengdui@huawei.com \
    --cc=stephen@networkplumber.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).