From: Fugang Duan Date: Thu, 6 Sep 2012 06:13:00 +0000 (+0800) Subject: ENGR00223249 : fix Ethernet performance downgrade issue. X-Git-Tag: v3.0.35-fsl~486 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8c4c500e8e5156c59599e40f9253814ee85cc702;p=karo-tx-linux.git ENGR00223249 : fix Ethernet performance downgrade issue. Ethernet performance is downgraded when wait mode on in 100Mbps mode. wait mode off: 100Mbps mode: tx bandwidth is 94Mbps rx bandwidth is 94Mbps wait mode on: 100Mbps mode: tx bandwidth is 30Mbps rx bandwidth is 94Mbps After apply the patch: wait mode on: 100Mbps mode: tx bandwidth is 94Mbps rx bandwidth is 94Mbps Wait mode on cause enet interrupt has long latency, which results in BD entries are full and stop tx queue, so cpus have more chance to enter wait mode. Incresing TX BD entries can properly accommodate the blance between BD request before tx packets and BD release after tx completion in interrupt process. Signed-off-by: Fugang Duan --- diff --git a/drivers/net/fec.c b/drivers/net/fec.c index b1fa4647f911..5af378f391ee 100755 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -122,8 +122,8 @@ MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address"); #define RX_RING_SIZE (FEC_ENET_RX_FRPPG * FEC_ENET_RX_PAGES) #define FEC_ENET_TX_FRSIZE 2048 #define FEC_ENET_TX_FRPPG (PAGE_SIZE / FEC_ENET_TX_FRSIZE) -#define TX_RING_SIZE 16 /* Must be power of two */ -#define TX_RING_MOD_MASK 15 /* for this to work */ +#define TX_RING_SIZE 128 /* Must be power of two */ +#define TX_RING_MOD_MASK 127 /* for this to work */ #define BUFDES_SIZE ((RX_RING_SIZE + TX_RING_SIZE) * sizeof(struct bufdesc))