From: sashiko-bot@kernel.org
To: "Daniel Machon" <daniel.machon@microchip.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH net-next v4 11/13] net: lan966x: add PCIe FDMA XDP support
Date: Sat, 09 May 2026 08:27:21 +0000 [thread overview]
Message-ID: <20260509082721.90866C2BCB4@smtp.kernel.org> (raw)
In-Reply-To: <20260508-lan966x-pci-fdma-v4-11-14e0c89d8d63@microchip.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] NAPI poll loop exits prematurely on SKB allocation failure or FDMA error, causing permanent RX queue stalls.
--
commit 2fc7864e7fb714463211e299fb04e9b91f05d012
Author: Daniel Machon <daniel.machon@microchip.com>
net: lan966x: add PCIe FDMA XDP support
This commit adds XDP support for the PCIe FDMA path. The implementation
operates on contiguous ATU-mapped buffers with memcpy-based XDP_TX, unlike
the platform path which uses page_pool.
> diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_fdma_pci.c b/drivers/net/ethernet/microchip/lan966x/lan966x_fdma_pci.c
> index 0568251a95d92..cf3d3afbcc8a4 100644
> --- a/drivers/net/ethernet/microchip/lan966x/lan966x_fdma_pci.c
> +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_fdma_pci.c
[ ... ]
> @@ -282,14 +392,26 @@ static int lan966x_fdma_pci_napi_poll(struct napi_struct *napi, int weight)
> /* Order DONE read before DCB/frame reads below. */
> dma_rmb();
> counter++;
> - switch (lan966x_fdma_pci_rx_check_frame(rx, &src_port)) {
> + switch (lan966x_fdma_pci_rx_check_frame(rx,
> + &src_port,
> + &data,
> + &data_len)) {
> case FDMA_PASS:
> break;
> case FDMA_ERROR:
> fdma_dcb_advance(fdma);
> goto allocate_new;
This existing code jumps to allocate_new when encountering an error. If there
are still frames pending in the hardware queue, could breaking out of the loop
early leave NAPI completed while the hardware has already generated an
interrupt for the remaining frames?
Since the driver's interrupt handler has likely already cleared the interrupt
status bit, and hardware might only set it on new frame completion, could
this lead to a permanent RX queue stall if the queue is completely full?
> + case FDMA_TX:
> + fdma_dcb_advance(fdma);
> + continue;
> + case FDMA_DROP:
> + fdma_dcb_advance(fdma);
> + continue;
Since these new XDP actions use continue, should FDMA_ERROR be updated
to drop the packet and continue as well, rather than aborting the poll loop?
> }
> - skb = lan966x_fdma_pci_rx_get_frame(rx, src_port);
> + skb = lan966x_fdma_pci_rx_get_frame(rx,
> + src_port,
> + data,
> + data_len);
> fdma_dcb_advance(fdma);
> if (!skb)
> goto allocate_new;
Similarly, if SKB allocation fails here, could jumping to allocate_new
abandon remaining pending frames and cause the same RX queue stall?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260508-lan966x-pci-fdma-v4-0-14e0c89d8d63@microchip.com?part=11
next prev parent reply other threads:[~2026-05-09 8:27 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 7:35 [PATCH net-next v4 00/13] net: lan966x: add support for PCIe FDMA Daniel Machon
2026-05-08 7:35 ` [PATCH net-next v4 01/13] MAINTAINERS: add FDMA library to Sparx5 SoC entry Daniel Machon
2026-05-08 7:35 ` [PATCH net-next v4 02/13] net: microchip: fdma: rename contiguous dataptr helpers Daniel Machon
2026-05-08 7:35 ` [PATCH net-next v4 03/13] net: microchip: fdma: add PCIe ATU support Daniel Machon
2026-05-09 8:27 ` sashiko-bot
2026-05-08 7:35 ` [PATCH net-next v4 04/13] net: lan966x: add FDMA LLP register write helper Daniel Machon
2026-05-09 8:27 ` sashiko-bot
2026-05-08 7:35 ` [PATCH net-next v4 05/13] net: lan966x: export FDMA helpers for reuse Daniel Machon
2026-05-08 7:35 ` [PATCH net-next v4 06/13] net: lan966x: add FDMA ops dispatch for PCIe support Daniel Machon
2026-05-08 7:35 ` [PATCH net-next v4 07/13] net: lan966x: clear FDMA interrupt stickies after switch reset Daniel Machon
2026-05-08 7:35 ` [PATCH net-next v4 08/13] net: lan966x: add shutdown callback to stop FDMA on reboot Daniel Machon
2026-05-09 8:27 ` sashiko-bot
2026-05-08 7:35 ` [PATCH net-next v4 09/13] net: lan966x: add PCIe FDMA support Daniel Machon
2026-05-09 8:27 ` sashiko-bot
2026-05-08 7:35 ` [PATCH net-next v4 10/13] net: lan966x: add PCIe FDMA MTU change support Daniel Machon
2026-05-09 8:27 ` sashiko-bot
2026-05-08 7:35 ` [PATCH net-next v4 11/13] net: lan966x: add PCIe FDMA XDP support Daniel Machon
2026-05-09 8:27 ` sashiko-bot [this message]
2026-05-08 7:35 ` [PATCH net-next v4 12/13] misc: lan966x-pci: dts: extend cpu reg to cover PCIE DBI space Daniel Machon
2026-05-08 7:35 ` [PATCH net-next v4 13/13] misc: lan966x-pci: dts: add fdma interrupt to overlay Daniel Machon
2026-05-12 2:20 ` [PATCH net-next v4 00/13] net: lan966x: add support for PCIe FDMA Jakub Kicinski
2026-05-12 9:56 ` Daniel Machon
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=20260509082721.90866C2BCB4@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel.machon@microchip.com \
--cc=sashiko@lists.linux.dev \
/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