* [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use EOPNOTSUPP instead of ENOTSUPP
@ 2025-10-06 12:35 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
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Kohei Enju @ 2025-10-06 12:35 UTC (permalink / raw)
To: intel-wired-lan, netdev
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Auke Kok, Jeff Garzik,
Sasha Neftin, Richard Cochran, Jacob Keller, kohei.enju,
Kohei Enju
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(-)
--
2.48.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH iwl-net v1 1/3] igb: use EOPNOTSUPP instead of ENOTSUPP in igb_get_sset_count()
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 ` 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
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Kohei Enju @ 2025-10-06 12:35 UTC (permalink / raw)
To: intel-wired-lan, netdev
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Auke Kok, Jeff Garzik,
Sasha Neftin, Richard Cochran, Jacob Keller, kohei.enju,
Kohei Enju
igb_get_sset_count() returns -ENOTSUPP when a given stringset is not
supported, causing userland programs to get "Unknown error 524".
Since EOPNOTSUPP should be used when error is propagated to userland,
return -EOPNOTSUPP instead of -ENOTSUPP.
Fixes: 9d5c824399de ("igb: PCI-Express 82575 Gigabit Ethernet driver")
Signed-off-by: Kohei Enju <enjuk@amazon.com>
---
drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index f8a208c84f15..10e2445e0ded 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -2281,7 +2281,7 @@ static int igb_get_sset_count(struct net_device *netdev, int sset)
case ETH_SS_PRIV_FLAGS:
return IGB_PRIV_FLAGS_STR_LEN;
default:
- return -ENOTSUPP;
+ return -EOPNOTSUPP;
}
}
--
2.48.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH iwl-net v1 2/3] igc: use EOPNOTSUPP instead of ENOTSUPP in igc_ethtool_get_sset_count()
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 12:35 ` 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
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Kohei Enju @ 2025-10-06 12:35 UTC (permalink / raw)
To: intel-wired-lan, netdev
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Auke Kok, Jeff Garzik,
Sasha Neftin, Richard Cochran, Jacob Keller, kohei.enju,
Kohei Enju
igc_ethtool_get_sset_count() returns -ENOTSUPP when a given stringset is
not supported, causing userland programs to get "Unknown error 524".
Since EOPNOTSUPP should be used when error is propagated to userland,
return -EOPNOTSUPP instead of -ENOTSUPP.
Fixes: 36b9fea60961 ("igc: Add support for statistics")
Signed-off-by: Kohei Enju <enjuk@amazon.com>
---
drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c
index ca93629b1d3a..bb783042d1af 100644
--- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
+++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
@@ -810,7 +810,7 @@ static int igc_ethtool_get_sset_count(struct net_device *netdev, int sset)
case ETH_SS_PRIV_FLAGS:
return IGC_PRIV_FLAGS_STR_LEN;
default:
- return -ENOTSUPP;
+ return -EOPNOTSUPP;
}
}
--
2.48.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH iwl-net v1 3/3] ixgbe: use EOPNOTSUPP instead of ENOTSUPP in ixgbe_ptp_feature_enable()
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 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 12:35 ` Kohei Enju
2025-10-06 14:00 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-10-06 14:09 ` [Intel-wired-lan] [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use EOPNOTSUPP instead of ENOTSUPP Dawid Osuchowski
2025-10-06 14:20 ` Loktionov, Aleksandr
4 siblings, 1 reply; 10+ messages in thread
From: Kohei Enju @ 2025-10-06 12:35 UTC (permalink / raw)
To: intel-wired-lan, netdev
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Auke Kok, Jeff Garzik,
Sasha Neftin, Richard Cochran, Jacob Keller, kohei.enju,
Kohei Enju
When the requested PTP feature is not supported,
ixgbe_ptp_feature_enable() returns -ENOTSUPP, causing userland programs
to get "Unknown error 524".
Since EOPNOTSUPP should be used when error is propagated to userland,
return -EOPNOTSUPP instead of -ENOTSUPP.
Fixes: 3a6a4edaa592 ("ixgbe: Hardware Timestamping + PTP Hardware Clock (PHC)")
Signed-off-by: Kohei Enju <enjuk@amazon.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
index 114dd88fc71c..6885d2343c48 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
@@ -641,7 +641,7 @@ static int ixgbe_ptp_feature_enable(struct ptp_clock_info *ptp,
* disabled
*/
if (rq->type != PTP_CLK_REQ_PPS || !adapter->ptp_setup_sdp)
- return -ENOTSUPP;
+ return -EOPNOTSUPP;
if (on)
adapter->flags2 |= IXGBE_FLAG2_PTP_PPS_ENABLED;
--
2.48.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* RE: [Intel-wired-lan] [PATCH iwl-net v1 3/3] ixgbe: use EOPNOTSUPP instead of ENOTSUPP in ixgbe_ptp_feature_enable()
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 ` Loktionov, Aleksandr
0 siblings, 0 replies; 10+ messages in thread
From: Loktionov, Aleksandr @ 2025-10-06 14:00 UTC (permalink / raw)
To: Kohei Enju, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org
Cc: Nguyen, Anthony L, Kitszel, Przemyslaw, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Auke Kok, Jeff Garzik, Sasha Neftin, Richard Cochran,
Keller, Jacob E, kohei.enju@gmail.com
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Kohei Enju
> Sent: Monday, October 6, 2025 2:35 PM
> To: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org
> Cc: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel,
> Przemyslaw <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>; Keller, Jacob E
> <jacob.e.keller@intel.com>; kohei.enju@gmail.com; Kohei Enju
> <enjuk@amazon.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v1 3/3] ixgbe: use
> EOPNOTSUPP instead of ENOTSUPP in ixgbe_ptp_feature_enable()
>
> When the requested PTP feature is not supported,
> ixgbe_ptp_feature_enable() returns -ENOTSUPP, causing userland
> programs to get "Unknown error 524".
>
> Since EOPNOTSUPP should be used when error is propagated to userland,
> return -EOPNOTSUPP instead of -ENOTSUPP.
>
> Fixes: 3a6a4edaa592 ("ixgbe: Hardware Timestamping + PTP Hardware
> Clock (PHC)")
> Signed-off-by: Kohei Enju <enjuk@amazon.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
> b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
> index 114dd88fc71c..6885d2343c48 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
> @@ -641,7 +641,7 @@ static int ixgbe_ptp_feature_enable(struct
> ptp_clock_info *ptp,
> * disabled
> */
> if (rq->type != PTP_CLK_REQ_PPS || !adapter->ptp_setup_sdp)
> - return -ENOTSUPP;
> + return -EOPNOTSUPP;
>
> if (on)
> adapter->flags2 |= IXGBE_FLAG2_PTP_PPS_ENABLED;
> --
> 2.48.1
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [Intel-wired-lan] [PATCH iwl-net v1 2/3] igc: use EOPNOTSUPP instead of ENOTSUPP in igc_ethtool_get_sset_count()
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 ` Loktionov, Aleksandr
0 siblings, 0 replies; 10+ messages in thread
From: Loktionov, Aleksandr @ 2025-10-06 14:01 UTC (permalink / raw)
To: Kohei Enju, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org
Cc: Nguyen, Anthony L, Kitszel, Przemyslaw, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Auke Kok, Jeff Garzik, Sasha Neftin, Richard Cochran,
Keller, Jacob E, kohei.enju@gmail.com
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Kohei Enju
> Sent: Monday, October 6, 2025 2:35 PM
> To: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org
> Cc: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel,
> Przemyslaw <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>; Keller, Jacob E
> <jacob.e.keller@intel.com>; kohei.enju@gmail.com; Kohei Enju
> <enjuk@amazon.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v1 2/3] igc: use EOPNOTSUPP
> instead of ENOTSUPP in igc_ethtool_get_sset_count()
>
> igc_ethtool_get_sset_count() returns -ENOTSUPP when a given stringset
> is not supported, causing userland programs to get "Unknown error
> 524".
>
> Since EOPNOTSUPP should be used when error is propagated to userland,
> return -EOPNOTSUPP instead of -ENOTSUPP.
>
> Fixes: 36b9fea60961 ("igc: Add support for statistics")
> Signed-off-by: Kohei Enju <enjuk@amazon.com>
> ---
> drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c
> b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> index ca93629b1d3a..bb783042d1af 100644
> --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
> +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> @@ -810,7 +810,7 @@ static int igc_ethtool_get_sset_count(struct
> net_device *netdev, int sset)
> case ETH_SS_PRIV_FLAGS:
> return IGC_PRIV_FLAGS_STR_LEN;
> default:
> - return -ENOTSUPP;
> + return -EOPNOTSUPP;
> }
> }
>
> --
> 2.48.1
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [Intel-wired-lan] [PATCH iwl-net v1 1/3] igb: use EOPNOTSUPP instead of ENOTSUPP in igb_get_sset_count()
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 ` Loktionov, Aleksandr
0 siblings, 0 replies; 10+ messages in thread
From: Loktionov, Aleksandr @ 2025-10-06 14:02 UTC (permalink / raw)
To: Kohei Enju, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org
Cc: Nguyen, Anthony L, Kitszel, Przemyslaw, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Auke Kok, Jeff Garzik, Sasha Neftin, Richard Cochran,
Keller, Jacob E, kohei.enju@gmail.com
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Kohei Enju
> Sent: Monday, October 6, 2025 2:35 PM
> To: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org
> Cc: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel,
> Przemyslaw <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>; Keller, Jacob E
> <jacob.e.keller@intel.com>; kohei.enju@gmail.com; Kohei Enju
> <enjuk@amazon.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v1 1/3] igb: use EOPNOTSUPP
> instead of ENOTSUPP in igb_get_sset_count()
>
> igb_get_sset_count() returns -ENOTSUPP when a given stringset is not
> supported, causing userland programs to get "Unknown error 524".
>
> Since EOPNOTSUPP should be used when error is propagated to userland,
> return -EOPNOTSUPP instead of -ENOTSUPP.
>
> Fixes: 9d5c824399de ("igb: PCI-Express 82575 Gigabit Ethernet driver")
> Signed-off-by: Kohei Enju <enjuk@amazon.com>
> ---
> drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c
> b/drivers/net/ethernet/intel/igb/igb_ethtool.c
> index f8a208c84f15..10e2445e0ded 100644
> --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
> +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
> @@ -2281,7 +2281,7 @@ static int igb_get_sset_count(struct net_device
> *netdev, int sset)
> case ETH_SS_PRIV_FLAGS:
> return IGB_PRIV_FLAGS_STR_LEN;
> default:
> - return -ENOTSUPP;
> + return -EOPNOTSUPP;
> }
> }
>
> --
> 2.48.1
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use EOPNOTSUPP instead of ENOTSUPP
2025-10-06 12:35 [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use EOPNOTSUPP instead of ENOTSUPP Kohei Enju
` (2 preceding siblings ...)
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:09 ` Dawid Osuchowski
2025-10-07 0:03 ` Jacob Keller
2025-10-06 14:20 ` Loktionov, Aleksandr
4 siblings, 1 reply; 10+ messages in thread
From: Dawid Osuchowski @ 2025-10-06 14:09 UTC (permalink / raw)
To: Kohei Enju, intel-wired-lan, netdev
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Auke Kok, Jeff Garzik,
Sasha Neftin, Richard Cochran, Jacob Keller, kohei.enju
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [Intel-wired-lan] [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use EOPNOTSUPP instead of ENOTSUPP
2025-10-06 12:35 [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use EOPNOTSUPP instead of ENOTSUPP Kohei Enju
` (3 preceding siblings ...)
2025-10-06 14:09 ` [Intel-wired-lan] [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use EOPNOTSUPP instead of ENOTSUPP Dawid Osuchowski
@ 2025-10-06 14:20 ` Loktionov, Aleksandr
4 siblings, 0 replies; 10+ messages in thread
From: Loktionov, Aleksandr @ 2025-10-06 14:20 UTC (permalink / raw)
To: Kohei Enju, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org
Cc: Nguyen, Anthony L, Kitszel, Przemyslaw, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Auke Kok, Jeff Garzik, Sasha Neftin, Richard Cochran,
Keller, Jacob E, kohei.enju@gmail.com
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Kohei Enju
> Sent: Monday, October 6, 2025 2:35 PM
> To: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org
> Cc: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel,
> Przemyslaw <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>; Keller, Jacob E
> <jacob.e.keller@intel.com>; kohei.enju@gmail.com; Kohei Enju
> <enjuk@amazon.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use
> EOPNOTSUPP instead of ENOTSUPP
>
> 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]
>
...
> --
> 2.48.1
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use EOPNOTSUPP instead of ENOTSUPP
2025-10-06 14:09 ` [Intel-wired-lan] [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use EOPNOTSUPP instead of ENOTSUPP Dawid Osuchowski
@ 2025-10-07 0:03 ` Jacob Keller
0 siblings, 0 replies; 10+ messages in thread
From: Jacob Keller @ 2025-10-07 0:03 UTC (permalink / raw)
To: Dawid Osuchowski, Kohei Enju, intel-wired-lan, netdev
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Auke Kok, Jeff Garzik,
Sasha Neftin, Richard Cochran, kohei.enju
[-- Attachment #1.1: Type: text/plain, Size: 3065 bytes --]
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@linux.intel.com>
>
> Thanks,
> Dawid
>
Agreed. Thanks for the work.
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-10-07 0:03 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Intel-wired-lan] [PATCH iwl-net v1 0/3] igb/igc/ixgbe: use EOPNOTSUPP instead of ENOTSUPP Dawid Osuchowski
2025-10-07 0:03 ` Jacob Keller
2025-10-06 14:20 ` Loktionov, Aleksandr
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).