From: sashiko-bot@kernel.org
To: "Daniel Machon" <daniel.machon@microchip.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH net-next v6 11/14] net: lan966x: add PCIe FDMA MTU change support
Date: Thu, 10 Sep 2026 13:01:47 +0000 [thread overview]
Message-ID: <20260910130148.4B8F91F0089B@smtp.kernel.org> (raw)
In-Reply-To: <20260909-lan966x-pci-fdma-v6-11-6f48dab9d671@microchip.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Netdev TX queues are awakened before the hardware CPU port is re-enabled, causing potential packet drops.
--
commit 0b30c07a5d133116fb650402972844467ddebe05
Author: Daniel Machon <daniel.machon@microchip.com>
net: lan966x: add PCIe FDMA MTU change support
This commit introduces MTU change support for the PCIe FDMA path. It handles
reallocating contiguous ATU-mapped RX and TX buffers with the new size, reusing
old ones if reallocation fails.
> diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_fdma_pci.c b/drivers/net/ethernet/microchip/lan966x/lan966x_fdma_pci.c
> --- a/drivers/net/ethernet/microchip/lan966x/lan966x_fdma_pci.c
> +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_fdma_pci.c
[ ... ]
> @@ -374,9 +381,164 @@ static int lan966x_fdma_pci_init(struct lan966x *lan966x)
[ ... ]
> +static int lan966x_fdma_pci_reload(struct lan966x *lan966x, int new_mtu)
> +{
[ ... ]
> + napi_enable(&lan966x->napi);
> + lan966x_fdma_rx_start(&lan966x->rx);
> + lan966x_fdma_pci_wakeup_netdev(lan966x);
> +
> + return err;
> +restore:
[ ... ]
> + napi_enable(&lan966x->napi);
> + lan966x_fdma_rx_start(&lan966x->rx);
> + lan966x_fdma_pci_wakeup_netdev(lan966x);
> +
> + return err;
> +}
> +
> +static int __lan966x_fdma_pci_reload(struct lan966x *lan966x, int max_mtu)
> +{
> + int err;
> + u32 val;
> +
> + /* Disable the CPU port. */
> + lan_rmw(QSYS_SW_PORT_MODE_PORT_ENA_SET(0),
> + QSYS_SW_PORT_MODE_PORT_ENA,
> + lan966x, QSYS_SW_PORT_MODE(CPU_PORT));
[ ... ]
> + err = lan966x_fdma_pci_reload(lan966x, max_mtu);
> +
> + /* Enable back the CPU port. */
> + lan_rmw(QSYS_SW_PORT_MODE_PORT_ENA_SET(1),
> + QSYS_SW_PORT_MODE_PORT_ENA,
> + lan966x, QSYS_SW_PORT_MODE(CPU_PORT));
[Severity: Medium]
Does this create a window where packets can be dropped?
In lan966x_fdma_pci_reload(), we awaken the netdev TX queues by calling
lan966x_fdma_pci_wakeup_netdev(). However, the hardware CPU port is still
disabled at this point, and it only gets re-enabled after returning back to
__lan966x_fdma_pci_reload().
If the network stack injects frames immediately after the queues are awakened,
won't they hit a disabled CPU port and be dropped by the switch fabric? Should
the CPU port be re-enabled before the netdev queues are awoken?
> +
> + return err;
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-lan966x-pci-fdma-v6-0-6f48dab9d671@microchip.com?part=11
next prev parent reply other threads:[~2026-09-10 13:01 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 13:00 [PATCH net-next v6 00/14] net: lan966x: add support for PCIe FDMA Daniel Machon
2026-09-09 13:00 ` [PATCH net-next v6 01/14] MAINTAINERS: add FDMA library to Sparx5 SoC entry Daniel Machon
2026-09-09 13:00 ` [PATCH net-next v6 02/14] net: microchip: fdma: rename contiguous dataptr helpers Daniel Machon
2026-09-09 13:00 ` [PATCH net-next v6 03/14] net: microchip: fdma: add PCIe ATU support Daniel Machon
2026-09-10 13:05 ` netdev-bot+sashiko
2026-09-14 13:57 ` Daniel Machon
2026-09-09 13:00 ` [PATCH net-next v6 04/14] net: lan966x: add FDMA LLP register write helper Daniel Machon
2026-09-10 13:01 ` sashiko-bot
2026-09-09 13:00 ` [PATCH net-next v6 05/14] net: lan966x: export FDMA helpers for reuse Daniel Machon
2026-09-09 13:00 ` [PATCH net-next v6 06/14] net: lan966x: use a dedicated device for DMA operations Daniel Machon
2026-09-10 13:01 ` sashiko-bot
2026-09-09 13:00 ` [PATCH net-next v6 07/14] net: lan966x: add FDMA ops dispatch for PCIe support Daniel Machon
2026-09-10 13:01 ` sashiko-bot
2026-09-09 13:00 ` [PATCH net-next v6 08/14] net: lan966x: clear FDMA interrupt stickies after switch reset Daniel Machon
2026-09-10 13:05 ` netdev-bot+sashiko
2026-09-14 14:09 ` Daniel Machon
2026-09-09 13:00 ` [PATCH net-next v6 09/14] net: lan966x: add shutdown callback to stop FDMA on reboot Daniel Machon
2026-09-10 13:01 ` sashiko-bot
2026-09-10 13:05 ` netdev-bot+sashiko
2026-09-14 15:06 ` Daniel Machon
2026-09-09 13:00 ` [PATCH net-next v6 10/14] net: lan966x: add PCIe FDMA support Daniel Machon
2026-09-10 13:01 ` sashiko-bot
2026-09-10 13:05 ` netdev-bot+sashiko
2026-09-15 8:54 ` Daniel Machon
2026-09-09 13:00 ` [PATCH net-next v6 11/14] net: lan966x: add PCIe FDMA MTU change support Daniel Machon
2026-09-10 13:01 ` sashiko-bot [this message]
2026-09-10 13:05 ` netdev-bot+sashiko
2026-09-15 10:23 ` Daniel Machon
2026-09-09 13:00 ` [PATCH net-next v6 12/14] net: lan966x: add PCIe FDMA XDP support Daniel Machon
2026-09-10 13:05 ` netdev-bot+sashiko
2026-09-15 10:34 ` Daniel Machon
2026-09-09 13:00 ` [PATCH net-next v6 13/14] misc: lan966x-pci: dts: extend cpu reg to cover PCIE DBI space Daniel Machon
2026-09-10 13:05 ` netdev-bot+sashiko
2026-09-15 10:38 ` Daniel Machon
2026-09-09 13:00 ` [PATCH net-next v6 14/14] misc: lan966x-pci: dts: add fdma interrupt to overlay Daniel Machon
2026-09-10 13:05 ` netdev-bot+sashiko
2026-09-15 10:52 ` 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=20260910130148.4B8F91F0089B@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel.machon@microchip.com \
--cc=sashiko-reviews@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.