net: use dev_change_tx_queue_len() for SIOCSIFTXQLEN
As noticed by Eric, we need to switch to the helper dev_change_tx_queue_len() for SIOCSIFTXQLEN call path too, otheriwse still miss dev_qdisc_change_tx_queue_len(). Fixes: 6a643ddb5624 ("net: introduce helper dev_change_tx_queue_len()") Reported-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ced9e19150
commit
3f76df1982
@ -285,16 +285,9 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
|
|||||||
if (ifr->ifr_qlen < 0)
|
if (ifr->ifr_qlen < 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (dev->tx_queue_len ^ ifr->ifr_qlen) {
|
if (dev->tx_queue_len ^ ifr->ifr_qlen) {
|
||||||
unsigned int orig_len = dev->tx_queue_len;
|
err = dev_change_tx_queue_len(dev, ifr->ifr_qlen);
|
||||||
|
if (err)
|
||||||
dev->tx_queue_len = ifr->ifr_qlen;
|
|
||||||
err = call_netdevice_notifiers(
|
|
||||||
NETDEV_CHANGE_TX_QUEUE_LEN, dev);
|
|
||||||
err = notifier_to_errno(err);
|
|
||||||
if (err) {
|
|
||||||
dev->tx_queue_len = orig_len;
|
|
||||||
return err;
|
return err;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user