From: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
To: Kohei Enju <enjuk@amazon.com>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Auke Kok <auke-jan.h.kok@intel.com>,
Jeff Garzik <jgarzik@redhat.com>,
Sasha Neftin <sasha.neftin@intel.com>,
Richard Cochran <richardcochran@gmail.com>,
Jacob Keller <jacob.e.keller@intel.com>,
kohei.enju@gmail.com
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use EOPNOTSUPP instead of ENOTSUPP
Date: Mon, 6 Oct 2025 16:09:13 +0200 [thread overview]
Message-ID: <0a2efa67-0fb0-458a-970e-8957fffe63a0@linux.intel.com> (raw)
In-Reply-To: <20251006123741.43462-1-enjuk@amazon.com>
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@linux.intel.com>
Thanks,
Dawid
next prev parent reply other threads:[~2025-10-06 14:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-06 12:35 [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use EOPNOTSUPP instead of ENOTSUPP Kohei Enju
2025-10-06 12:35 ` [PATCH iwl-net v1 1/3] igb: use EOPNOTSUPP instead of ENOTSUPP in igb_get_sset_count() Kohei Enju
2025-10-06 14:02 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-10-06 12:35 ` [PATCH iwl-net v1 2/3] igc: use EOPNOTSUPP instead of ENOTSUPP in igc_ethtool_get_sset_count() Kohei Enju
2025-10-06 14:01 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-10-06 12:35 ` [PATCH iwl-net v1 3/3] ixgbe: use EOPNOTSUPP instead of ENOTSUPP in ixgbe_ptp_feature_enable() Kohei Enju
2025-10-06 14:00 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-10-06 14:09 ` Dawid Osuchowski [this message]
2025-10-07 0:03 ` [Intel-wired-lan] [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use EOPNOTSUPP instead of ENOTSUPP Jacob Keller
2025-10-06 14:20 ` Loktionov, Aleksandr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0a2efa67-0fb0-458a-970e-8957fffe63a0@linux.intel.com \
--to=dawid.osuchowski@linux.intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=auke-jan.h.kok@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=enjuk@amazon.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=jgarzik@redhat.com \
--cc=kohei.enju@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=richardcochran@gmail.com \
--cc=sasha.neftin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).