]> Git Repo - linux.git/commitdiff
net: sched: Fix setting last executed chain on skb extension
authorPaul Blakey <[email protected]>
Mon, 6 Apr 2020 15:36:56 +0000 (18:36 +0300)
committerDavid S. Miller <[email protected]>
Wed, 8 Apr 2020 01:32:08 +0000 (18:32 -0700)
After driver sets the missed chain on the tc skb extension it is
consumed (deleted) by tc_classify_ingress and tc jumps to that chain.
If tc now misses on this chain (either no match, or no goto action),
then last executed chain remains 0, and the skb extension is not re-added,
and the next datapath (ovs) will start from 0.

Fix that by setting last executed chain to the chain read from the skb
extension, so if there is a miss, we set it back.

Fixes: af699626ee26 ("net: sched: Support specifying a starting chain via tc skb ext")
Reviewed-by: Oz Shlomo <[email protected]>
Reviewed-by: Jiri Pirko <[email protected]>
Signed-off-by: Paul Blakey <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/sched/cls_api.c

index f6a3b969ead0d25e422a67121a4ba7d5bf26e1b6..55bd1429678f996a328f2be6fdb0b7e0de771168 100644 (file)
@@ -1667,6 +1667,7 @@ int tcf_classify_ingress(struct sk_buff *skb,
                skb_ext_del(skb, TC_SKB_EXT);
 
                tp = rcu_dereference_bh(fchain->filter_chain);
+               last_executed_chain = fchain->index;
        }
 
        ret = __tcf_classify(skb, tp, orig_tp, res, compat_mode,
This page took 0.061481 seconds and 4 git commands to generate.