diff options
author | Paul Blakey <paulb@mellanox.com> | 2020-02-16 12:01:21 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2020-02-19 17:49:48 -0800 |
commit | 9410c9409d3e3a1ee6a02a830f9b6ab678c456d1 (patch) | |
tree | 40d255675901e2c92324989ce74a74ee7b85d749 /net/core/dev.c | |
parent | 2bb07f4e1d861fbb6c05f3dd79bdc8b41dfd2c08 (diff) | |
download | linux-9410c9409d3e3a1ee6a02a830f9b6ab678c456d1.tar.gz linux-9410c9409d3e3a1ee6a02a830f9b6ab678c456d1.tar.bz2 linux-9410c9409d3e3a1ee6a02a830f9b6ab678c456d1.zip |
net: sched: Introduce ingress classification function
TC multi chain configuration can cause offloaded tc chains to miss in
hardware after jumping to some chain. In such cases the software should
continue from the chain that missed in hardware, as the hardware may
have manipulated the packet and updated some counters.
Currently a single tcf classification function serves both ingress and
egress. However, multi chain miss processing (get tc skb extension on
hw miss, set tc skb extension on tc miss) should happen only on
ingress.
Refactor the code to use ingress classification function, and move setting
the tc skb extension from general classification to it, as a prestep
for supporting the hw miss scenario.
Co-developed-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index a6316b336128..107af00e4932 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4860,7 +4860,8 @@ sch_handle_ingress(struct sk_buff *skb, struct packet_type **pt_prev, int *ret, skb->tc_at_ingress = 1; mini_qdisc_bstats_cpu_update(miniq, skb); - switch (tcf_classify(skb, miniq->filter_list, &cl_res, false)) { + switch (tcf_classify_ingress(skb, miniq->filter_list, &cl_res, + false)) { case TC_ACT_OK: case TC_ACT_RECLASSIFY: skb->tc_index = TC_H_MIN(cl_res.classid); |