From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Michal Kubecek <mkubecek@suse.cz>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Jakub Kicinski <kuba@kernel.org>,
davem@davemloft.net, Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>
Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>,
netdev@vger.kernel.org,
Christophe Leroy <christophe.leroy@csgroup.eu>,
thomas.petazzoni@bootlin.com
Subject: [PATCH ethtool-next 0/2] ethtool: Introduce the --show-ports command
Date: Wed, 18 Nov 2026 16:05:20 +0100 [thread overview]
Message-ID: <20261118150523.2762733-1-maxime.chevallier@bootlin.com> (raw)
Hi everyone,
Following the merge of the phy_port GET ethnl command into net-next,
here's the ethtool counterpart that uses that commande to enumerate the
ports and their capabilities. This is queued for v7.4.
The output looks like this:
# ethtool --show-ports *
Port for eth0:
Port id: 1
Port type: mdi
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Port for eth0:
Port id: 2
Port type: sfp
Supported MII interfaces: 10gbase-r
Port for eth2:
Port id: 1
Port type: mdi
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Port for eth3:
Port id: 1
Port type: sfp
Supported MII interfaces: sgmii 1000base-x 2500base-x
Port for eth3:
Port id: 2
Port type: mdi
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
1000baseX/Full
Upstream port id: 1
Patch 1 syncs the kernel headers, and patch 2 implements the
--show-ports command.
Thanks,
Maxime
Maxime Chevallier (2):
update UAPI header copies
ethtool: Introduce a command to list an interface's ports
Makefile.am | 1 +
ethtool.8.in | 30 ++++++
ethtool.c | 6 ++
netlink/extapi.h | 2 +
netlink/port.c | 134 +++++++++++++++++++++++++
uapi/linux/ethtool.h | 2 +
uapi/linux/ethtool_netlink_generated.h | 22 ++++
uapi/linux/if_addr.h | 1 +
uapi/linux/if_link.h | 1 +
uapi/linux/netlink.h | 14 +++
10 files changed, 213 insertions(+)
create mode 100644 netlink/port.c
--
2.56.1
next reply other threads:[~2026-11-18 15:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 15:05 Maxime Chevallier [this message]
2026-11-18 15:05 ` [PATCH ethtool-next 1/2] update UAPI header copies Maxime Chevallier
2026-11-18 15:05 ` [PATCH ethtool-next 2/2] ethtool: Introduce a command to list an interface's ports Maxime Chevallier
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=20261118150523.2762733-1-maxime.chevallier@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=christophe.leroy@csgroup.eu \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=thomas.petazzoni@bootlin.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