* [PATCH net 0/2] sfc: TC probe fixes
@ 2023-08-15 15:57 edward.cree
2023-08-15 15:57 ` [PATCH net 1/2] sfc: don't unregister flow_indr if it was never registered edward.cree
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: edward.cree @ 2023-08-15 15:57 UTC (permalink / raw)
To: linux-net-drivers, davem, kuba, edumazet, pabeni
Cc: Edward Cree, netdev, habetsm.xilinx
From: Edward Cree <ecree.xilinx@gmail.com>
Fix a couple of minor infelicities in the error paths of EF100 TC
offload setup at probe time. Both found by code inspection.
Patch #1 will produce a conflict when merging net into net-next
(with 3bf969e88ada ("sfc: add MAE table machinery for conntrack table"));
the resolution is appended.
Edward Cree (2):
sfc: don't unregister flow_indr if it was never registered
sfc: don't fail probe if MAE/TC setup fails
drivers/net/ethernet/sfc/ef100_nic.c | 2 +-
drivers/net/ethernet/sfc/tc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --cc drivers/net/ethernet/sfc/tc.c
index fe268b6c1cac,246657222958..000000000000
--- a/drivers/net/ethernet/sfc/tc.c
+++ b/drivers/net/ethernet/sfc/tc.c
@@@ -1657,11 -2087,17 +2087,17 @@@ int efx_init_tc(struct efx_nic *efx
rc = efx_tc_configure_fallback_acts_reps(efx);
if (rc)
return rc;
- rc = flow_indr_dev_register(efx_tc_indr_setup_cb, efx);
+ rc = efx_mae_get_tables(efx);
if (rc)
return rc;
- efx->tc->up = true;
+ rc = flow_indr_dev_register(efx_tc_indr_setup_cb, efx);
+ if (rc)
+ goto out_free;
+ efx->tc->up = true;
return 0;
+ out_free:
+ efx_mae_free_tables(efx);
+ return rc;
}
void efx_fini_tc(struct efx_nic *efx)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net 1/2] sfc: don't unregister flow_indr if it was never registered
2023-08-15 15:57 [PATCH net 0/2] sfc: TC probe fixes edward.cree
@ 2023-08-15 15:57 ` edward.cree
2023-08-17 19:00 ` patchwork-bot+netdevbpf
2023-08-15 15:57 ` [PATCH net 2/2] sfc: don't fail probe if MAE/TC setup fails edward.cree
2023-08-15 16:41 ` [PATCH net 0/2] sfc: TC probe fixes Simon Horman
2 siblings, 1 reply; 5+ messages in thread
From: edward.cree @ 2023-08-15 15:57 UTC (permalink / raw)
To: linux-net-drivers, davem, kuba, edumazet, pabeni
Cc: Edward Cree, netdev, habetsm.xilinx, Pieter Jansen van Vuuren
From: Edward Cree <ecree.xilinx@gmail.com>
In efx_init_tc(), move the setting of efx->tc->up after the
flow_indr_dev_register() call, so that if it fails, efx_fini_tc()
won't call flow_indr_dev_unregister().
Fixes: 5b2e12d51bd8 ("sfc: bind indirect blocks for TC offload on EF100")
Suggested-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
Reviewed-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
---
drivers/net/ethernet/sfc/tc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/sfc/tc.c b/drivers/net/ethernet/sfc/tc.c
index 15ebd3973922..fe268b6c1cac 100644
--- a/drivers/net/ethernet/sfc/tc.c
+++ b/drivers/net/ethernet/sfc/tc.c
@@ -1657,10 +1657,10 @@ int efx_init_tc(struct efx_nic *efx)
rc = efx_tc_configure_fallback_acts_reps(efx);
if (rc)
return rc;
- efx->tc->up = true;
rc = flow_indr_dev_register(efx_tc_indr_setup_cb, efx);
if (rc)
return rc;
+ efx->tc->up = true;
return 0;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net 2/2] sfc: don't fail probe if MAE/TC setup fails
2023-08-15 15:57 [PATCH net 0/2] sfc: TC probe fixes edward.cree
2023-08-15 15:57 ` [PATCH net 1/2] sfc: don't unregister flow_indr if it was never registered edward.cree
@ 2023-08-15 15:57 ` edward.cree
2023-08-15 16:41 ` [PATCH net 0/2] sfc: TC probe fixes Simon Horman
2 siblings, 0 replies; 5+ messages in thread
From: edward.cree @ 2023-08-15 15:57 UTC (permalink / raw)
To: linux-net-drivers, davem, kuba, edumazet, pabeni
Cc: Edward Cree, netdev, habetsm.xilinx
From: Edward Cree <ecree.xilinx@gmail.com>
Existing comment in the source explains why we don't want efx_init_tc()
failure to be fatal. Cited commit erroneously consolidated failure
paths causing the probe to be failed in this case.
Fixes: 7e056e2360d9 ("sfc: obtain device mac address based on firmware handle for ef100")
Reviewed-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
---
drivers/net/ethernet/sfc/ef100_nic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c
index 7adde9639c8a..35d8e9811998 100644
--- a/drivers/net/ethernet/sfc/ef100_nic.c
+++ b/drivers/net/ethernet/sfc/ef100_nic.c
@@ -1194,7 +1194,7 @@ int ef100_probe_netdev_pf(struct efx_nic *efx)
net_dev->features |= NETIF_F_HW_TC;
efx->fixed_features |= NETIF_F_HW_TC;
}
- return rc;
+ return 0;
}
int ef100_probe_vf(struct efx_nic *efx)
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net 0/2] sfc: TC probe fixes
2023-08-15 15:57 [PATCH net 0/2] sfc: TC probe fixes edward.cree
2023-08-15 15:57 ` [PATCH net 1/2] sfc: don't unregister flow_indr if it was never registered edward.cree
2023-08-15 15:57 ` [PATCH net 2/2] sfc: don't fail probe if MAE/TC setup fails edward.cree
@ 2023-08-15 16:41 ` Simon Horman
2 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2023-08-15 16:41 UTC (permalink / raw)
To: edward.cree
Cc: linux-net-drivers, davem, kuba, edumazet, pabeni, Edward Cree,
netdev, habetsm.xilinx
On Tue, Aug 15, 2023 at 04:57:26PM +0100, edward.cree@amd.com wrote:
> From: Edward Cree <ecree.xilinx@gmail.com>
>
> Fix a couple of minor infelicities in the error paths of EF100 TC
> offload setup at probe time. Both found by code inspection.
> Patch #1 will produce a conflict when merging net into net-next
> (with 3bf969e88ada ("sfc: add MAE table machinery for conntrack table"));
> the resolution is appended.
>
> Edward Cree (2):
> sfc: don't unregister flow_indr if it was never registered
> sfc: don't fail probe if MAE/TC setup fails
>
> drivers/net/ethernet/sfc/ef100_nic.c | 2 +-
> drivers/net/ethernet/sfc/tc.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
For series:
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net 1/2] sfc: don't unregister flow_indr if it was never registered
2023-08-15 15:57 ` [PATCH net 1/2] sfc: don't unregister flow_indr if it was never registered edward.cree
@ 2023-08-17 19:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-08-17 19:00 UTC (permalink / raw)
To: edward.cree
Cc: linux-net-drivers, davem, kuba, edumazet, pabeni, ecree.xilinx,
netdev, habetsm.xilinx, pieter.jansen-van-vuuren
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 15 Aug 2023 16:57:27 +0100 you wrote:
> From: Edward Cree <ecree.xilinx@gmail.com>
>
> In efx_init_tc(), move the setting of efx->tc->up after the
> flow_indr_dev_register() call, so that if it fails, efx_fini_tc()
> won't call flow_indr_dev_unregister().
>
> Fixes: 5b2e12d51bd8 ("sfc: bind indirect blocks for TC offload on EF100")
> Suggested-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
> Reviewed-by: Martin Habets <habetsm.xilinx@gmail.com>
> Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
>
> [...]
Here is the summary with links:
- [net,1/2] sfc: don't unregister flow_indr if it was never registered
https://git.kernel.org/netdev/net/c/fa165e194997
- [net,2/2] sfc: don't fail probe if MAE/TC setup fails
https://git.kernel.org/netdev/net/c/54c9016eb8ed
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-17 19:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-15 15:57 [PATCH net 0/2] sfc: TC probe fixes edward.cree
2023-08-15 15:57 ` [PATCH net 1/2] sfc: don't unregister flow_indr if it was never registered edward.cree
2023-08-17 19:00 ` patchwork-bot+netdevbpf
2023-08-15 15:57 ` [PATCH net 2/2] sfc: don't fail probe if MAE/TC setup fails edward.cree
2023-08-15 16:41 ` [PATCH net 0/2] sfc: TC probe fixes Simon Horman
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).