From aa7000ca5b9d06352dda13a43d70c59247b99507 Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Sun, 24 Nov 2024 00:22:56 +0100 Subject: [PATCH] Revert "net/sched: accept TCA_STAB only for root qdisc" This reverts commit 7ce031a5e733b351d97f7a185ba42a4cfeba6892. --- include/net/sch_generic.h | 1 + net/sched/sch_api.c | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 31ba4b744..c9b94829a 100755 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -833,6 +833,7 @@ static inline void qdisc_calculate_pkt_len(struct sk_buff *skb, static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) { + qdisc_calculate_pkt_len(skb, sch); return sch->enqueue(skb, sch, to_free); } diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index b4e405676..6c712c26d 100755 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -589,6 +589,7 @@ out: pkt_len = 1; qdisc_skb_cb(skb)->pkt_len = pkt_len; } +EXPORT_SYMBOL(__qdisc_calculate_pkt_len); void qdisc_warn_nonwc(const char *txt, struct Qdisc *qdisc) { @@ -1118,12 +1119,6 @@ skip: return -EINVAL; } - if (new && - !(parent->flags & TCQ_F_MQROOT) && - rcu_access_pointer(new->stab)) { - NL_SET_ERR_MSG(extack, "STAB not supported on a non root"); - return -EINVAL; - } err = cops->graft(parent, cl, new, &old, extack); if (err) return err;