[PATCH 2/2] net/sfc: invalidate dangling MAE flow action FW resource IDs

Ivan Malov ivan.malov at arknetworks.am
Mon Apr 24 16:30:46 CEST 2023


When reinserting a flow (on port restart, for instance)
FW resource IDs found in the action set specification
need to be invalidated so that the new (reallocated)
FW resource IDs can be accepted by libefx again.

Fixes: 1bbd1ec2348a ("net/sfc: support action VXLAN encap in MAE backend")
Cc: stable at dpdk.org

Signed-off-by: Ivan Malov <ivan.malov at arknetworks.am>
Reviewed-by: Andy Moreton <amoreton at xilinx.com>
Tested-by: Denis Pryazhennikov <denis.pryazhennikov at arknetworks.am>
---
 drivers/net/sfc/sfc_mae.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index e5e9257998..60b9fdc290 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -1180,6 +1180,8 @@ sfc_mae_action_set_disable(struct sfc_adapter *sa,
 	}
 
 	if (fw_rsrc->refcnt == 1) {
+		efx_mae_action_set_clear_fw_rsrc_ids(action_set->spec);
+
 		rc = efx_mae_action_set_free(sa->nic, &fw_rsrc->aset_id);
 		if (rc == 0) {
 			sfc_dbg(sa, "disabled action_set=%p with AS_ID=0x%08x",
-- 
2.17.1



More information about the stable mailing list