diff mbox

[net,0/2] sfc: TC probe fixes

Message ID cover.1692114888.git.ecree.xilinx@gmail.com (mailing list archive)
State Accepted
Delegated to: Netdev Maintainers
Headers show

Commit Message

edward.cree@amd.com Aug. 15, 2023, 3:57 p.m. UTC
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(-)

---

+++ 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)

Comments

Simon Horman Aug. 15, 2023, 4:41 p.m. UTC | #1
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>
diff mbox

Patch

diff --cc drivers/net/ethernet/sfc/tc.c
index fe268b6c1cac,246657222958..000000000000
--- a/drivers/net/ethernet/sfc/tc.c