netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sfc: efx: add support for skb->xmit_more
@ 2014-10-13 16:59 Daniel Borkmann
  2014-10-13 18:02 ` Edward Cree
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Borkmann @ 2014-10-13 16:59 UTC (permalink / raw)
  To: davem; +Cc: nikolay, netdev, Shradha Shah

Add support for xmit_more batching: efx has BQL support, thus we need
to only move the queue hang check before the hw tail pointer write
and test for xmit_more bit resp. whether the queue/stack has stopped.
Thanks to Nikolay Aleksandrov who had a Solarflare NIC to test!

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Nikolay Aleksandrov <nikolay@redhat.com>
Cc: Shradha Shah <sshah@solarflare.com>
---
 drivers/net/ethernet/sfc/tx.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c
index 3206098..566432c 100644
--- a/drivers/net/ethernet/sfc/tx.c
+++ b/drivers/net/ethernet/sfc/tx.c
@@ -439,13 +439,13 @@ finish_packet:
 
 	netdev_tx_sent_queue(tx_queue->core_txq, skb->len);
 
+	efx_tx_maybe_stop_queue(tx_queue);
+
 	/* Pass off to hardware */
-	efx_nic_push_buffers(tx_queue);
+	if (!skb->xmit_more || netif_xmit_stopped(tx_queue->core_txq))
+		efx_nic_push_buffers(tx_queue);
 
 	tx_queue->tx_packets++;
-
-	efx_tx_maybe_stop_queue(tx_queue);
-
 	return NETDEV_TX_OK;
 
  dma_err:
@@ -1308,11 +1308,12 @@ static int efx_enqueue_skb_tso(struct efx_tx_queue *tx_queue,
 
 	netdev_tx_sent_queue(tx_queue->core_txq, skb->len);
 
-	/* Pass off to hardware */
-	efx_nic_push_buffers(tx_queue);
-
 	efx_tx_maybe_stop_queue(tx_queue);
 
+	/* Pass off to hardware */
+	if (!skb->xmit_more || netif_xmit_stopped(tx_queue->core_txq))
+		efx_nic_push_buffers(tx_queue);
+
 	tx_queue->tso_bursts++;
 	return NETDEV_TX_OK;
 
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-10-22 12:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-13 16:59 [PATCH] sfc: efx: add support for skb->xmit_more Daniel Borkmann
2014-10-13 18:02 ` Edward Cree
2014-10-13 19:18   ` Daniel Borkmann
2014-10-14 18:41     ` [PATCH RFC net-next] sfc: " Edward Cree
2014-10-14 21:15       ` David Miller
2014-10-15 11:05         ` Edward Cree
2014-10-15 16:20           ` David Miller
2014-10-16 15:42             ` Jonathan Cooper
2014-10-16 16:36       ` Robert Stonehouse
2014-10-17 14:32         ` [PATCH " Edward Cree
2014-10-18  3:47           ` David Miller
2014-10-22  8:58           ` Ben Hutchings
2014-10-22 12:36             ` Edward Cree

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).