[2/2] net/sfc: fix resetting mark in tunnel offload switch rules

Message ID 20230309042842.8709-2-ivan.malov@arknetworks.am (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [1/2] common/sfc_efx/base: allow to request MAE mark reset action |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Ivan Malov March 9, 2023, 4:28 a.m. UTC
  The currently used API is unfit for the purpose as it
checks the order in which the action is being added.
Use a dedicated API to request the reset.

Fixes: 012bf708c20f ("net/sfc: support group flows in tunnel offload")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/net/sfc/sfc_mae.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
  

Comments

Andrew Rybchenko March 10, 2023, 2:20 p.m. UTC | #1
On 3/9/23 07:28, Ivan Malov wrote:
> The currently used API is unfit for the purpose as it
> checks the order in which the action is being added.
> Use a dedicated API to request the reset.
> 
> Fixes: 012bf708c20f ("net/sfc: support group flows in tunnel offload")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
> Reviewed-by: Andy Moreton <amoreton@xilinx.com>

Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
  

Patch

diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index 3daeed81b9..e5e9257998 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -3896,12 +3896,10 @@  sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
 		break;
 	case SFC_FT_RULE_SWITCH:
 		/*
-		 * Packets that go to the rule's AR have FT mark set (from the
-		 * TUNNEL rule OR's RECIRC_ID). Remove this mark in matching
-		 * packets. The user may have provided their own action
-		 * MARK above, so don't check the return value here.
+		 * Packets that go to the rule's AR have FT mark set (from
+		 * the TUNNEL rule OR's RECIRC_ID). Reset the mark to zero.
 		 */
-		(void)efx_mae_action_set_populate_mark(ctx.spec, 0);
+		efx_mae_action_set_populate_mark_reset(ctx.spec);
 
 		ctx.ft_switch_hit_counter =
 			&spec_mae->ft_ctx->switch_hit_counter;