Commit bb534830 authored by Asbjørn Sloth Tønnesen's avatar Asbjørn Sloth Tønnesen Committed by Jakub Kicinski
Browse files

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.

Signed-off-by: default avatarAsbjørn Sloth Tønnesen <ast@fiberby.net>
Reviewed-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
Link: https://lore.kernel.org/r/20240417140712.100905-1-ast@fiberby.net


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 4713744d
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -273,12 +273,11 @@ 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) |
	      BIT_ULL(FLOW_DISSECTOR_KEY_BASIC) |