Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From 59a86088dcd9c6b19ca8e8ea1ffcc3f11abc5b1d Mon Sep 17 00:00:00 2001
From: Nataliia Solomko <natalirs1985@gmail.com>
Date: Mon, 31 Aug 2026 16:38:06 +0300
Subject: [PATCH] dpdk: T9161: expose NIC max mtu and frame overhead in show
hardware-interfaces

'show hardware-interfaces' prints only 'max rx packet len'
(rte_eth_dev_info.max_rx_pktlen, the maximum RX packet length), which is not
the maximum settable MTU - the two differ on some drivers (e.g. VMware
VMXNET3: max_mtu 9000 vs a max rx packet len of 16384). Print
rte_eth_dev_info.max_mtu ('max mtu') and xd->driver_frame_overhead so the
true per-NIC MTU limit is queryable (VyOS uses it to reject an MTU the
dataplane cannot honor, which would otherwise be silently capped while the
kernel keeps the larger value).

A max_mtu of UINT16_MAX is the PMD's "unknown/no limit" sentinel, which VPP
itself distrusts (dpdk_set_max_frame_size guards on it), so render it as
'unknown' rather than 65535 to avoid a consumer treating it as a real limit.
---
src/plugins/dpdk/device/format.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c
index f0199c9..0405a82 100644
--- a/src/plugins/dpdk/device/format.c
+++ b/src/plugins/dpdk/device/format.c
@@ -496,6 +496,13 @@ format_dpdk_device (u8 * s, va_list * args)

s = format (s, "%Umax rx packet len: %d\n", format_white_space, indent + 2,
di.max_rx_pktlen);
+ if (di.max_mtu == UINT16_MAX)
+ s = format (s, "%Umax mtu: unknown\n", format_white_space, indent + 2);
+ else
+ s = format (s, "%Umax mtu: %d\n", format_white_space, indent + 2,
+ di.max_mtu);
+ s = format (s, "%Udriver frame overhead: %d\n", format_white_space, indent + 2,
+ xd->driver_frame_overhead);
s = format (s, "%Upromiscuous: unicast %s all-multicast %s\n",
format_white_space, indent + 2,
rte_eth_promiscuous_get (xd->port_id) ? "on" : "off",
--
2.51.0

Loading