diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2014-04-07 11:18:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-07 15:20:44 -0400 |
commit | 6f25cd47dcd2b9912c6e52aa833ba1614f7b5086 (patch) | |
tree | b86524a8db6002c790bae2da003f4598b3ea8f2d /net | |
parent | c293fb785bdda64d88f197e6758a3c16ae83e569 (diff) |
pktgen: fix xmit test for BQL enabled devices
Similarly as in commit 8e2f1a63f221 ("packet: fix packet_direct_xmit
for BQL enabled drivers"), we test for __QUEUE_STATE_STACK_XOFF bit
in pktgen's xmit, which would not fully fill the device's TX ring for
BQL drivers that use netdev_tx_sent_queue(). Fix is to use, similarly
as we do in packet sockets, netif_xmit_frozen_or_drv_stopped() test.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/pktgen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index d0dac57291af..d068ec25db1e 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -3340,7 +3340,7 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev) | |||
3340 | 3340 | ||
3341 | __netif_tx_lock_bh(txq); | 3341 | __netif_tx_lock_bh(txq); |
3342 | 3342 | ||
3343 | if (unlikely(netif_xmit_frozen_or_stopped(txq))) { | 3343 | if (unlikely(netif_xmit_frozen_or_drv_stopped(txq))) { |
3344 | ret = NETDEV_TX_BUSY; | 3344 | ret = NETDEV_TX_BUSY; |
3345 | pkt_dev->last_ok = 0; | 3345 | pkt_dev->last_ok = 0; |
3346 | goto unlock; | 3346 | goto unlock; |