* [PATCH net] pktgen: fix xmit test for BQL enabled devices
@ 2014-04-07 15:18 Daniel Borkmann
2014-04-07 19:21 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Borkmann @ 2014-04-07 15:18 UTC (permalink / raw)
To: davem; +Cc: netdev, Eric Dumazet
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>
---
net/core/pktgen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index d0dac57..d068ec2 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3340,7 +3340,7 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev)
__netif_tx_lock_bh(txq);
- if (unlikely(netif_xmit_frozen_or_stopped(txq))) {
+ if (unlikely(netif_xmit_frozen_or_drv_stopped(txq))) {
ret = NETDEV_TX_BUSY;
pkt_dev->last_ok = 0;
goto unlock;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net] pktgen: fix xmit test for BQL enabled devices
2014-04-07 15:18 [PATCH net] pktgen: fix xmit test for BQL enabled devices Daniel Borkmann
@ 2014-04-07 19:21 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-04-07 19:21 UTC (permalink / raw)
To: dborkman; +Cc: netdev, edumazet
From: Daniel Borkmann <dborkman@redhat.com>
Date: Mon, 7 Apr 2014 17:18:30 +0200
> 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>
Applied, thanks a lot Daniel.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-07 19:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-07 15:18 [PATCH net] pktgen: fix xmit test for BQL enabled devices Daniel Borkmann
2014-04-07 19:21 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).