summaryrefslogtreecommitdiffstats
path: root/net/sched/cls_api.c
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2022-04-07 10:35:22 +0300
committerDavid S. Miller <davem@davemloft.net>2022-04-08 13:45:43 +0100
commitc2ccf84ecb715bb81dc7f51e69d680a95bf055ae (patch)
tree0d70d2fb932ae7ee9f514884a650acc16f41ba28 /net/sched/cls_api.c
parent11c95317bc1a70b305b978ac4bec39e224142094 (diff)
downloadlinux-c2ccf84ecb715bb81dc7f51e69d680a95bf055ae.tar.gz
linux-c2ccf84ecb715bb81dc7f51e69d680a95bf055ae.tar.bz2
linux-c2ccf84ecb715bb81dc7f51e69d680a95bf055ae.zip
net/sched: act_api: Add extack to offload_act_setup() callback
The callback is used by various actions to populate the flow action structure prior to offload. Pass extack to this callback so that the various actions will be able to report accurate error messages to user space. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r--net/sched/cls_api.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 2957f8f5cea7..dd711ae048ff 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3513,11 +3513,13 @@ EXPORT_SYMBOL(tc_cleanup_offload_action);
static int tc_setup_offload_act(struct tc_action *act,
struct flow_action_entry *entry,
- u32 *index_inc)
+ u32 *index_inc,
+ struct netlink_ext_ack *extack)
{
#ifdef CONFIG_NET_CLS_ACT
if (act->ops->offload_act_setup)
- return act->ops->offload_act_setup(act, entry, index_inc, true);
+ return act->ops->offload_act_setup(act, entry, index_inc, true,
+ extack);
else
return -EOPNOTSUPP;
#else
@@ -3526,7 +3528,8 @@ static int tc_setup_offload_act(struct tc_action *act,
}
int tc_setup_action(struct flow_action *flow_action,
- struct tc_action *actions[])
+ struct tc_action *actions[],
+ struct netlink_ext_ack *extack)
{
int i, j, index, err = 0;
struct tc_action *act;
@@ -3551,7 +3554,7 @@ int tc_setup_action(struct flow_action *flow_action,
entry->hw_stats = tc_act_hw_stats(act->hw_stats);
entry->hw_index = act->tcfa_index;
index = 0;
- err = tc_setup_offload_act(act, entry, &index);
+ err = tc_setup_offload_act(act, entry, &index, extack);
if (!err)
j += index;
else
@@ -3570,13 +3573,14 @@ err_out_locked:
}
int tc_setup_offload_action(struct flow_action *flow_action,
- const struct tcf_exts *exts)
+ const struct tcf_exts *exts,
+ struct netlink_ext_ack *extack)
{
#ifdef CONFIG_NET_CLS_ACT
if (!exts)
return 0;
- return tc_setup_action(flow_action, exts->actions);
+ return tc_setup_action(flow_action, exts->actions, extack);
#else
return 0;
#endif