RE: [PATCH] net: stmmac: Add a barrier to make sure all access coherent

From: Sunil Kovvuri Goutham
Date: Fri Jun 21 2024 - 06:54:47 EST



>Besides, increase the ring buffer size to avoid buffer overflow.
>
> */
> #define DMA_MIN_TX_SIZE 64
> #define DMA_MAX_TX_SIZE 1024
>-#define DMA_DEFAULT_TX_SIZE 512
>+#define DMA_DEFAULT_TX_SIZE 1024
> #define DMA_MIN_RX_SIZE 64
> #define DMA_MAX_RX_SIZE 1024
>-#define DMA_DEFAULT_RX_SIZE 512
>+#define DMA_DEFAULT_RX_SIZE 1024
> #define STMMAC_GET_ENTRY(x, size) ((x + 1) & (size - 1))
>

If this is a fix, please add a fixes tag.

/* Prefetch the next RX descriptor */
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
priv->dma_conf.dma_rx_size);

Also do please elaborate buffer overflow problem.
Is this ' DMA_DEFAULT_RX_SIZE ' descriptor size or size of full descriptor ring ?

Thanks,
Sunil.