]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00223249 : fix Ethernet performance downgrade issue.
authorFugang Duan <B38611@freescale.com>
Thu, 6 Sep 2012 06:13:00 +0000 (14:13 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:23 +0000 (08:35 +0200)
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 <B38611@freescale.com>
drivers/net/fec.c

index b1fa4647f911a3e1ba83c8ccf2fa4cf5668e397d..5af378f391eed24e17df90de8a83793f4709d7b7 100755 (executable)
@@ -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           1     /* Must be power of two */
-#define TX_RING_MOD_MASK       1     /*   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))