aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/sched
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2020-03-19 15:47:21 +0200
committerDavid S. Miller <davem@davemloft.net>2020-03-19 21:09:19 -0700
commit2ce124109c0fe0ea03233ae3625583de1f25e89c (patch)
treeac920871bd350af54dbe2839e1603acfe4e79290 /net/sched
parentnet: tc_skbedit: Factor a helper out of is_tcf_skbedit_{mark, ptype}() (diff)
downloadwireguard-linux-2ce124109c0fe0ea03233ae3625583de1f25e89c.tar.xz
wireguard-linux-2ce124109c0fe0ea03233ae3625583de1f25e89c.zip
net: tc_skbedit: Make the skbedit priority offloadable
The skbedit action "priority" is used for adjusting SKB priority. Allow drivers to offload the action by introducing two new skbedit getters and a new flow action, and initializing appropriately in tc_setup_flow_action(). Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index eefacb3176e3..fb6c3660fb9a 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3665,6 +3665,9 @@ int tc_setup_flow_action(struct flow_action *flow_action,
} else if (is_tcf_skbedit_ptype(act)) {
entry->id = FLOW_ACTION_PTYPE;
entry->ptype = tcf_skbedit_ptype(act);
+ } else if (is_tcf_skbedit_priority(act)) {
+ entry->id = FLOW_ACTION_PRIORITY;
+ entry->priority = tcf_skbedit_priority(act);
} else {
err = -EOPNOTSUPP;
goto err_out_locked;