diff mbox series

[1/3] net/sfc: fix outer rule and encap. header rollback on errors

Message ID 20210420211006.19170-1-ivan.malov@oktetlabs.ru (mailing list archive)
State Accepted
Delegated to: Ferruh Yigit
Headers show
Series [1/3] net/sfc: fix outer rule and encap. header rollback on errors | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Ivan Malov April 20, 2021, 9:10 p.m. UTC
Add missing statements to invalidate MAE resource IDs.

Fixes: dadff137931c ("net/sfc: support encap flow items in transfer rules")
Fixes: 1bbd1ec2348a ("net/sfc: support action VXLAN encap in MAE backend")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/net/sfc/sfc_mae.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Ferruh Yigit April 21, 2021, 10:39 a.m. UTC | #1
On 4/20/2021 10:10 PM, Ivan Malov wrote:
> Add missing statements to invalidate MAE resource IDs.
> 
> Fixes: dadff137931c ("net/sfc: support encap flow items in transfer rules")
> Fixes: 1bbd1ec2348a ("net/sfc: support action VXLAN encap in MAE backend")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Reviewed-by: Andy Moreton <amoreton@xilinx.com>

Series applied to dpdk-next-net/main, thanks.
diff mbox series

Patch

diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index 4dafe3dcd..0270c91e2 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -235,6 +235,7 @@  sfc_mae_outer_rule_enable(struct sfc_adapter *sa,
 		if (fw_rsrc->refcnt == 0) {
 			(void)efx_mae_outer_rule_remove(sa->nic,
 							&fw_rsrc->rule_id);
+			fw_rsrc->rule_id.id = EFX_MAE_RSRC_ID_INVALID;
 		}
 		return rc;
 	}
@@ -385,6 +386,7 @@  sfc_mae_encap_header_enable(struct sfc_adapter *sa,
 		if (fw_rsrc->refcnt == 0) {
 			(void)efx_mae_encap_header_free(sa->nic,
 							&fw_rsrc->eh_id);
+			fw_rsrc->eh_id.id = EFX_MAE_RSRC_ID_INVALID;
 		}
 		return rc;
 	}