Re: [PATCH net-next v3 1/4] net: stmmac: Switch to zero-copy in non-XDP RX path

Furong Xu
2025-01-24T01:53:19Z

On Thu, 23 Jan 2025 11:53:21 -0800, Brad Griffis <bgriffis@nvidia.com> wrote:

> On 1/23/25 08:35, Furong Xu wrote:
> > What is the MTU of Tegra234 and NFS server? Are they both 1500?
>
> I see the same issue. Yes, both are 1500.
>
> > Could you please try attached patch to confirm if this regression is
> > fixed?
>
> Patch fixes the issue.
>
> > If the attached patch fixes this regression, and so it seems to be a
> > cache coherence issue specific to Tegra234, since this patch avoid
> > memcpy and the page buffers may be modified by upper network stack of
> > course, then cache lines of page buffers may become dirty. But by
> > reverting this patch, cache lines of page buffers never become dirty,
> > this is the core difference.
>
> Thanks for these insights. I don't have specific experience in this
> driver, but I see we have dma-coherent turned on for this driver in our
> downstream device tree files (i.e. dtbs that coincide with our
> out-of-tree implementation of this driver). I went back to the original
> code and verified that the issue was there. I did a new test where I
> added dma-coherent to this ethernet node in the dtb and retested. It worked!
>
> Just to clarify, the patch that you had us try was not intended as an
> actual fix, correct? It was only for diagnostic purposes, i.e. to see if
> there is some kind of cache coherence issue, which seems to be the case?

It is not an actual fix, it is only for diagnostic purposes.

> So perhaps the only fix needed is to add dma-coherent to our device tree?

Yes, add dma-coherent to ethernet node is the correct fix.