Re: [PATCH net-next v2 1/4] flow_offload: add control flag checking helpers

From: Louis Peens
Date: Thu Apr 11 2024 - 02:26:22 EST


On Wed, Apr 10, 2024 at 09:32:22AM +0000, Asbjørn Sloth Tønnesen wrote:
> These helpers aim to help drivers, with checking
> for the presence of unsupported control flags.
>
> For drivers supporting at least one control flag:
> flow_rule_is_supp_control_flags()
>
> For drivers using flow_rule_match_control(), but not using flags:
> flow_rule_has_control_flags()
>
> For drivers not using flow_rule_match_control():
> flow_rule_match_has_control_flags()
>
> While primarily aimed at FLOW_DISSECTOR_KEY_CONTROL
> and flow_rule_match_control(), then the first two
> can also be used with FLOW_DISSECTOR_KEY_ENC_CONTROL
> and flow_rule_match_enc_control().
>
> These helpers mirrors the existing check done in sfc:
> drivers/net/ethernet/sfc/tc.c +276
>
> Only compile-tested.
>
> Signed-off-by: Asbjørn Sloth Tønnesen <ast@xxxxxxxxxxx>
> ---

Looks good from my perspective, thanks for the naming updates:
Reviewed-by: Louis Peens <louis.peens@xxxxxxxxxxxx>