Message ID | 20240609173358.193178-3-ast@fiberby.net (mailing list archive) |
---|---|
State | Accepted |
Commit | 2ede54f8786f6abae25eec41dd821259484be586 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: flower: validate encapsulation control flags | expand |
On 09/06/2024 18:33, Asbjørn Sloth Tønnesen wrote: > Change the existing check for unsupported encapsulation control flags, > to use the new helper flow_rule_is_supp_enc_control_flags(). > > No functional change, only compile tested. > > Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net> Acked-by: Edward Cree <ecree.xilinx@gmail.com> > --- > drivers/net/ethernet/sfc/tc.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/net/ethernet/sfc/tc.c b/drivers/net/ethernet/sfc/tc.c > index 9d140203e273a..0d93164988fc6 100644 > --- a/drivers/net/ethernet/sfc/tc.c > +++ b/drivers/net/ethernet/sfc/tc.c > @@ -387,11 +387,8 @@ static int efx_tc_flower_parse_match(struct efx_nic *efx, > struct flow_match_control fm; > > flow_rule_match_enc_control(rule, &fm); > - if (fm.mask->flags) { > - NL_SET_ERR_MSG_FMT_MOD(extack, "Unsupported match on enc_control.flags %#x", > - fm.mask->flags); > + if (flow_rule_has_enc_control_flags(fm.mask->flags, extack)) > return -EOPNOTSUPP; > - } > if (!IS_ALL_ONES(fm.mask->addr_type)) { > NL_SET_ERR_MSG_FMT_MOD(extack, "Unsupported enc addr_type mask %u (key %u)", > fm.mask->addr_type, >
diff --git a/drivers/net/ethernet/sfc/tc.c b/drivers/net/ethernet/sfc/tc.c index 9d140203e273a..0d93164988fc6 100644 --- a/drivers/net/ethernet/sfc/tc.c +++ b/drivers/net/ethernet/sfc/tc.c @@ -387,11 +387,8 @@ static int efx_tc_flower_parse_match(struct efx_nic *efx, struct flow_match_control fm; flow_rule_match_enc_control(rule, &fm); - if (fm.mask->flags) { - NL_SET_ERR_MSG_FMT_MOD(extack, "Unsupported match on enc_control.flags %#x", - fm.mask->flags); + if (flow_rule_has_enc_control_flags(fm.mask->flags, extack)) return -EOPNOTSUPP; - } if (!IS_ALL_ONES(fm.mask->addr_type)) { NL_SET_ERR_MSG_FMT_MOD(extack, "Unsupported enc addr_type mask %u (key %u)", fm.mask->addr_type,
Change the existing check for unsupported encapsulation control flags, to use the new helper flow_rule_is_supp_enc_control_flags(). No functional change, only compile tested. Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net> --- drivers/net/ethernet/sfc/tc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)