From: sashiko-bot@kernel.org
To: "James Hilliard" <james.hilliard1@gmail.com>
Cc: linux-sunxi@lists.linux.dev
Subject: Re: [PATCH net-next v4 4/5] net: stmmac: add common RXALL handling
Date: Sat, 05 Dec 2026 02:39:31 +0000 [thread overview]
Message-ID: <sashiko-outbox-250950@kernel.org> (raw)
In-Reply-To: <20261203-submit-sun8i-rxall-v1-v4-4-af22aec6ae13@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] net: stmmac: common RXALL path omits rx_error_frame from
checksum check
--
commit ee13ca5b9e68fc92b4d71ee0677c37773ad41461
Author: James Hilliard <james.hilliard1@gmail.com>
net: stmmac: add common RXALL handling
This commit adds common NETIF_F_RXALL support to stmmac by introducing the
rx_error_frame status flag, a set_rx_all MAC callback, and shared discard
and packet-accounting logic in the page-pool and zero-copy RX paths.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 99252fb836750..842d6d7f82a44 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -5652,10 +5652,12 @@ static void stmmac_dispatch_skb_zc(struct stmmac_priv *priv, u32 queue,
> skb_record_rx_queue(skb, queue);
> napi_gro_receive(&ch->rxtx_napi, skb);
>
> - u64_stats_update_begin(&rxq_stats->napi_syncp);
> - u64_stats_inc(&rxq_stats->napi.rx_packets);
> - u64_stats_add(&rxq_stats->napi.rx_bytes, len);
> - u64_stats_update_end(&rxq_stats->napi_syncp);
> + if (likely(!(status & rx_error_frame))) {
> + u64_stats_update_begin(&rxq_stats->napi_syncp);
> + u64_stats_inc(&rxq_stats->napi.rx_packets);
> + u64_stats_add(&rxq_stats->napi.rx_bytes, len);
> + u64_stats_update_end(&rxq_stats->napi_syncp);
> + }
> }
[Severity: Low]
Should the checksum offload check in stmmac_dispatch_skb_zc() and stmmac_rx()
also exclude rx_error_frame?
The commit message says rx_error_frame packets are delivered without trusting
their checksum, yet both functions only test (status & csum_none) before
setting CHECKSUM_UNNECESSARY, and common.h does not document a requirement
for rx_status() callbacks to set csum_none alongside rx_error_frame.
Commit "net: stmmac: dwmac-sun8i: support ethtool rx-all" avoids this by
returning rx_error_frame | csum_none, but another MAC relying on the common
path could deliver errored frames with CHECKSUM_UNNECESSARY. Testing
status & (csum_none | rx_error_frame) in both RX paths enforces the policy.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-submit-sun8i-rxall-v1-v4-0-af22aec6ae13@gmail.com?part=4
next prev parent reply other threads:[~2026-12-05 2:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 2:37 [PATCH net-next v4 0/5] net: stmmac: support ethtool rx-all on sun8i James Hilliard
2026-12-04 2:37 ` [PATCH net-next v4 1/5] net: stmmac: dwmac-sun8i: deliver RX checksum errors to the stack James Hilliard
2026-12-05 2:39 ` sashiko-bot
2026-12-04 2:37 ` [PATCH net-next v4 2/5] net: stmmac: dwmac-sun8i: align EMAC_RX_MD with tabs James Hilliard
2026-12-04 2:37 ` [PATCH net-next v4 3/5] net: stmmac: dwmac-sun8i: serialize RX_CTL1 updates James Hilliard
2026-12-04 2:37 ` [PATCH net-next v4 4/5] net: stmmac: add common RXALL handling James Hilliard
2026-12-05 2:39 ` sashiko-bot [this message]
2026-12-04 2:37 ` [PATCH net-next v4 5/5] net: stmmac: dwmac-sun8i: support ethtool rx-all James Hilliard
2026-12-04 2:42 ` [PATCH net-next v4 0/5] net: stmmac: support ethtool rx-all on sun8i netdev-bot+sinfo
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=sashiko-outbox-250950@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=james.hilliard1@gmail.com \
--cc=linux-sunxi@lists.linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox