aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/freescale/fec.h
diff options
context:
space:
mode:
authorFrank Li <Frank.Li@freescale.com>2013-01-16 11:55:58 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-18 14:16:11 -0500
commitbaa70a5c48a01ea02e32270eb96eb19bd3b76667 (patch)
tree723639105a31fa1abb31261e17108b38cdd85178 /drivers/net/ethernet/freescale/fec.h
parent8b5b6f5413e97c3e8bafcdd67553d508f4f698cd (diff)
net: fec: enable pause frame to improve rx prefomance for 1G network
The limition of imx6 internal bus cause fec can't achieve 1G perfomance. There will be many packages lost because FIFO over run. This patch enable pause frame flow control. Before this patch iperf -s -i 1 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 4] local 10.192.242.153 port 5001 connected with 10.192.242.94 port 49773 [ ID] Interval Transfer Bandwidth [ 4] 0.0- 1.0 sec 6.35 MBytes 53.3 Mbits/sec [ 4] 1.0- 2.0 sec 3.39 MBytes 28.5 Mbits/sec [ 4] 2.0- 3.0 sec 2.63 MBytes 22.1 Mbits/sec [ 4] 3.0- 4.0 sec 1.10 MBytes 9.23 Mbits/sec ifconfig RX packets:46195 errors:1859 dropped:1 overruns:1859 frame:1859 After this patch iperf -s -i 1 [ 4] local 10.192.242.153 port 5001 connected with 10.192.242.94 port 49757 [ ID] Interval Transfer Bandwidth [ 4] 0.0- 1.0 sec 49.8 MBytes 418 Mbits/sec [ 4] 1.0- 2.0 sec 50.1 MBytes 420 Mbits/sec [ 4] 2.0- 3.0 sec 47.5 MBytes 399 Mbits/sec [ 4] 3.0- 4.0 sec 45.9 MBytes 385 Mbits/sec [ 4] 4.0- 5.0 sec 44.8 MBytes 376 Mbits/sec ifconfig RX packets:2348454 errors:0 dropped:16 overruns:0 frame:0 Signed-off-by: Frank Li <Frank.Li@freescale.com> Signed-off-by: Fugang Duan <B38611@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/fec.h')
-rw-r--r--drivers/net/ethernet/freescale/fec.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h
index 48623947d956..2ebedaf7ad81 100644
--- a/drivers/net/ethernet/freescale/fec.h
+++ b/drivers/net/ethernet/freescale/fec.h
@@ -48,6 +48,10 @@
48#define FEC_R_DES_START 0x180 /* Receive descriptor ring */ 48#define FEC_R_DES_START 0x180 /* Receive descriptor ring */
49#define FEC_X_DES_START 0x184 /* Transmit descriptor ring */ 49#define FEC_X_DES_START 0x184 /* Transmit descriptor ring */
50#define FEC_R_BUFF_SIZE 0x188 /* Maximum receive buff size */ 50#define FEC_R_BUFF_SIZE 0x188 /* Maximum receive buff size */
51#define FEC_R_FIFO_RSFL 0x190 /* Receive FIFO section full threshold */
52#define FEC_R_FIFO_RSEM 0x194 /* Receive FIFO section empty threshold */
53#define FEC_R_FIFO_RAEM 0x198 /* Receive FIFO almost empty threshold */
54#define FEC_R_FIFO_RAFL 0x19c /* Receive FIFO almost full threshold */
51#define FEC_MIIGSK_CFGR 0x300 /* MIIGSK Configuration reg */ 55#define FEC_MIIGSK_CFGR 0x300 /* MIIGSK Configuration reg */
52#define FEC_MIIGSK_ENR 0x308 /* MIIGSK Enable reg */ 56#define FEC_MIIGSK_ENR 0x308 /* MIIGSK Enable reg */
53 57
@@ -243,6 +247,7 @@ struct fec_enet_private {
243 struct completion mdio_done; 247 struct completion mdio_done;
244 int irq[FEC_IRQ_NUM]; 248 int irq[FEC_IRQ_NUM];
245 int bufdesc_ex; 249 int bufdesc_ex;
250 int pause_flag;
246 251
247 struct ptp_clock *ptp_clock; 252 struct ptp_clock *ptp_clock;
248 struct ptp_clock_info ptp_caps; 253 struct ptp_clock_info ptp_caps;