aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_api.c
diff options
context:
space:
mode:
authorJohn Hurley <[email protected]>2019-08-04 15:09:04 +0000
committerDavid S. Miller <[email protected]>2019-08-06 21:24:21 +0000
commitfb1b775a247ee8d846152841f780eba6cb71bcfc (patch)
tree083b01d1cab4f3242915fe134fdf29e8f60fedf9 /net/sched/cls_api.c
parentnet: tc_act: add skbedit_ptype helper functions (diff)
downloadkernel-fb1b775a247ee8d846152841f780eba6cb71bcfc.tar.gz
kernel-fb1b775a247ee8d846152841f780eba6cb71bcfc.zip
net: sched: add skbedit of ptype action to hardware IR
TC rules can impliment skbedit actions. Currently actions that modify the skb mark are passed to offloading drivers via the hardware intermediate representation in the flow_offload API. Extend this to include skbedit actions that modify the packet type of the skb. Such actions may be used to set the ptype to HOST when redirecting a packet to ingress. Signed-off-by: John Hurley <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/sched/cls_api.c')
-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 3565d9aa09aa..ae73d3705571 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3294,6 +3294,9 @@ int tc_setup_flow_action(struct flow_action *flow_action,
default:
goto err_out;
}
+ } else if (is_tcf_skbedit_ptype(act)) {
+ entry->id = FLOW_ACTION_PTYPE;
+ entry->ptype = tcf_skbedit_ptype(act);
} else {
goto err_out;
}