Re: [PATCH net-next 1/5] net/mlx5: Refactor EEPROM query error handling to return status separately

From: Gal Pressman

Date: Sun Nov 23 2025 - 02:11:24 EST


On 20/11/2025 1:11, Matthew W Carlis wrote:
> On Mon, 17 Nov 2025 23:42:05 +0200, Gal Pressman said
>
>> Matthew and Jakub reported [1] issues where inventory automation tools
>> are calling EEPROM query repeatedly on a port that doesn't have an SFP
>> connected, resulting in millions of error prints.
>
> I'm not very familiar with the networking stack in general, but I poked around a
> little trying to be able to come up with a meaningful review. I noticed that in
> ethtool there are two methods registered for "ethtool -m".. Looks like it first
> prefers a netlink method, but also may fall back on an ioctl implementation.
>
> Will users who end up in the ioctl path expect to see the kernel message? In the
> case of users who run "ethtool -m" on a device without a transceiver installed I
> think we should expect to see something as follows? (Is this correct?)
>
> $ ethtool -m ethx
> "netlink error: mlx5: Query module eeprom by page failed, read xxx bytes, err xxx, status xxx"
>
>
> Thank you for helping on this issue.
> -Matt

The ioctl is the "legacy" flow, maintained for backwards compatibility.

The mechanism to pass error messages to userspace (extack) does not
exist in ioctls, so the output you mentioned is relevant for the netlink
case.