Skip to contentSkip to conversation

net: use dev_change_tx_queue_len() for SIOCSIFTXQLEN

PATCH Applied Cong Wang 3 participants 3 messages Jun 29, 2018 – Jun 30, 2018

Subsystems (2)
lore
Share & tools
lore

Cong Wang

author
#0 lore raw

PATCH 1/1 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()")
---
 net/core/dev_ioctl.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
net/core/dev_ioctl.c +2 -9
index a04e1e88bf3a..50537ff961a7 100644
@@ -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;
 
Signature · 1 line
2.14.4
maintainer Applied
#2 lore raw
In reply to Cong Wang

From: Cong Wang <[email protected]>
Date: Fri, 29 Jun 2018 13:42:48 -0700

Quoted 7 lines

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()")

Applied.