Skip to content

Commit

Permalink
net: use dev_change_tx_queue_len() for SIOCSIFTXQLEN
Browse files Browse the repository at this point in the history
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: 6a643dd ("net: introduce helper dev_change_tx_queue_len()")
Reported-by: Eric Dumazet <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
congwang authored and davem330 committed Jun 30, 2018
1 parent ced9e19 commit 3f76df1
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions net/core/dev_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,16 +285,9 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
if (ifr->ifr_qlen < 0)
return -EINVAL;
if (dev->tx_queue_len ^ ifr->ifr_qlen) {
unsigned int orig_len = dev->tx_queue_len;

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;
err = dev_change_tx_queue_len(dev, ifr->ifr_qlen);
if (err)
return err;
}
}
return 0;

Expand Down

0 comments on commit 3f76df1

Please sign in to comment.