Skip to content

Commit

Permalink
net: warn if drivers set tx_queue_len = 0
Browse files Browse the repository at this point in the history
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 <phil@nwl.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Phil Sutter authored and David S. Miller committed Aug 18, 2015
1 parent 7d9e437 commit 906470c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -6997,6 +6997,9 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
dev->priv_flags = IFF_XMIT_DST_RELEASE | IFF_XMIT_DST_RELEASE_PERM;
setup(dev);

if (!dev->tx_queue_len)
printk(KERN_WARNING "%s uses DEPRECATED zero tx_queue_len - convert driver to use IFF_NO_QUEUE instead.\n", name);

dev->num_tx_queues = txqs;
dev->real_num_tx_queues = txqs;
if (netif_alloc_netdev_queues(dev))
Expand Down

0 comments on commit 906470c

Please sign in to comment.