diff options
author | Victor Nogueira <victor@mojatatu.com> | 2023-12-16 17:44:34 -0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-12-20 11:50:13 +0000 |
commit | fb2780721ca5e9f78bbe4544b819b929a982df9c (patch) | |
tree | fa410ccf9967d29a24610ce43b38a50f84e2f3de /include/net/pkt_cls.h | |
parent | 18764b883e157e28126b54e7d4ba9dd487d5bf54 (diff) | |
download | linux-fb2780721ca5e9f78bbe4544b819b929a982df9c.tar.gz linux-fb2780721ca5e9f78bbe4544b819b929a982df9c.tar.bz2 linux-fb2780721ca5e9f78bbe4544b819b929a982df9c.zip |
net: sched: Move drop_reason to struct tc_skb_cb
Move drop_reason from struct tcf_result to skb cb - more specifically to
struct tc_skb_cb. With that, we'll be able to also set the drop reason for
the remaining qdiscs (aside from clsact) that do not have access to
tcf_result when time comes to set the skb drop reason.
Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/pkt_cls.h')
-rw-r--r-- | include/net/pkt_cls.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index a76c9171db0e..761e4500cca0 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -154,10 +154,20 @@ __cls_set_class(unsigned long *clp, unsigned long cl) return xchg(clp, cl); } -static inline void tcf_set_drop_reason(struct tcf_result *res, +struct tc_skb_cb; + +static inline struct tc_skb_cb *tc_skb_cb(const struct sk_buff *skb); + +static inline enum skb_drop_reason +tcf_get_drop_reason(const struct sk_buff *skb) +{ + return tc_skb_cb(skb)->drop_reason; +} + +static inline void tcf_set_drop_reason(const struct sk_buff *skb, enum skb_drop_reason reason) { - res->drop_reason = reason; + tc_skb_cb(skb)->drop_reason = reason; } static inline void |