]> git.baikalelectronics.ru Git - kernel.git/commit
net: fix IFF_NO_QUEUE for drivers using alloc_netdev
authorPhil Sutter <phil@nwl.cc>
Thu, 27 Aug 2015 19:21:36 +0000 (21:21 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Aug 2015 00:14:29 +0000 (17:14 -0700)
commit1d2fa6fd15a0023e76da0864d22ee9f7fb3b6688
tree34835da4b0468e962af7db25d434c19769285c1a
parentf69fbf4470d26e28a37490bf9de9f9d823f7c1dc
net: fix IFF_NO_QUEUE for drivers using alloc_netdev

Printing a warning in alloc_netdev_mqs() if tx_queue_len is zero and
IFF_NO_QUEUE not set is not appropriate since drivers may use one of the
alloc_netdev* macros instead of alloc_etherdev*, thereby not
intentionally leaving tx_queue_len uninitialized. Instead check here if
tx_queue_len is zero and set IFF_NO_QUEUE, so the value of tx_queue_len
can be ignored in net/sched_generic.c.

Fixes: d7da33e ("net: warn if drivers set tx_queue_len = 0")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c