[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4fc23941-7fbe-4558-9f6e-2e08630eec0c@intel.com>
Date: Mon, 6 Oct 2025 17:03:04 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Dawid Osuchowski <dawid.osuchowski@...ux.intel.com>, Kohei Enju
<enjuk@...zon.com>, <intel-wired-lan@...ts.osuosl.org>,
<netdev@...r.kernel.org>
CC: Tony Nguyen <anthony.l.nguyen@...el.com>, Przemek Kitszel
<przemyslaw.kitszel@...el.com>, Andrew Lunn <andrew+netdev@...n.ch>, "David
S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, "Jakub
Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Auke Kok
<auke-jan.h.kok@...el.com>, Jeff Garzik <jgarzik@...hat.com>, Sasha Neftin
<sasha.neftin@...el.com>, Richard Cochran <richardcochran@...il.com>,
<kohei.enju@...il.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use
EOPNOTSUPP instead of ENOTSUPP
On 10/6/2025 7:09 AM, Dawid Osuchowski wrote:
> On 2025-10-06 2:35 PM, Kohei Enju wrote:
>> This series fixes inconsistent errno usage in igb/igc/ixgbe. The drivers
>> return -ENOTSUPP instead of -EOPNOTSUPP in specific ethtool and PTP
>> functions, therefore userland programs would get "Unknown error 524".
>>
>> Use -EOPNOTSUPP instead of -ENOTSUPP to fix the issue.
>>
>> This series covers all incorrect usage of ENOTSUPP in Intel ethernet
>> drivers except the one in iavf, which should be targeted for iwl-next in
>> a separate series since it's just a comment. [1]
>>
>> For igb and igc, I used a simple reproducer for testing [2] on I350 and
>> I226-V respectively.
>> Without this series:
>> # strace -e ioctl ./errno-repro
>> ioctl(3, SIOCETHTOOL, 0x7ffcde13cec0) = -1 ENOTSUPP (Unknown error 524)
>>
>> With this series:
>> # strace -e ioctl ./errno-repro
>> ioctl(3, SIOCETHTOOL, 0x7ffd69a28c40) = -1 EOPNOTSUPP (Operation not supported)
>>
>> For ixgbe, I used the testptp for testing on 82599ES.
>> Without this series:
>> # strace -e ioctl ./testptp -d /dev/ptp1 -P 1
>> ioctl(3, PTP_ENABLE_PPS, 0x1) = -1 ENOTSUPP (Unknown error 524)
>>
>> With this series:
>> # strace -e ioctl ./testptp -d /dev/ptp1 -P 1
>> ioctl(3, PTP_ENABLE_PPS, 0x1) = -1 EOPNOTSUPP (Operation not supported)
>>
>> [1]
>> $ grep -nrI ENOTSUPP .
>> ./igc/igc_ethtool.c:813: return -ENOTSUPP;
>> ./igb/igb_ethtool.c:2284: return -ENOTSUPP;
>> ./ixgbe/ixgbe_ptp.c:644: return -ENOTSUPP;
>> ./iavf/iavf_main.c:2966: * if the error isn't -ENOTSUPP
>>
>> [2]
>> #include <sys/ioctl.h>
>> #include <net/if.h>
>> #include <string.h>
>> #include <unistd.h>
>> #include <linux/sockios.h>
>> #include <linux/ethtool.h>
>>
>> int main() {
>> int sock = socket(AF_INET, SOCK_DGRAM, 0);
>> struct ethtool_gstrings gstrings = {};
>> struct ifreq ifr;
>> int ret;
>>
>> gstrings.cmd = ETHTOOL_GSTRINGS;
>> gstrings.string_set = ETH_SS_WOL_MODES;
>>
>> ifr.ifr_data = (char*)&gstrings;
>> strcpy(ifr.ifr_name, "enp4s0");
>>
>> ret = ioctl(sock, SIOCETHTOOL, &ifr);
>>
>> close(sock);
>> return ret;
>> }
>>
>> Kohei Enju (3):
>> igb: use EOPNOTSUPP instead of ENOTSUPP in igb_get_sset_count()
>> igc: use EOPNOTSUPP instead of ENOTSUPP in
>> igc_ethtool_get_sset_count()
>> ixgbe: use EOPNOTSUPP instead of ENOTSUPP in
>> ixgbe_ptp_feature_enable()
>>
>> drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +-
>> drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 +-
>> drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 2 +-
>> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> Nice write-up and reproduction steps!
>
> For the series:
>
> Reviewed-by: Dawid Osuchowski <dawid.osuchowski@...ux.intel.com>
>
> Thanks,
> Dawid
>
Agreed. Thanks for the work.
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (237 bytes)
Powered by blists - more mailing lists