]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/core/rtnetlink.c
net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
[mirror_ubuntu-artful-kernel.git] / net / core / rtnetlink.c
index cfed7bc14ee6d93a97fc0eb9b0bc896044671cb1..a9e3805af739c9b8d87fba66ed305fa00ced4e65 100644 (file)
@@ -1927,11 +1927,19 @@ static int do_setlink(const struct sk_buff *skb,
 
        if (tb[IFLA_TXQLEN]) {
                unsigned long value = nla_get_u32(tb[IFLA_TXQLEN]);
-
-               if (dev->tx_queue_len ^ value)
+               unsigned long orig_len = dev->tx_queue_len;
+
+               if (dev->tx_queue_len ^ value) {
+                       dev->tx_queue_len = value;
+                       err = call_netdevice_notifiers(
+                             NETDEV_CHANGE_TX_QUEUE_LEN, dev);
+                       err = notifier_to_errno(err);
+                       if (err) {
+                               dev->tx_queue_len = orig_len;
+                               goto errout;
+                       }
                        status |= DO_SETLINK_NOTIFY;
-
-               dev->tx_queue_len = value;
+               }
        }
 
        if (tb[IFLA_OPERSTATE])