RE: [PATCH v1 4/6] net: fec: Increase buffer descriptor entry number
From: fugang.duan@freescale.com <hidden>
Date: 2014-05-30 09:42:55
From: David Laight <redacted> Data: Friday, May 30, 2014 5:11 PM
To: Duan Fugang-B38611; Li Frank-B20596; davem@davemloft.net Cc: ezequiel.garcia@free-electrons.com; netdev@vger.kernel.org; shawn.guo@linaro.org; bhutchings@solarflare.com; stephen@networkplumber.org Subject: RE: [PATCH v1 4/6] net: fec: Increase buffer descriptor entry number From: Fugang Duanquoted
In order to support SG, software TSO, let's increase BD entry number.Software TSO shouldn't significantly increase the number of descriptors required. I'd guess it makes a lot of packets have 2 fragments. ...quoted
-#define FEC_ENET_RX_PAGES 8 +#define FEC_ENET_RX_PAGES 256Supporting TSO shouldn't need more RX descriptors. While 16 descriptors isn't that many, 512 is a lot. If PAGE_SIZE is greater than 4k it is a huge amount of memory.
Yes, 16 descriptors is little, increase BD entry size can improve the performance. And I want to add the later patch to support interrupt coalescing, which need more BD descriptors.
quoted
#define FEC_ENET_RX_FRSIZE 2048 #define FEC_ENET_RX_FRPPG (PAGE_SIZE / FEC_ENET_RX_FRSIZE) #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 512 /* Must be power of two */ +#define TX_RING_MOD_MASK 511 /* for this to work */Does the driver support BQL (or similar) in order to limit the amount of queued tx traffic? Otherwise you've significantly increased the latency for connections other than one doing bulk tx. David
The driver still don't support BQL. I will add the feature to support FEC. Thanks for your advise. Thanks, Andy