net: microchip: sparx5: Fix return value in sparx5_tc_setup_qdisc_ets()
Subsystems (3)
PATCH 1/1 net: microchip: sparx5: Fix return value in sparx5_tc_setup_qdisc_ets()
Function sparx5_tc_setup_qdisc_ets() always returns negative value because it return -EOPNOTSUPP in the end. This patch returns the rersult of sparx5_tc_ets_add() and sparx5_tc_ets_del() directly.
--- drivers/net/ethernet/microchip/sparx5/sparx5_tc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/net/ethernet/microchip/sparx5/sparx5_tc.c +2 -5
@@ -90,13 +90,10 @@ static int sparx5_tc_setup_qdisc_ets(struct net_device *ndev, } } -sparx5_tc_ets_add (port, params); -break ; +return sparx5_tc_ets_add (port, params);case TC_ETS_DESTROY : -sparx5_tc_ets_del (port); - -break ; +return sparx5_tc_ets_del (port);case TC_ETS_GRAFT :return -EOPNOTSUPP ;
Signature · 1 line
2.31.1
Den Thu, Nov 17, 2022 at 11:07:22PM +0800 skrev Lu Wei:
Quoted 35 lines
[Some people who received this message don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Function
sparx5_tc_setup_qdisc_ets()always returns negative value because it return-EOPNOTSUPPin the end. This patch returns the rersult ofsparx5_tc_ets_add()andsparx5_tc_ets_del()directly.Fixes 211225428d65 ("net: microchip: sparx5: add support for offloading ets qdisc")Signed-off-by Lu Wei <[email protected]>--- drivers/net/ethernet/microchip/sparx5/sparx5_tc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/net/ethernet/microchip/sparx5/sparx5_tc.c +2
-6@@ -90,13 +90,10 @@ static int sparx5_tc_setup_qdisc_ets(struct net_device *ndev, } } -sparx5_tc_ets_add (port, params); -break ; +return sparx5_tc_ets_add (port, params);case TC_ETS_DESTROY : -sparx5_tc_ets_del (port); - -break ; +return sparx5_tc_ets_del (port);case TC_ETS_GRAFT :return -EOPNOTSUPP ; --
Quoted 2 lines
2.31.1
Looks like ets_offload_change() does not check the return value of ndo_setup_tc() here [1] - I wonder why this is. This also explains why my ETS tests were passing.
Anyway, thank you for the patch.
==================
[1] https://elixir.bootlin.com/linux/v6.1-rc5/source/net/sched/sch_ets.c#L143
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:
Quoted 8 lines · On Thu, 17 Nov 2022 23:07:22 +0800 you wrote:
Function
sparx5_tc_setup_qdisc_ets()always returns negative value because it return-EOPNOTSUPPin the end. This patch returns the rersult ofsparx5_tc_ets_add()andsparx5_tc_ets_del()directly.Fixes 211225428d65 ("net: microchip: sparx5: add support for offloading ets qdisc")Signed-off-by Lu Wei <[email protected]>[...]
Here is the summary with links:
- [net] net: microchip: sparx5: Fix return value in sparx5_tc_setup_qdisc_ets()
https://git.kernel.org/netdev/net/c/19d04a947db5
You are awesome, thank you!
Signature · 9 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel