diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2020-03-10 17:53:35 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-11 23:17:28 -0700 |
commit | 4cda75275f9f89f9485b0ca4d6950c95258a9bce (patch) | |
tree | 2c8a0b60de98ed17368e8daa55dae141569c2bbb /include/net | |
parent | dacf470b26418e91bef195342b25a234c94052e3 (diff) |
net: sched: make newly activated qdiscs visible
In their .attach callback, mq[prio] only add the qdiscs of the currently
active TX queues to the device's qdisc hash list.
If a user later increases the number of active TX queues, their qdiscs
are not visible via eg. 'tc qdisc show'.
Add a hook to netif_set_real_num_tx_queues() that walks all active
TX queues and adds those which are missing to the hash list.
CC: Eric Dumazet <edumazet@google.com>
CC: Jamal Hadi Salim <jhs@mojatatu.com>
CC: Cong Wang <xiyou.wangcong@gmail.com>
CC: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/sch_generic.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 151208704ed2..7bfc45c5b602 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -153,6 +153,11 @@ static inline bool qdisc_is_empty(const struct Qdisc *qdisc) return !READ_ONCE(qdisc->q.qlen); } +static inline bool qdisc_hashed(struct Qdisc *qdisc) +{ + return hash_hashed(&qdisc->hash); +} + static inline bool qdisc_run_begin(struct Qdisc *qdisc) { if (qdisc->flags & TCQ_F_NOLOCK) { @@ -629,6 +634,7 @@ void qdisc_class_hash_grow(struct Qdisc *, struct Qdisc_class_hash *); void qdisc_class_hash_destroy(struct Qdisc_class_hash *); int dev_qdisc_change_tx_queue_len(struct net_device *dev); +void dev_qdisc_set_real_num_tx_queues(struct net_device *dev); void dev_init_scheduler(struct net_device *dev); void dev_shutdown(struct net_device *dev); void dev_activate(struct net_device *dev); |