Skip to content

Commit 906470c

Browse files
Phil Sutterdavem330
authored andcommitted
net: warn if drivers set tx_queue_len = 0
Due to the introduction of IFF_NO_QUEUE, there is a better way for drivers to indicate that no qdisc should be attached by default. Though, the old convention can't be dropped since ignoring that setting would break drivers still using it. Instead, add a warning so out-of-tree driver maintainers get a chance to adjust their code before we finally get rid of any special handling of tx_queue_len == 0. Signed-off-by: Phil Sutter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7d9e437 commit 906470c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/core/dev.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6997,6 +6997,9 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
69976997
dev->priv_flags = IFF_XMIT_DST_RELEASE | IFF_XMIT_DST_RELEASE_PERM;
69986998
setup(dev);
69996999

7000+
if (!dev->tx_queue_len)
7001+
printk(KERN_WARNING "%s uses DEPRECATED zero tx_queue_len - convert driver to use IFF_NO_QUEUE instead.\n", name);
7002+
70007003
dev->num_tx_queues = txqs;
70017004
dev->real_num_tx_queues = txqs;
70027005
if (netif_alloc_netdev_queues(dev))

0 commit comments

Comments
 (0)