diff options
author | Paul Blakey <paulb@nvidia.com> | 2021-12-14 19:24:33 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-12-17 18:06:35 -0800 |
commit | ec624fe740b416fb68d536b37fb8eef46f90b5c2 (patch) | |
tree | f7ddbdb78f90306a5ba98a51683f2a0105088757 /include/net/pkt_sched.h | |
parent | 8ca4090fec0217bcb89531c8be80fcfa66a397a1 (diff) | |
download | lwn-ec624fe740b416fb68d536b37fb8eef46f90b5c2.tar.gz lwn-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 <paulb@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/pkt_sched.h')
-rw-r--r-- | include/net/pkt_sched.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index bf79f3a890af..05f18e81f3e8 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -193,4 +193,19 @@ static inline void skb_txtime_consumed(struct sk_buff *skb) skb->tstamp = ktime_set(0, 0); } +struct tc_skb_cb { + struct qdisc_skb_cb qdisc_cb; + + u16 mru; + bool post_ct; +}; + +static inline struct tc_skb_cb *tc_skb_cb(const struct sk_buff *skb) +{ + struct tc_skb_cb *cb = (struct tc_skb_cb *)skb->cb; + + BUILD_BUG_ON(sizeof(*cb) > sizeof_field(struct sk_buff, cb)); + return cb; +} + #endif |