From: netdev-bot+sashiko@kernel.org
To: linusw@kernel.org
Cc: ulli.kroll@googlemail.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, mirq-linux@rere.qmqm.pl, mhun512@gmail.com,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2 07/11] net: ethernet: cortina: Synchronize RX fragments for the CPU
Date: Wed, 30 Sep 2026 02:50:43 +0000 [thread overview]
Message-ID: <179073664341.434549.3840534078071705576@kernel.org> (raw)
In-Reply-To: <20260928-gemini-ethernet-fixes-3-v2-7-758a795d7a78@kernel.org>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message for "net: ethernet: cortina: Synchronize RX
fragments for the CPU" presents the change as a bug fix.
--
net: ethernet: cortina: Synchronize RX fragments for the CPU
This commit adds a dma_sync_single_range_for_cpu() for each free queue
fragment when geth_freeq_claim() claims it. It also changes the final
full-page unmap to use DMA_ATTR_SKIP_CPU_SYNC. During teardown,
geth_freeq_release_pages() now syncs only the fragments the hardware still
owns before doing a skip-sync unmap.
> Free queue pages use streaming DMA mappings with DMA_FROM_DEVICE. The RX
> path reads packet data after the device has filled a fragment without
> first transferring ownership of that range to the CPU.
[Severity: Low]
Could the commit message say which configurations are affected and what
the user-visible symptom is? As written, it reads like a fix for RX data
corruption, but there is no Fixes: tag.
The missing sync_for_cpu seems to go back to the original driver, commit
4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini gigabit ethernet").
That commit added gmac_rx() and the claim/unmap logic.
This IP only appears on the Gemini SoC (ARCH_GEMINI, ARCH_MULTI_V4, FA526
core, no outer cache). On Gemini, arch_sync_dma_for_cpu() in
arch/arm/mm/dma-mapping.c does:
if (dir != DMA_TO_DEVICE) {
outer_inv_range(paddr, paddr + size);
dma_cache_maint_page(paddr, size, dir, dmac_unmap_area);
}
outer_inv_range() does nothing here. dmac_unmap_area resolves to
fa_dma_unmap_area in arch/arm/mm/cache-fa.S:
SYM_TYPED_FUNC_START(fa_dma_unmap_area)
ret lr
SYM_FUNC_END(fa_dma_unmap_area)
So the new dma_sync_single_range_for_cpu() in geth_freeq_claim() does not
seem to do any cache maintenance on this hardware. The old full-page
dma_unmap_single() did none either.
> Once all fragments have been claimed, tear down the full-page mapping with
> DMA_ATTR_SKIP_CPU_SYNC. Each range has already moved to the CPU domain, and
> another full-page synchronization could invalidate a sibling fragment
> already being consumed by the network stack.
Given the above, can the sibling-invalidation case happen on FA526 at
all?
If this fixes real RX corruption on some configuration, should it carry
"Fixes: 4d5ae32f5e1e"? If it is a DMA API correctness change with no
functional effect on Gemini, could the commit message say so? That would
let stable backporters tell the two cases apart.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260928-gemini-ethernet-fixes-3-v2-0-758a795d7a78%40kernel.org
next prev parent reply other threads:[~2026-09-30 2:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 8:50 [PATCH net-next v2 00/11] net: ethernet: cortina: Fix Gemini RX buffer management Linus Walleij
2026-09-28 8:50 ` [PATCH net-next v2 01/11] net: ethernet: cortina: Keep shared free queue parent-owned Linus Walleij
2026-09-30 2:50 ` netdev-bot+sashiko
2026-09-28 8:50 ` [PATCH net-next v2 02/11] net: ethernet: cortina: Drain free queue IRQ before resize Linus Walleij
2026-09-30 2:50 ` netdev-bot+sashiko
2026-09-28 8:50 ` [PATCH net-next v2 03/11] net: ethernet: cortina: Correct free queue DMA mappings Linus Walleij
2026-09-30 2:50 ` netdev-bot+sashiko
2026-09-28 8:50 ` [PATCH net-next v2 04/11] net: ethernet: cortina: Index free queue fragments with XArray Linus Walleij
2026-09-30 2:50 ` netdev-bot+sashiko
2026-09-28 8:50 ` [PATCH net-next v2 05/11] net: ethernet: cortina: Preserve in-flight free queue pages Linus Walleij
2026-09-30 2:50 ` netdev-bot+sashiko
2026-09-28 8:50 ` [PATCH net-next v2 06/11] net: ethernet: cortina: Rotate free queue page allocation Linus Walleij
2026-09-28 8:50 ` [PATCH net-next v2 07/11] net: ethernet: cortina: Synchronize RX fragments for the CPU Linus Walleij
2026-09-30 2:50 ` netdev-bot+sashiko [this message]
2026-09-28 8:50 ` [PATCH net-next v2 08/11] net: ethernet: cortina: Validate RX fragment lengths Linus Walleij
2026-09-30 2:50 ` netdev-bot+sashiko
2026-09-28 8:50 ` [PATCH net-next v2 09/11] net: ethernet: cortina: Release partial RX frames on stop Linus Walleij
2026-09-30 2:50 ` netdev-bot+sashiko
2026-09-28 8:50 ` [PATCH net-next v2 10/11] net: ethernet: cortina: Scale Gemini RX queues to system memory Linus Walleij
2026-09-28 8:50 ` [PATCH net-next v2 11/11] net: ethernet: cortina: Use guard helpers for locking Linus Walleij
2026-09-30 2:50 ` netdev-bot+sashiko
2026-10-01 9:51 ` [PATCH net-next v2 00/11] net: ethernet: cortina: Fix Gemini RX buffer management Paolo Abeni
2026-10-01 11:33 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179073664341.434549.3840534078071705576@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linusw@kernel.org \
--cc=mhun512@gmail.com \
--cc=mirq-linux@rere.qmqm.pl \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ulli.kroll@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox