Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: netdev@vger.kernel.org,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Chen-Yu Tsai <wens@kernel.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	LABBE Corentin <clabbe.montjoie@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: stmmac: dwmac-sun8i: Honor the RX checksum offload setting
Date: Thu, 19 Nov 2026 14:48:48 -0800	[thread overview]
Message-ID: <20261119144848.4ddd88cb@kernel.org> (raw)
In-Reply-To: <20261115-submit-sun8i-emac-rx-checksum-v1-v1-1-f186d127b39f@gmail.com>

On Sun, 15 Nov 2026 17:58:26 -0700 James Hilliard wrote:
> stmmac_set_features() clears hw->rx_csum when RX checksum offload is
> disabled, but sun8i_dwmac_rx_ipc_enable() unconditionally enables the
> hardware checksum engine. The MAC therefore keeps dropping packets with
> invalid IP or transport checksums before they reach the host, even after
> ethtool reports RX checksumming as disabled.

Rx checksumming only controls whether the _good_ packet indication /
offload is communicated up the stack. The device should never drop
packets due to a bad L4 checksum. Checksumming L4 is not much of a DoS
vector. Oleksij was fixing this in other stmmac variants. I _think_ you
should always clear this bit if it leads to packet drops.
(FCS is fine, bad FCS should only be passed up if RX_ALL is set,
but sounds like your device has all checksums controlled by one bit?
in which case we prefer to see all and let driver discard the bad FCS)

If I completely misunderstand things we should at least get a respin
to update the cover letter. The commit message talks about L4 offload,
and rx_csum is L4 AFAIU but the bit is called CRC which deserves a
mention somewhere IMVHO.
-- 
pw-bot: cr


      parent reply	other threads:[~2026-11-19 22:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16  0:58 [PATCH net] net: stmmac: dwmac-sun8i: Honor the RX checksum offload setting James Hilliard
2026-11-16  1:03 ` netdev-bot+sinfo
2026-11-16  2:19   ` James Hilliard
2026-11-16  2:28     ` James Hilliard
2026-11-17 15:20 ` Maxime Chevallier
2026-11-17 15:26   ` Lorenzo Bianconi
2026-11-18  4:00 ` netdev-bot+sashiko
2026-11-19 17:18   ` James Hilliard
2026-11-19 22:48 ` Jakub Kicinski [this message]

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=20261119144848.4ddd88cb@kernel.org \
    --to=kuba@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=clabbe.montjoie@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=james.hilliard1@gmail.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=samuel@sholland.org \
    --cc=wens@kernel.org \
    /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