summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_dsmark.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2017-06-06 14:12:02 +0200
committerDavid S. Miller <davem@davemloft.net>2017-06-06 18:45:23 +0200
commite25ea21ffa66a029acfa89d2611c0e7ef23e7d8c (patch)
tree3e8fbece4830c9e608bc3f324a896b04d6efa288 /net/sched/sch_dsmark.c
parentnet/mlxfw: remove redundant goto on error check (diff)
downloadlinux-e25ea21ffa66a029acfa89d2611c0e7ef23e7d8c.tar.xz
linux-e25ea21ffa66a029acfa89d2611c0e7ef23e7d8c.zip
net: sched: introduce a TRAP control action
There is need to instruct the HW offloaded path to push certain matched packets to cpu/kernel for further analysis. So this patch introduces a new TRAP control action to TC. For kernel datapath, this action does not make much sense. So with the same logic as in HW, new TRAP behaves similar to STOLEN. The skb is just dropped in the datapath (and virtually ejected to an upper level, which does not exist in case of kernel). Signed-off-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Yotam Gigi <yotamg@mellanox.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_dsmark.c')
-rw-r--r--net/sched/sch_dsmark.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index 7ccdd825d34e..6d94fcc3592a 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -243,6 +243,7 @@ static int dsmark_enqueue(struct sk_buff *skb, struct Qdisc *sch,
#ifdef CONFIG_NET_CLS_ACT
case TC_ACT_QUEUED:
case TC_ACT_STOLEN:
+ case TC_ACT_TRAP:
__qdisc_drop(skb, to_free);
return NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;