Commit 8cd1b6c0 authored by Asbjørn Sloth Tønnesen's avatar Asbjørn Sloth Tønnesen Committed by Jakub Kicinski

net: sparx5: flower: add extack to sparx5_tc_flower_handler_control_usage()

Define extack locally, to reduce line lengths and aid future users.

Only compile tested.
Signed-off-by: default avatarAsbjørn Sloth Tønnesen <ast@fiberby.net>
Reviewed-by: default avatarDaniel Machon <daniel.machon@microchip.com>
Tested-by: default avatarDaniel Machon <daniel.machon@microchip.com>
Link: https://lore.kernel.org/r/20240424121632.459022-3-ast@fiberby.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent bcf303c6
...@@ -159,6 +159,7 @@ sparx5_tc_flower_handler_basic_usage(struct vcap_tc_flower_parse_usage *st) ...@@ -159,6 +159,7 @@ sparx5_tc_flower_handler_basic_usage(struct vcap_tc_flower_parse_usage *st)
static int static int
sparx5_tc_flower_handler_control_usage(struct vcap_tc_flower_parse_usage *st) sparx5_tc_flower_handler_control_usage(struct vcap_tc_flower_parse_usage *st)
{ {
struct netlink_ext_ack *extack = st->fco->common.extack;
struct flow_match_control mt; struct flow_match_control mt;
u32 value, mask; u32 value, mask;
int err = 0; int err = 0;
...@@ -178,7 +179,7 @@ sparx5_tc_flower_handler_control_usage(struct vcap_tc_flower_parse_usage *st) ...@@ -178,7 +179,7 @@ sparx5_tc_flower_handler_control_usage(struct vcap_tc_flower_parse_usage *st)
u8 vdt = sparx5_vcap_frag_map[is_frag_idx][first_frag_idx]; u8 vdt = sparx5_vcap_frag_map[is_frag_idx][first_frag_idx];
if (vdt == FRAG_INVAL) { if (vdt == FRAG_INVAL) {
NL_SET_ERR_MSG_MOD(st->fco->common.extack, NL_SET_ERR_MSG_MOD(extack,
"Match on invalid fragment flag combination"); "Match on invalid fragment flag combination");
return -EINVAL; return -EINVAL;
} }
...@@ -199,7 +200,7 @@ sparx5_tc_flower_handler_control_usage(struct vcap_tc_flower_parse_usage *st) ...@@ -199,7 +200,7 @@ sparx5_tc_flower_handler_control_usage(struct vcap_tc_flower_parse_usage *st)
return err; return err;
out: out:
NL_SET_ERR_MSG_MOD(st->fco->common.extack, "ip_frag parse error"); NL_SET_ERR_MSG_MOD(extack, "ip_frag parse error");
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment