DPDK patches and discussions
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/testpmd Bug 1470] Testpmd parameter --max-pkt-len does not update MTU of ports bound to a kernel driver
Date: Fri, 21 Jun 2024 17:37:36 +0000	[thread overview]
Message-ID: <bug-1470-3@http.bugs.dpdk.org/> (raw)

[-- Attachment #1: Type: text/plain, Size: 2755 bytes --]

https://bugs.dpdk.org/show_bug.cgi?id=1470

            Bug ID: 1470
           Summary: Testpmd parameter --max-pkt-len does not update MTU of
                    ports bound to a kernel driver
           Product: DPDK
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: testpmd
          Assignee: dev@dpdk.org
          Reporter: jspewock@iol.unh.edu
  Target Milestone: ---

If testpmd is started with the parameter --max-pkt-len, the expected behavior
would be that the MTU of the port is updated to what that value is set to. In
the case of devices that use a kernel driver while running testpmd (like
mlx5_core for example), `show port info` will show that the MTU is the value
that you set --max-pkt-len to. However, if you look at the network interface
for the same port using the `ip a` command, it will report the unchanged MTU of
the port. Additionally, all packets that are higher than the MTU reported by
the kernel network interface will be dropped, regardless of whether or not the
value given to --max-pkt-len is high enough to handle them.

If, however, you run the command `port config all max-pkt-len 9000`, the mtu of
the kernel network interface will be updated to 8982 and the mtu listed by
`show port info 0` will match. The documentation listed here [1] says that this
command "is equivalent to the --max-pkt-len command-line option." but the two
have different outcomes. Also, as a note, if you set the mtu using `port config
mtu 0 9000`, the mtu of the kernel network interface and the MTU displayed by
`show port info 0` will match and both be 9000.

For example, starting testpmd in interactive mode on a NIC running on the
mlx5_core driver with the parameter `--max-pkt-len=9000` and then running `show
port info 0` will show "MTU: 8982". However, on the same host, while testpmd is
running, if I run `ip a` the MTU of the interface for this port is set to 1500
and any packet larger than 1500 bytes will get dropped. If you then run `port
stop all` followed by `port config all max-pkt-len 9000`, you can run `show
port info 0` and you will see the same mtu value, 8982, but then if you run `ip
a` you will see that the kernel network interface also has this updated MTU
value. Only then, after starting the ports again, can you send packets larger
than 1500 bytes.

The MTU listed in `show port info` seems to be more accurate when bound to
vfio-pci instead, however. 

[1]
https://doc.dpdk.org/guides/testpmd_app_ug/testpmd_funcs.html#port-config-max-pkt-len

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #2: Type: text/html, Size: 4767 bytes --]

             reply	other threads:[~2024-06-21 17:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-21 17:37 bugzilla [this message]
2024-07-24 11:14 ` bugzilla

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=bug-1470-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --cc=dev@dpdk.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).