On Fri, Mar 6, 2026 at 6:52 AM Alexander Lobakin <[email protected]> wrote: > > From: Steve Rutherford <[email protected]> > Date: Wed, 4 Mar 2026 14:01:46 -0800 > > > I believe syncing twice isn't inherently wrong - it's more that you > > can't synthesize the header via the workaround and then sync, since it > > will pull the uninitialized header buffer from the SWIOTLB. Outside of > > SWIOTLB, dma syncs are more or less no-ops, while (with SWIOTLB) they > > are copies from/to the bounce buffers. > > Ah I see. > > What if I add sync_for_device after copying the header? This should > synchronize the bounce buffer with the copied data I guess? A bit of > overhead, but this W/A triggers mostly on stuff like ARP/ICMP, "hotpath" > L4 protos are fortunately not affected.
That should work fine as well. I'm not certain I have strong preferences on the right answer here, other than "does it work and, ideally, is it less confusing?" The patch I posted is a bit unintuitive. I think what you are describing might make the workaround self-contained. thanks, Steve [And sorry for my gmail-driven top posting crimes D: ]
