net: macb: Increase DMA buffer size
Subsystems (3)
PATCH 1/1 net: macb: Increase DMA buffer size
From: Nathan Sullivan <[email protected]>
In recent testing with the RT patchset, we have seen cases where the transmit ring can fill even with up to 200 txbds in the ring. Increase the size of the DMA rings to avoid overruns.
Natinst-ReviewBoard-ID: 83662
--- drivers/net/ethernet/cadence/macb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/cadence/macb.c +2 -2
@@ -35,12 +35,12 @@#include "macb.h" -#define MACB_RX_BUFFER_SIZE 128 +#define MACB_RX_BUFFER_SIZE 1536#define RX_BUFFER_MULTIPLE 64/* bytes */ #define RX_RING_SIZE 512/* must be power of 2 */ #define RX_RING_BYTES (sizeof(struct macb_dma_desc) * RX_RING_SIZE) -#define TX_RING_SIZE 128/* must be power of 2 */ +#define TX_RING_SIZE 512/* must be power of 2 */ #define TX_RING_BYTES (sizeof(struct macb_dma_desc) * TX_RING_SIZE)/* level of occupied TX descriptors under which we wake up TX process */
Signature · 1 line
1.9.1
Quoted 19 lines · Xander Huff
From: Nathan Sullivan <[email protected]>
In recent testing with the RT patchset, we have seen cases where the transmit ring can fill even with up to 200 txbds in the ring. Increase the size of the DMA rings to avoid overruns.
Signed-off-by Nathan Sullivan <[email protected]>Acked-by Ben Shelton <[email protected]>Acked-by Jaeden Amero <[email protected]>Natinst-ReviewBoard-ID: 83662
--- drivers/net/ethernet/cadence/macb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/ethernet/cadence/macb.c +0
-0
drivers/net/ethernet/cadence/macb.c line 38
Quoted 5 lines
drivers/net/ethernet/cadence/macb.c +1
-1@@ -35,12 +35,12 @@#include "macb.h" -#define MACB_RX_BUFFER_SIZE 128 +#define MACB_RX_BUFFER_SIZE 1536
This change seems not covered by the commit message. Can you please separate the changes in 2 patches or elaborate a bit more the reason for this RX buffer size change.
Bye,
Quoted 10 lines
drivers/net/ethernet/cadence/macb.c +1
-1#define RX_BUFFER_MULTIPLE 64/* bytes */ #define RX_RING_SIZE 512/* must be power of 2 */ #define RX_RING_BYTES (sizeof(struct macb_dma_desc) * RX_RING_SIZE) -#define TX_RING_SIZE 128/* must be power of 2 */ +#define TX_RING_SIZE 512/* must be power of 2 */ #define TX_RING_BYTES (sizeof(struct macb_dma_desc) * TX_RING_SIZE)/* level of occupied TX descriptors under which we wake up TX process */
Signature · 1 line
Nicolas Ferre
PATCH v2 1/1 net: macb: Increase DMA TX buffer size
From: Nathan Sullivan <[email protected]>
In recent testing with the RT patchset, we have seen cases where the transmit ring can fill even with up to 200 txbds in the ring. Increase the size of the DMA TX ring to avoid overruns.
--- drivers/net/ethernet/cadence/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/cadence/macb.c +1 -1
@@ -40,7 +40,7 @@#define RX_RING_SIZE 512/* must be power of 2 */ #define RX_RING_BYTES (sizeof(struct macb_dma_desc) * RX_RING_SIZE) -#define TX_RING_SIZE 128/* must be power of 2 */ +#define TX_RING_SIZE 512/* must be power of 2 */ #define TX_RING_BYTES (sizeof(struct macb_dma_desc) * TX_RING_SIZE)/* level of occupied TX descriptors under which we wake up TX process */
Signature · 1 line
1.9.1
Re: [PATCH v2] net: macb: Increase DMA TX buffer size
From: Xander Huff <[email protected]>
Date: Wed, 24 Aug 2016 17:25:39 -0500
Quoted 8 lines
From: Nathan Sullivan <[email protected]>
In recent testing with the RT patchset, we have seen cases where the transmit ring can fill even with up to 200 txbds in the ring. Increase the size of the DMA TX ring to avoid overruns.
Signed-off-by Xander Huff <[email protected]>Signed-off-by Nathan Sullivan <[email protected]>
This is really a short term solution.
While a larger TX ring may help RT, it's wasteful to have a ring that large on non-RT. Both uses are valid.
Therefore what really needs to happen is to make this driver support changing the RX and TX ring sizes at runtime via ethtool just like pretty much every other driver.
THanks.