Patchwork [6/9] sky2: reduce default transmit ring

login
register
mail settings
Submitter stephen hemminger
Date June 17, 2009, 5:30 p.m.
Message ID <20090617173140.074593860@vyatta.com>
Download mbox | patch
Permalink /patch/28800/
State Accepted
Delegated to: David Miller
Headers show

Comments

stephen hemminger - June 17, 2009, 5:30 p.m.
Reduce the size of the driver transmit ring to reduce latency
and allow qdisc to do better rate control.  Also make it
obvious what the minimum transmit ring allowed is and why.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
David Miller - June 18, 2009, 1:51 a.m.
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 17 Jun 2009 10:30:37 -0700

> Reduce the size of the driver transmit ring to reduce latency
> and allow qdisc to do better rate control.  Also make it
> obvious what the minimum transmit ring allowed is and why.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- a/drivers/net/sky2.c	2009-06-17 10:29:56.510685400 -0700
+++ b/drivers/net/sky2.c	2009-06-17 10:29:57.400008862 -0700
@@ -65,9 +65,9 @@ 
 #define RX_DEF_PENDING		RX_MAX_PENDING
 
 #define TX_RING_SIZE		512
-#define TX_DEF_PENDING		(TX_RING_SIZE - 1)
-#define TX_MIN_PENDING		64
+#define TX_DEF_PENDING		128
 #define MAX_SKB_TX_LE		(4 + (sizeof(dma_addr_t)/sizeof(u32))*MAX_SKB_FRAGS)
+#define TX_MIN_PENDING		(MAX_SKB_TX_LE+1)
 
 #define STATUS_RING_SIZE	2048	/* 2 ports * (TX + 2*RX) */
 #define STATUS_LE_BYTES		(STATUS_RING_SIZE*sizeof(struct sky2_status_le))