DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nicholas Pratte <npratte@iol.unh.edu>
To: Alex Chapman <alex.chapman@arm.com>
Cc: probb@iol.unh.edu, dmarx@iol.unh.edu, jspewock@iol.unh.edu,
	 luca.vizzarro@arm.com, yoan.picchi@foss.arm.com,
	Honnappa.Nagarahalli@arm.com,  paul.szczepanek@arm.com,
	juraj.linkes@pantheon.tech, dev@dpdk.org
Subject: Re: [RFC PATCH v3 2/2] dts: Initial Implementation For Jumbo Frames Test Suite
Date: Thu, 29 Aug 2024 15:04:46 -0400	[thread overview]
Message-ID: <CAKXZ7eiY5tPVnV8f6AYd+3+AAeB4OJMm4hf1cmU9c0cDn_6DUw@mail.gmail.com> (raw)
In-Reply-To: <7c2a0677-9815-4d6c-aeb8-6f35966db7d8@arm.com>

Hi Alex, thanks for the review!

See my comments below.

<snip>
> > +IP_HEADER_LEN = 20
> > +ETHER_STANDARD_FRAME = 1500
> > +ETHER_JUMBO_FRAME_MTU = 9000
>
> For these constants, I am confused why one is "FRAME" and the other is
> "MTU". The value of 'ETHER_STANDARD_FRAME' is 1500 (the standard MTU
> size), it would make sense to rename it to 'ETHER_STANDARD_MTU', to keep
> naming consistent.
>
> If the value was 1518 instead of 1500, then `ETHER_STANDARD_FRAME` would
> be appropriate.

You are correct! I will make the changes.
>
<snip>
> Renaming 'ETHER_STANDARD_FRAME' to 'ETHER_STANDARD_MTU' would reduce
> confusion here too.
> e.g.
> `testpmd.configure_port_mtu_all(ETHER_STANDARD_MTU)`
>
> Additionally, you state you are sending packets of sizes 1517 and 1518.
> but you then call:
> `self.send_packet_and_verify(ETHER_STANDARD_FRAME - 5)`
> `self.send_packet_and_verify(ETHER_STANDARD_FRAME)`

Ack. I must have missed the docstring when I adjusted the boundaries
at which we test jumbo frame sizes ethernet overhead issues we've been
having. Adding the +5, -5 bytes is sort of a temporary
measure/placeholder while we wait to gather more information on how to
properly assess and test the ethernet overhead issue. See my next
comment for more clarification.
>
> Calculating to:
> `self.send_packet_and_verify(1495)`
> `self.send_packet_and_verify(1500)`
>
> Which is confusing.
> I believe this is because you are accounting for the 4 bytes of VLAN's
> in your calculations, but you might want to explain this.

What the +5 bytes situation really is for, currently, is to assess the
boundaries of a set MTU size, sorry for the confusion there. For
example, if we have a MTU of 1500, some vendors assume an ethernet
overhead of +22 bytes on top of the 1500 byte MTU (for a total frame
size of 1522 bytes), and other vendors, such as Mellanox, add +18
bytes of ethernet overhead +1500 byte MTU (for a total frame size of
1518). The +5 tries to compensate for this by adding +5 or -5 bytes to
properly test greater than or less than a 1500 byte MTU for all
vendors, but this gets tricky when you are trying to run tests at the
MTU size itself. If you look back to the oldest version I have of this
suite, you'll see that each test case was originally sending 1499 byte
packets, 1501 packets, and 1500 packets in some cases, but we can't
run tests like this because of the differing assumptions from vendor
to vendor (you can find the old suite in a different email thread, I
messed up the sending of the series so I apologize for that).

Here's the original version of this patch:
https://inbox.dpdk.org/dev/20240524183604.6925-2-npratte@iol.unh.edu/

The calculation of ethernet overhead basically comes down to a single
'if' statement in testpmd's code. You can find this method in
testpmd.c and do some digging if you're interested (look under
'app/test-pmd/testpmd.c' and search for 'get_eth_overhead')

>
>
> Overall very solid and clean test suite, just wanted to get
> clarification on a few areas 🙂.
> Alex

I wrote this test suite a while back when I was just starting out, and
a lot of this information was new to me at the time, so it's not
surprising to see some of the misuse of definitions you've laid out
here; I appreciate the feedback!

-Nicholas

      reply	other threads:[~2024-08-29 19:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-24 18:36 [RFC PATCH 0/1] Initial Implementation For Jumbo Frames Nicholas Pratte
2024-05-24 18:36 ` [RFC PATCH] Initial Implementation For Jumbo Frames Test Suite Nicholas Pratte
2024-07-26 14:09   ` [RFC PATCH v3 0/2] Initial Implementation For Jumbo Frames Nicholas Pratte
2024-06-21 21:13 ` [RFC PATCH v2 0/1] " Nicholas Pratte
2024-06-21 21:19 ` [RFC PATCH v2] Initial Implementation For Jumbo Frames Test Suite Nicholas Pratte
2024-06-21 22:18   ` Stephen Hemminger
2024-06-21 23:54     ` Honnappa Nagarahalli
2024-06-25 19:57       ` Nicholas Pratte
2024-06-25 21:57         ` Thomas Monjalon
2024-07-01 16:45           ` Nicholas Pratte
2024-06-25 23:49         ` Stephen Hemminger
2024-07-26 14:13 ` [RFC PATCH v3 0/2] Initial Implementation For Jumbo Frames Nicholas Pratte
2024-07-26 14:13   ` [RFC PATCH v3 1/2] dts: add port config mtu options to testpmd shell Nicholas Pratte
2024-08-02 19:54     ` Jeremy Spewock
2024-08-22  9:14       ` Juraj Linkeš
2024-07-26 14:13   ` [RFC PATCH v3 2/2] dts: Initial Implementation For Jumbo Frames Test Suite Nicholas Pratte
2024-08-02 19:54     ` Jeremy Spewock
2024-08-28  9:52     ` Alex Chapman
2024-08-29 19:04       ` Nicholas Pratte [this message]

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=CAKXZ7eiY5tPVnV8f6AYd+3+AAeB4OJMm4hf1cmU9c0cDn_6DUw@mail.gmail.com \
    --to=npratte@iol.unh.edu \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=alex.chapman@arm.com \
    --cc=dev@dpdk.org \
    --cc=dmarx@iol.unh.edu \
    --cc=jspewock@iol.unh.edu \
    --cc=juraj.linkes@pantheon.tech \
    --cc=luca.vizzarro@arm.com \
    --cc=paul.szczepanek@arm.com \
    --cc=probb@iol.unh.edu \
    --cc=yoan.picchi@foss.arm.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).