From: netdev-bot+sashiko@kernel.org
To: kuba@kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
michael.chan@broadcom.com, manishc@marvell.com,
joshwash@google.com, hramamurthy@google.com, tariqt@nvidia.com,
saeedm@nvidia.com, daniel@iogearbox.net, hawk@kernel.org,
sdf@fomichev.me, willemb@google.com,
przemyslaw.kitszel@intel.com, bpf@vger.kernel.org
Subject: Re: [PATCH net-next 7/8] eth: qede: drop the now-dead HW-GRO vs XDP handling
Date: Sun, 22 Nov 2026 17:03:09 +0000 [thread overview]
Message-ID: <179536698993.3135.14058741842243697942@kernel.org> (raw)
In-Reply-To: <20261118232315.3593731-8-kuba@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 1 · Medium: 0 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [High] The commit message says the `edev->ndev->features &=
~NETIF_F_GRO_HW` line in the XDP branch of qede_alloc_mem_rxq() is…
--
eth: qede: drop the now-dead HW-GRO vs XDP handling
This commit removes the qede driver's own handling of the HW-GRO vs XDP
interaction. It relies on the core to clear NETIF_F_GRO_HW before
ndo_bpf runs and to keep it off while a program is attached. It drops
the xdp_prog check in qede_fix_features(), the reload skip in
qede_set_features(), and the direct dev->features write in
qede_alloc_mem_rxq().
> diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
> index 7ed17faced542..b24baf0e808e1 100644
> --- a/drivers/net/ethernet/qlogic/qede/qede_main.c
> +++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
> @@ -1571,7 +1571,6 @@ static int qede_alloc_mem_rxq(struct qede_dev *edev, struct qede_rx_queue *rxq)
> rxq->rx_buf_seg_size = roundup_pow_of_two(size);
> } else {
> rxq->rx_buf_seg_size = PAGE_SIZE;
> - edev->ndev->features &= ~NETIF_F_GRO_HW;
> }
[Severity: High]
Is this line really dead? The commit message says:
the feature is already off by the time the reload for the program
allocates the rings;
That is true for the ndo_bpf path. The firmware error recovery path,
though, seems to reach this else branch with GRO_HW set in dev->features
while edev->xdp_prog is still attached:
qede_sp_task()
qede_recovery_handler()
qede_unload(edev, QEDE_UNLOAD_RECOVERY, true)
__qede_remove(edev->pdev, QEDE_REMOVE_RECOVERY)
__qede_probe(..., QEDE_PROBE_RECOVERY)
qede_init_ndev()
qede_load(edev, QEDE_LOAD_RECOVERY, true)
...
qede_alloc_mem_rxq()
In recovery mode, edev and edev->xdp_prog are kept. However,
qede_init_ndev() writes dev->features directly:
hw_features = NETIF_F_GRO | NETIF_F_GRO_HW | NETIF_F_SG |
...
ndev->features = hw_features | NETIF_F_RXHASH | NETIF_F_RXCSUM |
Nothing on this path calls netdev_update_features(), so the core never
gets a chance to strip GRO_HW again.
With the clear gone, the end of qede_alloc_mem_rxq() then computes:
edev->gro_disable = !(edev->ndev->features & NETIF_F_GRO_HW);
if (!edev->gro_disable)
qede_set_tpa_param(rxq);
qede_start_queues() then sets start.gro_enable = !edev->gro_disable,
so TPA is enabled in firmware while XDP is attached.
In qede_rx_process_cqe(), TPA CQEs return before the XDP hook runs:
/* Handle TPA cqes */
if (cqe_type != ETH_RX_CQE_TYPE_REGULAR)
return qede_rx_process_tpa_cqe(edev, fp, rxq, cqe, cqe_type);
...
/* Run eBPF program if one is attached */
if (xdp_prog)
After a recovery with XDP attached and the interface up, would
aggregated TCP traffic skip the attached program, so its XDP_DROP or
XDP_REDIRECT decisions are never applied? dev->features would also show
HW-GRO as on. This would last until something unrelated calls
netdev_update_features().
Would it be better to keep an XDP-aware check when computing
gro_disable, for example edev->xdp_prog || !(features & NETIF_F_GRO_HW)?
Other options would be to stop qede_init_ndev() from overwriting
dev->features on the recovery probe, or to call netdev_update_features()
once recovery completes.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261118232315.3593731-1-kuba%40kernel.org
next prev parent reply other threads:[~2026-11-22 17:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 23:23 [PATCH net-next 0/8] net: adjust HW GRO and LRO feature handling Jakub Kicinski
2026-11-18 23:23 ` [PATCH net-next 1/8] net: stop making HW-GRO depend on SW GRO Jakub Kicinski
2026-11-22 17:03 ` netdev-bot+sashiko
2026-11-18 23:23 ` [PATCH net-next 2/8] selftests: drv-net: drop the generic XDP hack from the HW GRO setup Jakub Kicinski
2026-11-19 21:40 ` Willem de Bruijn
2026-11-22 17:03 ` netdev-bot+sashiko
2026-11-18 23:23 ` [PATCH net-next 3/8] net: state the "XDP excludes HW-GRO" rule in the core Jakub Kicinski
2026-11-19 22:59 ` Willem de Bruijn
2026-11-20 22:13 ` Jakub Kicinski
2026-11-22 17:03 ` netdev-bot+sashiko
2026-11-18 23:23 ` [PATCH net-next 4/8] net: state the "XDP excludes LRO" " Jakub Kicinski
2026-11-19 23:02 ` Willem de Bruijn
2026-11-22 17:03 ` netdev-bot+sashiko
2026-11-18 23:23 ` [PATCH net-next 5/8] eth: mlx5e: drop the now-dead HW-GRO and LRO vs XDP handling Jakub Kicinski
2026-11-19 15:42 ` Dragos Tatulea
2026-11-22 17:03 ` netdev-bot+sashiko
2026-11-18 23:23 ` [PATCH net-next 6/8] eth: bnxt_en: don't clear HW-GRO and LRO for XDP in ndo_fix_features Jakub Kicinski
2026-11-18 23:23 ` [PATCH net-next 7/8] eth: qede: drop the now-dead HW-GRO vs XDP handling Jakub Kicinski
2026-11-22 17:03 ` netdev-bot+sashiko [this message]
2026-11-18 23:23 ` [PATCH net-next 8/8] eth: gve: drop the now-dead HW-GRO vs XDP interlock Jakub Kicinski
2026-11-18 23:44 ` Ankit Garg
2026-11-19 22:14 ` Harshitha Ramamurthy
2026-11-22 17:03 ` netdev-bot+sashiko
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=179536698993.3135.14058741842243697942@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=hramamurthy@google.com \
--cc=joshwash@google.com \
--cc=kuba@kernel.org \
--cc=manishc@marvell.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=saeedm@nvidia.com \
--cc=sdf@fomichev.me \
--cc=tariqt@nvidia.com \
--cc=willemb@google.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