DPDK patches and discussions
 help / color / mirror / Atom feed
From: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>
To: dev@dpdk.org, ivan.malov@arknetworks.am,
	jasvinder.singh@intel.com, bruce.richardson@intel.com
Cc: thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, stable@dpdk.org
Subject: Re: [PATCH] net/rte_net: fix inner L2 length for tunneled Ethernet packets
Date: Tue, 29 Jul 2025 01:06:47 -0400	[thread overview]
Message-ID: <20250729050647.52745-1-14pwcse1224@uetpeshawar.edu.pk> (raw)
In-Reply-To: <e7c3c2b2-5f7a-eec4-cbd8-cd17ecec4c46@arknetworks.am>

Hi Ivan, 

No, it does not breaking testpmd or any other applications. 
Yes, the structure is correct in rte_net.h and comment as well.

You can run testpmd in rxonly mode and set verbose to 3, send the following packet from remote and you will observe the output as given below: 

pkt=Ether(src="04:3f:72:f3:7a:43",dst="C8:0A:A9:04:49:1A")/IP(src="19.168.1.1",dst="19.168.1.1")/UDP(dport=4789)/VXLAN(vni=4094)/Ether(dst="22:11:11:11:11:10")/IP(dst="19.168.1.1")/UDP()


port 0/queue 0: received 1 packets
  src=04:3F:72:F3:7A:43 - dst=C8:0A:A9:04:49:1A - pool=mb_pool_0 - type=0x0800 - length=92 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER L3_IPV4 L4_UDP TUNNEL_VXLAN INNER_L2_ETHER INNER_L3_IPV4 INNER_L4_UDP  - l2_len=14 - l3_len=20 - l4_len=8 - tunnel_len=8 - inner_l2_len=30 - inner_l3_len=20 - inner_l4_len=8 - Destination UDP port=4789 - Receive queue=0x0
  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN 

The length is 92 bytes which is correct but inner_l2_len=30 which is incorrect. According to standard, the following calculation is true of VXLAN header (50 bytes) and VXLAN packet size(92 bytes).

50-byte VXLAN header =(14-byte outer ethernet header + 20-byte outer IP header + 8-byte outer UDP header + 8-byte VXLAN header ) 

 92-bytes VXLAN packet size= (14-byte outer Ethernet header + 20-byte outer IP header + 8-byte outer UDP header + 8-byte VXLAN header )+ (14-byte inner Ethernet header + 20-byte inner IP header  + 8-byte inner UDP) 

This patch correct the inner_l2_len which is 14 bytes.

  reply	other threads:[~2025-07-29  5:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-28 13:12 Khadem Ullah
2025-07-28 13:28 ` Ivan Malov
2025-07-29  5:06   ` Khadem Ullah [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-07-28 12:30 Khadem Ullah
2025-07-28 12:21 Khadem Ullah

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=20250729050647.52745-1-14pwcse1224@uetpeshawar.edu.pk \
    --to=14pwcse1224@uetpeshawar.edu.pk \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ivan.malov@arknetworks.am \
    --cc=jasvinder.singh@intel.com \
    --cc=stable@dpdk.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).