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

Sunil Kovvuri Goutham sgoutham at marvell.com
Fri Jun 21 03:53:51 PDT 2024


>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.



More information about the linux-arm-kernel mailing list