Skip to contentSkip to conversation

sfc: use flow_rule_is_supp_control_flags()

PATCH Applied Asbjørn Sloth Tønnesen 3 participants 3 messages Apr 17, 2024 – Apr 19, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 sfc: use flow_rule_is_supp_control_flags()

Change the check for unsupported control flags, to use the new helper flow_rule_is_supp_control_flags().

Since the helper was based on sfc, then nothing really changes.

Compile-tested, and compiled objects are identical.

---

Changelog:

v2:
- fix subject (noticed by Ed)
- remove #define (requested by Ed)

v1: https://lore.kernel.org/netdev/[email protected]/

 drivers/net/ethernet/sfc/tc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/ethernet/sfc/tc.c +3 -4
index 82e8891a619a..9d140203e273 100644
@@ -273,11 +273,10 @@ static int efx_tc_flower_parse_match(struct efx_nic *efx,
 			match->value.ip_firstfrag = fm.key->flags & FLOW_DIS_FIRST_FRAG;
 			match->mask.ip_firstfrag = true;
 		}
-		if (fm.mask->flags & ~(FLOW_DIS_IS_FRAGMENT | FLOW_DIS_FIRST_FRAG)) {
-			NL_SET_ERR_MSG_FMT_MOD(extack, "Unsupported match on control.flags %#x",
-					       fm.mask->flags);
+		if (!flow_rule_is_supp_control_flags(FLOW_DIS_IS_FRAGMENT |
+						     FLOW_DIS_FIRST_FRAG,
+						     fm.mask->flags, extack))
 			return -EOPNOTSUPP;
-		}
 	}
 	if (dissector->used_keys &
 	    ~(BIT_ULL(FLOW_DISSECTOR_KEY_CONTROL) |
Signature · 1 line
2.43.0
#2 lore raw
In reply to Asbjørn Sloth Tønnesen
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 17 Apr 2024 14:07:10 +0000 you wrote:

Change the check for unsupported control flags, to use the new helper flow_rule_is_supp_control_flags().

Since the helper was based on sfc, then nothing really changes.

Compile-tested, and compiled objects are identical.

[...]

Here is the summary with links:
- [net-next,v2] sfc: use flow_rule_is_supp_control_flags()

    https://git.kernel.org/netdev/net-next/c/bb534830a74f

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html