diff mbox series

[net-next,v2] sfc: use flow_rule_is_supp_control_flags()

Message ID 20240417140712.100905-1-ast@fiberby.net (mailing list archive)
State Accepted
Commit bb534830a74f54037df923e15254e8c885dce35a
Delegated to: Netdev Maintainers
Headers show
Series [net-next,v2] sfc: use flow_rule_is_supp_control_flags() | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 926 this patch: 926
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 937 this patch: 937
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 937 this patch: 937
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 2 this patch: 2
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-04-18--00-00 (tests: 961)

Commit Message

Asbjørn Sloth Tønnesen April 17, 2024, 2:07 p.m. UTC
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.

Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
---

Changelog:

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

v1: https://lore.kernel.org/netdev/20240416134432.9527-1-ast@fiberby.net/

 drivers/net/ethernet/sfc/tc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Edward Cree April 17, 2024, 2:10 p.m. UTC | #1
On 17/04/2024 15:07, Asbjørn Sloth Tønnesen 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.
> 
> Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>

Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
patchwork-bot+netdevbpf@kernel.org April 19, 2024, 12:10 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

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!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/sfc/tc.c b/drivers/net/ethernet/sfc/tc.c
index 82e8891a619a..9d140203e273 100644
--- a/drivers/net/ethernet/sfc/tc.c
+++ b/drivers/net/ethernet/sfc/tc.c
@@ -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) |