Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 225734de authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

net_sched: make qdisc_tree_decrease_qlen() work for non mq



Stas Nichiporovich reported a regression in his HFSC qdisc setup
on a non multi queue device.

It turns out I mistakenly added a TCQ_F_NOPARENT flag on all qdisc
allocated in qdisc_create() for non multi queue devices, which was
rather buggy. I was clearly mislead by the TCQ_F_ONETXQUEUE that is
also set here for no good reason, since it only matters for the root
qdisc.

Fixes: 4eaf3b84 ("net_sched: fix qdisc_tree_decrease_qlen() races")
Reported-by: default avatarStas Nichiporovich <stasn77@gmail.com>
Tested-by: default avatarStas Nichiporovich <stasn77@gmail.com>
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 58ab367b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -950,7 +950,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue,
		}
		}
		lockdep_set_class(qdisc_lock(sch), &qdisc_tx_lock);
		lockdep_set_class(qdisc_lock(sch), &qdisc_tx_lock);
		if (!netif_is_multiqueue(dev))
		if (!netif_is_multiqueue(dev))
			sch->flags |= TCQ_F_ONETXQUEUE | TCQ_F_NOPARENT;
			sch->flags |= TCQ_F_ONETXQUEUE;
	}
	}


	sch->handle = handle;
	sch->handle = handle;