Re: [PATCH net-next v3 10/11] netlink: specs: Add ethernet port listing with ethtool

From: Simon Horman

Date: Tue Feb 03 2026 - 13:00:46 EST


On Sun, Feb 01, 2026 at 04:12:47PM +0100, Maxime Chevallier wrote:

...

> diff --git a/Documentation/networking/ethtool-netlink.rst b/Documentation/networking/ethtool-netlink.rst
> index af56c304cef4..3e673755800b 100644
> --- a/Documentation/networking/ethtool-netlink.rst
> +++ b/Documentation/networking/ethtool-netlink.rst
> @@ -2522,6 +2522,40 @@ Within each channel nest, only the metrics supported by the PHY will be present.
> See ``struct phy_mse_snapshot`` kernel documentation in
> ``include/linux/phy.h``.
>
> +PORT_GET
> +========
> +
> +Retrieve information about the physical connection points of a network device,
> +referred to as "ports". User needs to specify a PORT_ID for the DO operation,
> +in which case the DO request returns information about that specific port.
> +
> +As there can be more than one port, the DUMP operation can be used to list the
> +ports present on a given interface, by passing an interface index or name in
> +the dump request.
> +
> +Request contents:
> +
> +==================================== ====== =================================

Hi Maxime,

make htmldocs complains that "Bottom/header table border does not match top
border.".

> + ``ETHTOOL_A_PORT_HEADER`` nested request header
> + ``ETHTOOL_A_PORT_ID`` u32 port id
> + ==================================== ====== ===============================
> +
> +Kernel response contents:
> +
> + ===================================== ====== =============================
> + ``ETHTOOL_A_PORT_HEADER`` nested request header
> + ``ETHTOOL_A_PORT_ID`` u32 the port's unique identifier,
> + per netdevice.
> + ``ETHTOOL_A_PORT_SUPPORTED_MODES`` bitset bitset of supported linkmodes
> + ``ETHTOOL_A_PORT_SUPPORTED_INTERFACES`` bitset bitset of supported MII
> + interfaces
> + ``ETHTOOL_A_PORT_TYPE`` u8 the port type
> + ``ETHTOOL_A_PORT_VACANT`` u8 for non-mdi ports, indicates
> + if the port is connected to
> + another device that could
> + expose a MDI
> + ===================================== ====== =============================
> +
> Request translation
> ===================
>