aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_api.c
diff options
context:
space:
mode:
authorPaul Blakey <[email protected]>2021-12-14 17:24:33 +0000
committerJakub Kicinski <[email protected]>2021-12-18 02:06:35 +0000
commitec624fe740b416fb68d536b37fb8eef46f90b5c2 (patch)
treef7ddbdb78f90306a5ba98a51683f2a0105088757 /net/sched/cls_api.c
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf (diff)
downloadkernel-ec624fe740b416fb68d536b37fb8eef46f90b5c2.tar.gz
kernel-ec624fe740b416fb68d536b37fb8eef46f90b5c2.zip
net/sched: Extend qdisc control block with tc control block
BPF layer extends the qdisc control block via struct bpf_skb_data_end and because of that there is no more room to add variables to the qdisc layer control block without going over the skb->cb size. Extend the qdisc control block with a tc control block, and move all tc related variables to there as a pre-step for extending the tc control block with additional members. Signed-off-by: Paul Blakey <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r--net/sched/cls_api.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index e54f0a42270c..ff8a9383bf1c 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -1617,12 +1617,14 @@ int tcf_classify(struct sk_buff *skb,
/* If we missed on some chain */
if (ret == TC_ACT_UNSPEC && last_executed_chain) {
+ struct tc_skb_cb *cb = tc_skb_cb(skb);
+
ext = tc_skb_ext_alloc(skb);
if (WARN_ON_ONCE(!ext))
return TC_ACT_SHOT;
ext->chain = last_executed_chain;
- ext->mru = qdisc_skb_cb(skb)->mru;
- ext->post_ct = qdisc_skb_cb(skb)->post_ct;
+ ext->mru = cb->mru;
+ ext->post_ct = cb->post_ct;
}
return ret;