net: stmmac: Don't set or get RSS parameters when not supported
Subsystems (4)
Maxime Chevallier
maintainerPATCH 1/1 net: stmmac: Don't set or get RSS parameters when not supported
The RSS kselftests fail on stmmac, and this is partly due to the driver reporting bogus data for the RSS ops :
- ethtool -x reports an indirection table and a key while the hardware doesn't have any of that
- ethtool -X fails with -EINVAL.
Let's return early in the rss ops if we know the hardware and platform don't support RSS.
Note that RSS is currently not supported on any devices upstream, so code that was already useless is now effectively dead. It has been the case since 2019 when the code was added, as platforms need to set rss_en in their plat data, and no glue ever did that.
Russell King ran a poll in february 2026 [1] asking if the code should be dropped, without any reply going in either direction.
Jitendra Vegiraju from Broadcom sent 9 iterations of a Broadcom PCIe glue driver [2] that actually sets rss_en = 1, so there's some hope that this may be used in the future.
[1] : https://lore.kernel.org/netdev/[email protected]/
[2] : https://lore.kernel.org/netdev/[email protected]/
---
Jitendra, do you have plans to continue iterating on the BCM8958x glue ?
Thanks,
Maxime
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +12 -0
@@ -927,6 +927,9 @@ static u32 stmmac_get_rxfh_key_size(struct net_device *dev) {struct stmmac_priv *priv =netdev_priv (dev); +if (!priv->dma_cap.rssen || !priv->plat->rss_en) +return 0 ; +return sizeof (priv->rss.key); }
@@ -934,6 +937,9 @@ static u32 stmmac_get_rxfh_indir_size(struct net_device *dev) {struct stmmac_priv *priv =netdev_priv (dev); +if (!priv->dma_cap.rssen || !priv->plat->rss_en) +return 0 ; +return ARRAY_SIZE (priv->rss.table); }
@@ -943,6 +949,9 @@ static int stmmac_get_rxfh(struct net_device *dev,struct stmmac_priv *priv =netdev_priv (dev);int i; +if (!priv->dma_cap.rssen || !priv->plat->rss_en) +return -EOPNOTSUPP ; +if (rxfh->indir) {for (i =0 ; i <ARRAY_SIZE (priv->rss.table); i++) rxfh->indir[i] = priv->rss.table[i];
@@ -962,6 +971,9 @@ static int stmmac_set_rxfh(struct net_device *dev,struct stmmac_priv *priv =netdev_priv (dev);int i; +if (!priv->dma_cap.rssen || !priv->plat->rss_en) +return -EOPNOTSUPP ; +if (rxfh->hfunc !=ETH_RSS_HASH_NO_CHANGE && rxfh->hfunc !=ETH_RSS_HASH_TOP )return -EOPNOTSUPP ;
Signature · 1 line
2.55.0
Hi Maxime
Quoted 42 lines · Maxime Chevallier
The RSS kselftests fail on stmmac, and this is partly due to the driver reporting bogus data for the RSS ops :
- ethtool -x reports an indirection table and a key while the hardware doesn't have any of that
- ethtool -X fails with-EINVAL.Let's return early in the rss ops if we know the hardware and platform don't support RSS.
Note that RSS is currently not supported on any devices upstream, so code that was already useless is now effectively dead. It has been the case since 2019 when the code was added, as platforms need to set
rss_enin their plat data, and no glue ever did that.Russell King ran a poll in february 2026 [1] asking if the code should be dropped, without any reply going in either direction.
Jitendra Vegiraju from Broadcom sent 9 iterations of a Broadcom PCIe glue driver [2] that actually sets
rss_en= 1, so there's some hope that this may be used in the future.[1] : https://lore.kernel.org/netdev/[email protected]/
[2] : https://lore.kernel.org/netdev/[email protected]/Fixes 76067459c686 ("net: stmmac: Implement RSS and enable it in XGMAC core")Signed-off-by Maxime Chevallier <[email protected]>---
Jitendra, do you have plans to continue iterating on the BCM8958x glue ?Thanks,
Maxime
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +0
-0
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c static u32 stmmac_get_rxfh_key_size(struct · line 931
Quoted 5 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +1
-0@@ -927,6 +927,9 @@ static u32 stmmac_get_rxfh_key_size(struct net_device *dev) {struct stmmac_priv *priv =netdev_priv (dev); +if (!priv->dma_cap.rssen || !priv->plat->rss_en)
Should this pattern become a helper? Counting 6 instances so far.
Quoted 17 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +5
-0+return 0 ; +return sizeof (priv->rss.key); }@@ -934,6 +937,9 @@ static u32 stmmac_get_rxfh_indir_size(struct net_device *dev) {struct stmmac_priv *priv =netdev_priv (dev); +if (!priv->dma_cap.rssen || !priv->plat->rss_en) +return 0 ; +return ARRAY_SIZE (priv->rss.table); }
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c static int stmmac_get_rxfh(struct net_device *dev, · line 953
Quoted 5 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +2
-0@@ -943,6 +949,9 @@ static int stmmac_get_rxfh(struct net_device *dev,struct stmmac_priv *priv =netdev_priv (dev);int i; +if (!priv->dma_cap.rssen || !priv->plat->rss_en) +return -EOPNOTSUPP ;
Not a blocker, but a full netlink RSS dump (like the one in rss_ctx.py) now stops at this device. Naybe rss_dump_one_dev() should skip -EOPNOTSUPP like ethnl_default_dumpit() does?
Quoted 5 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +1
-0+if (rxfh->indir) {for (i =0 ; i <ARRAY_SIZE (priv->rss.table); i++) rxfh->indir[i] = priv->rss.table[i];
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c static int stmmac_set_rxfh(struct net_device *dev, · line 979
Quoted 9 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +3
-0@@ -962,6 +971,9 @@ static int stmmac_set_rxfh(struct net_device *dev,struct stmmac_priv *priv =netdev_priv (dev);int i; +if (!priv->dma_cap.rssen || !priv->plat->rss_en) +return -EOPNOTSUPP ; +if (rxfh->hfunc !=ETH_RSS_HASH_NO_CHANGE && rxfh->hfunc !=ETH_RSS_HASH_TOP )return -EOPNOTSUPP ;
Thanks,
Nicolai
Maxime Chevallier
maintainerHi Nicolai,
Quoted 48 lines · Nicolai Buchwitz
Hi Maxime
Quoted 45 lines · Maxime Chevallier
The RSS kselftests fail on stmmac, and this is partly due to the driver reporting bogus data for the RSS ops :
- ethtool -x reports an indirection table and a key while the hardware doesn't have any of that
- ethtool -X fails with-EINVAL.Let's return early in the rss ops if we know the hardware and platform don't support RSS.
Note that RSS is currently not supported on any devices upstream, so code that was already useless is now effectively dead. It has been the case since 2019 when the code was added, as platforms need to set
rss_enin their plat data, and no glue ever did that.Russell King ran a poll in february 2026 [1] asking if the code should be dropped, without any reply going in either direction.
Jitendra Vegiraju from Broadcom sent 9 iterations of a Broadcom PCIe glue driver [2] that actually sets
rss_en= 1, so there's some hope that this may be used in the future.[1] : https://lore.kernel.org/netdev/[email protected]/
[2] : https://lore.kernel.org/netdev/[email protected]/Fixes 76067459c686 ("net: stmmac: Implement RSS and enable it in XGMAC core")Signed-off-by Maxime Chevallier <[email protected]>---
Jitendra, do you have plans to continue iterating on the BCM8958x glue ?Thanks,
Maxime
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 12 ++++++++++++
1 file changed, 12 insertions(+)drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +0
-0@@ -927,6 +927,9 @@ static u32 stmmac_get_rxfh_key_size(struct net_device *dev) { struct stmmac_priv *priv = netdev_priv(dev);
Quoted 3 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c static u32 stmmac_get_rxfh_key_size(struct net_device *dev) · line 930
Quoted 1 line
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +1
-0+ if (!priv->dma_cap.rssen || !priv->plat->rss_en)Should this pattern become a helper? Counting 6 instances so far.
yeah why not :)
Quoted 20 lines
Quoted 20 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +5
-0+ return 0; + return sizeof(priv->rss.key); }@@ -934,6 +937,9 @@ static u32 stmmac_get_rxfh_indir_size(struct net_device *dev) { struct stmmac_priv *priv = netdev_priv(dev); + if (!priv->dma_cap.rssen || !priv->plat->rss_en) + return 0; + return ARRAY_SIZE(priv->rss.table); }@@ -943,6 +949,9 @@ static int stmmac_get_rxfh(struct net_device *dev, struct stmmac_priv *priv = netdev_priv(dev); int i;
Quoted 6 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c static int stmmac_get_rxfh(struct net_device *dev, · line 953
Quoted 2 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +2
-0+ if (!priv->dma_cap.rssen || !priv->plat->rss_en) + return -EOPNOTSUPP;Not a blocker, but a full netlink RSS dump (like the one in
rss_ctx.py) now stops at this device. Nayberss_dump_one_dev()should skip-EOPNOTSUPPlikeethnl_default_dumpit()does?
there are other drivers that report -EOPNOTSUPP, we could have that as a separate patch yeah
Thanks for looking at this,
Maxime
Jakub Kicinski
maintainerQuoted 6 lines · On Sat, 26 Sep 2026 11:33:41 +0200 Maxime Chevallier wrote:
The RSS kselftests fail on stmmac, and this is partly due to the driver reporting bogus data for the RSS ops :
- ethtool -x reports an indirection table and a key while the hardware doesn't have any of that
- ethtool -X fails with-EINVAL.
this is net-next material
Maxime Chevallier
maintainerQuoted 9 lines · Jakub Kicinski
Quoted 6 lines · On Sat, 26 Sep 2026 11:33:41 +0200 Maxime Chevallier wrote:
The RSS kselftests fail on stmmac, and this is partly due to the driver reporting bogus data for the RSS ops :
- ethtool -x reports an indirection table and a key while the hardware doesn't have any of that
- ethtool -X fails with-EINVAL.this is net-next material
Fair, I'll iterate with Nicolai's fix.
Thanks,
Maxime
Hi Maxime,
Quoted 24 lines · Maxime Chevallier
The RSS kselftests fail on stmmac, and this is partly due to the driver reporting bogus data for the RSS ops :
- ethtool -x reports an indirection table and a key while the hardware doesn't have any of that
- ethtool -X fails with-EINVAL.Let's return early in the rss ops if we know the hardware and platform don't support RSS.
Note that RSS is currently not supported on any devices upstream, so code that was already useless is now effectively dead. It has been the case since 2019 when the code was added, as platforms need to set
rss_enin their plat data, and no glue ever did that.Russell King ran a poll in february 2026 [1] asking if the code should be dropped, without any reply going in either direction.
Jitendra Vegiraju from Broadcom sent 9 iterations of a Broadcom PCIe glue driver [2] that actually sets
rss_en= 1, so there's some hope that this may be used in the future.
Quoted 7 lines
[1] : https://lore.kernel.org/netdev/[email protected]/
[2] : https://lore.kernel.org/netdev/[email protected]/Fixes 76067459c686 ("net: stmmac: Implement RSS and enable it in XGMAC core")Signed-off-by Maxime Chevallier <[email protected]>---
Jitendra, do you have plans to continue iterating on the BCM8958x glue ?
Yes, we plan to resubmit the BCM8958x glue driver patches. We paused it for a while. But, we are planning to test with the latest net-next and submit the patches again.
Thanks,
Jitendra
Quoted 55 lines
Thanks,
Maxime
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +12
-1@@ -927,6 +927,9 @@ static u32 stmmac_get_rxfh_key_size(struct net_device *dev) {struct stmmac_priv *priv =netdev_priv (dev); +if (!priv->dma_cap.rssen || !priv->plat->rss_en) +return 0 ; +return sizeof (priv->rss.key); }@@ -934,6 +937,9 @@ static u32 stmmac_get_rxfh_indir_size(struct net_device *dev) {struct stmmac_priv *priv =netdev_priv (dev); +if (!priv->dma_cap.rssen || !priv->plat->rss_en) +return 0 ; +return ARRAY_SIZE (priv->rss.table); }@@ -943,6 +949,9 @@ static int stmmac_get_rxfh(struct net_device *dev,struct stmmac_priv *priv =netdev_priv (dev);int i; +if (!priv->dma_cap.rssen || !priv->plat->rss_en) +return -EOPNOTSUPP ; +if (rxfh->indir) {for (i =0 ; i <ARRAY_SIZE (priv->rss.table); i++) rxfh->indir[i] = priv->rss.table[i];@@ -962,6 +971,9 @@ static int stmmac_set_rxfh(struct net_device *dev,struct stmmac_priv *priv =netdev_priv (dev);int i; +if (!priv->dma_cap.rssen || !priv->plat->rss_en) +return -EOPNOTSUPP ; +if (rxfh->hfunc !=ETH_RSS_HASH_NO_CHANGE && rxfh->hfunc !=ETH_RSS_HASH_TOP )return -EOPNOTSUPP ; --2.55.0