Re: [PATCH RESEND net-next v17 09/10] net: ethtool: Introduce ethtool command to list ports
From: Aleksei Sviridkin
Date: Thu Sep 24 2026 - 18:01:55 EST
On Thu, 10 Sep 2026 19:01:01 +0200, Maxime Chevallier wrote:
> --- /dev/null
> +++ b/net/ethtool/port.c
> [...]
> + ret = ethnl_put_bitset(skb, ETHTOOL_A_PORT_SUPPORTED_INTERFACES,
> + reply->interfaces, NULL,
> + PHY_INTERFACE_MODE_MAX,
> + phy_interface_names, compact);
The supported-interfaces bits are raw phy_interface_t values. OpenWrt's
layerscape kernel inserts PHY_INTERFACE_MODE_2500SGMII between
2500BASEX and 5GBASER, so on that kernel every bit above 2500BASEX
means something different than on mainline. With compact bitsets
userspace cannot notice. A string set or a uAPI enum for these names
would fix the numbering.
Aleksei