Revert "net: sched: update default qdisc visibility after Tx queue cnt changes"
This reverts commit8d433ab5c8
which is commit 1e080f17750d1083e8a32f7b350584ae1cd7ff20 upstream. It breaks the current kernel abi and is not necessary for Android systems, so it can be safely reverted. Bug: 161946584 Fixes:8d433ab5c8
("net: sched: update default qdisc visibility after Tx queue cnt changes") Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I9844bcc7deae772026e0dc7b1265b39e392342ec
This commit is contained in:
parent
2d94ebb760
commit
e101be336e
@ -307,8 +307,6 @@ struct Qdisc_ops {
|
||||
struct netlink_ext_ack *extack);
|
||||
void (*attach)(struct Qdisc *sch);
|
||||
int (*change_tx_queue_len)(struct Qdisc *, unsigned int);
|
||||
void (*change_real_num_tx)(struct Qdisc *sch,
|
||||
unsigned int new_real_tx);
|
||||
|
||||
int (*dump)(struct Qdisc *, struct sk_buff *);
|
||||
int (*dump_stats)(struct Qdisc *, struct gnet_dump *);
|
||||
@ -692,8 +690,6 @@ 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_change_real_num_tx(struct net_device *dev,
|
||||
unsigned int new_real_tx);
|
||||
void dev_init_scheduler(struct net_device *dev);
|
||||
void dev_shutdown(struct net_device *dev);
|
||||
void dev_activate(struct net_device *dev);
|
||||
|
@ -2980,8 +2980,6 @@ int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq)
|
||||
if (dev->num_tc)
|
||||
netif_setup_tc(dev, txq);
|
||||
|
||||
dev_qdisc_change_real_num_tx(dev, txq);
|
||||
|
||||
dev->real_num_tx_queues = txq;
|
||||
|
||||
if (disabling) {
|
||||
|
@ -1303,15 +1303,6 @@ static int qdisc_change_tx_queue_len(struct net_device *dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dev_qdisc_change_real_num_tx(struct net_device *dev,
|
||||
unsigned int new_real_tx)
|
||||
{
|
||||
struct Qdisc *qdisc = dev->qdisc;
|
||||
|
||||
if (qdisc->ops->change_real_num_tx)
|
||||
qdisc->ops->change_real_num_tx(qdisc, new_real_tx);
|
||||
}
|
||||
|
||||
int dev_qdisc_change_tx_queue_len(struct net_device *dev)
|
||||
{
|
||||
bool up = dev->flags & IFF_UP;
|
||||
|
@ -125,29 +125,6 @@ static void mq_attach(struct Qdisc *sch)
|
||||
priv->qdiscs = NULL;
|
||||
}
|
||||
|
||||
static void mq_change_real_num_tx(struct Qdisc *sch, unsigned int new_real_tx)
|
||||
{
|
||||
#ifdef CONFIG_NET_SCHED
|
||||
struct net_device *dev = qdisc_dev(sch);
|
||||
struct Qdisc *qdisc;
|
||||
unsigned int i;
|
||||
|
||||
for (i = new_real_tx; i < dev->real_num_tx_queues; i++) {
|
||||
qdisc = netdev_get_tx_queue(dev, i)->qdisc_sleeping;
|
||||
/* Only update the default qdiscs we created,
|
||||
* qdiscs with handles are always hashed.
|
||||
*/
|
||||
if (qdisc != &noop_qdisc && !qdisc->handle)
|
||||
qdisc_hash_del(qdisc);
|
||||
}
|
||||
for (i = dev->real_num_tx_queues; i < new_real_tx; i++) {
|
||||
qdisc = netdev_get_tx_queue(dev, i)->qdisc_sleeping;
|
||||
if (qdisc != &noop_qdisc && !qdisc->handle)
|
||||
qdisc_hash_add(qdisc, false);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static int mq_dump(struct Qdisc *sch, struct sk_buff *skb)
|
||||
{
|
||||
struct net_device *dev = qdisc_dev(sch);
|
||||
@ -311,7 +288,6 @@ struct Qdisc_ops mq_qdisc_ops __read_mostly = {
|
||||
.init = mq_init,
|
||||
.destroy = mq_destroy,
|
||||
.attach = mq_attach,
|
||||
.change_real_num_tx = mq_change_real_num_tx,
|
||||
.dump = mq_dump,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
@ -306,28 +306,6 @@ static void mqprio_attach(struct Qdisc *sch)
|
||||
priv->qdiscs = NULL;
|
||||
}
|
||||
|
||||
static void mqprio_change_real_num_tx(struct Qdisc *sch,
|
||||
unsigned int new_real_tx)
|
||||
{
|
||||
struct net_device *dev = qdisc_dev(sch);
|
||||
struct Qdisc *qdisc;
|
||||
unsigned int i;
|
||||
|
||||
for (i = new_real_tx; i < dev->real_num_tx_queues; i++) {
|
||||
qdisc = netdev_get_tx_queue(dev, i)->qdisc_sleeping;
|
||||
/* Only update the default qdiscs we created,
|
||||
* qdiscs with handles are always hashed.
|
||||
*/
|
||||
if (qdisc != &noop_qdisc && !qdisc->handle)
|
||||
qdisc_hash_del(qdisc);
|
||||
}
|
||||
for (i = dev->real_num_tx_queues; i < new_real_tx; i++) {
|
||||
qdisc = netdev_get_tx_queue(dev, i)->qdisc_sleeping;
|
||||
if (qdisc != &noop_qdisc && !qdisc->handle)
|
||||
qdisc_hash_add(qdisc, false);
|
||||
}
|
||||
}
|
||||
|
||||
static struct netdev_queue *mqprio_queue_get(struct Qdisc *sch,
|
||||
unsigned long cl)
|
||||
{
|
||||
@ -651,7 +629,6 @@ static struct Qdisc_ops mqprio_qdisc_ops __read_mostly = {
|
||||
.init = mqprio_init,
|
||||
.destroy = mqprio_destroy,
|
||||
.attach = mqprio_attach,
|
||||
.change_real_num_tx = mqprio_change_real_num_tx,
|
||||
.dump = mqprio_dump,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user