Re: [PATCH net-next v2 1/2] net: macb: implement ethtool_ops.get|set_channels()
From: Jakub Kicinski
Date: Sat Mar 14 2026 - 10:54:47 EST
On Fri, 13 Mar 2026 16:14:23 +0100 Théo Lebrun wrote:
> > should we reorder this with the running() check?
>
> I don't agree. For example when an operation is not supported, we start
> by checking that and returning EOPNOTSUPP. Then we validate the input
> data. Then we act.
>
> Here it is the same. When netif_running(), we never reply to any
> request even if it happens to be a no-op.
>
> I'll go ahead and send V3. Seeing how this was only a question I'll make
> the guess you don't care much about it and are fine either way.
> Same for me.
Sorry for the delay. This code can only be reached from the IOCTL path.
The Netlink path will check that params haven't changed in
ethnl_set_channels() (look at the @mod variable) and return 0 directly.
So you're basically adding a discrepancy between ioctl and Netlink.
Not a huge deal but I don't envy any user having to debug this..