summaryrefslogtreecommitdiffstats
path: root/net/sched/cls_api.c
diff options
context:
space:
mode:
authorJiri Pirko2017-05-17 11:08:03 +0200
committerDavid S. Miller2017-05-17 21:22:13 +0200
commitdb50514f9a9c7ef1f17e9921b1cc0902746872f3 (patch)
treee4af45ac3ad3c3c8c24774564873cba0b309b7a2 /net/sched/cls_api.c
parentnet: sched: push tp down to action init (diff)
downloadkernel-qcow2-linux-db50514f9a9c7ef1f17e9921b1cc0902746872f3.tar.gz
kernel-qcow2-linux-db50514f9a9c7ef1f17e9921b1cc0902746872f3.tar.xz
kernel-qcow2-linux-db50514f9a9c7ef1f17e9921b1cc0902746872f3.zip
net: sched: add termination action to allow goto chain
Introduce new type of termination action called "goto_chain". This allows user to specify a chain to be processed. This action type is then processed as a return value in tcf_classify loop in similar way as "reclassify" is, only it does not reset to the first filter in chain but rather reset to the first filter of the desired chain. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 9e0c4bb82528..4020b8d932a1 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -307,8 +307,12 @@ reclassify:
err = tp->classify(skb, tp, res);
#ifdef CONFIG_NET_CLS_ACT
- if (unlikely(err == TC_ACT_RECLASSIFY && !compat_mode))
+ if (unlikely(err == TC_ACT_RECLASSIFY && !compat_mode)) {
goto reset;
+ } else if (unlikely(TC_ACT_EXT_CMP(err, TC_ACT_GOTO_CHAIN))) {
+ old_tp = res->goto_tp;
+ goto reset;
+ }
#endif
if (err >= 0)
return err;