Revert "net/sched: accept TCA_STAB only for root qdisc"

This reverts commit 7ce031a5e7.
This commit is contained in:
Ksawlii 2024-11-24 00:22:56 +01:00
parent e0175afaa9
commit aa7000ca5b
2 changed files with 2 additions and 6 deletions

View file

@ -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, static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct sk_buff **to_free) struct sk_buff **to_free)
{ {
qdisc_calculate_pkt_len(skb, sch);
return sch->enqueue(skb, sch, to_free); return sch->enqueue(skb, sch, to_free);
} }

View file

@ -589,6 +589,7 @@ out:
pkt_len = 1; pkt_len = 1;
qdisc_skb_cb(skb)->pkt_len = pkt_len; qdisc_skb_cb(skb)->pkt_len = pkt_len;
} }
EXPORT_SYMBOL(__qdisc_calculate_pkt_len);
void qdisc_warn_nonwc(const char *txt, struct Qdisc *qdisc) void qdisc_warn_nonwc(const char *txt, struct Qdisc *qdisc)
{ {
@ -1118,12 +1119,6 @@ skip:
return -EINVAL; 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); err = cops->graft(parent, cl, new, &old, extack);
if (err) if (err)
return err; return err;