Re: [PATCH net-next v7 10/10] net: ethtool: Introduce ethtool command to list ports

From: Maxime Chevallier

Date: Wed Mar 18 2026 - 03:28:31 EST


Hi again Jakub

On 13/03/2026 03:07, Jakub Kicinski wrote:
> On Mon, 9 Mar 2026 16:27:46 +0100 Maxime Chevallier wrote:
>> Expose the phy_port information to userspace, so that we can know how
>> many ports are available on a given interface, as well as their
>> capabilities. For MDI ports, we report the list of supported linkmodes
>> based on what the PHY that drives this port says.
>> For MII ports, i.e. empty SFP cages, we report the MII linkmodes that we
>> can output on this port.
>

[...]

>> +// SPDX-License-Identifier: GPL-2.0-only
>> +/*
>> + * Copyright 2026 Bootlin
>> + *
>> + */
>
> so many lines for a copyright :(
>
>> +#include "common.h"
>> +#include "bitset.h"
>> +#include "netlink.h"
>
> alpha sort

So that's not as easy as it looks, "bitset.h" is really barebones and
needs definitions for stuff like ETH_GSTRING_LEN, but also all the
u32/bool types, etc.

In all files in net/ethtool/*.c the local includes list isnt' properly
sorted due to that.

So either we fix that, or keep them sorted that way. If you have a
preference let me know, for now I'm letting these out of order but I
can sort this out (pun intended) if you think it's worth :)

Maxime