Commit 823038ca authored by Xin Long's avatar Xin Long Committed by David S. Miller

dev_ioctl: add missing NETDEV_CHANGE_TX_QUEUE_LEN event notification

When changing dev tx_queue_len via netlink or net-sysfs,
a NETDEV_CHANGE_TX_QUEUE_LEN event notification will be
called.

But dev_ioctl missed this event notification, which could
cause no userspace notification would be sent.
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c019b516
...@@ -303,7 +303,18 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd) ...@@ -303,7 +303,18 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
case SIOCSIFTXQLEN: case SIOCSIFTXQLEN:
if (ifr->ifr_qlen < 0) if (ifr->ifr_qlen < 0)
return -EINVAL; return -EINVAL;
dev->tx_queue_len = ifr->ifr_qlen; 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;
return err;
}
}
return 0; return 0;
case SIOCSIFNAME: case SIOCSIFNAME:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment