Article View: linux.kernel.netdev
Article #19434Re: [PATCH net] net: stmmac: dwmac-sun8i: Honor the RX checksum offload setting
From: Jakub Kicinski
Date: Thu, 19 Nov 2026 22:48
Date: Thu, 19 Nov 2026 22:48
23 lines
9259 bytes
9259 bytes
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
Technical Details
Message-ID:
<20261119144848.4ddd88cb@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367393-linux-kernel-netdev=dewy.ruReferences:
<20261115-submit-sun8i-emac-rx-checksum-v1-v1-1-f186d127b39f@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367393-linux-kernel-netdev=dewy.ru From: kuba@kernel.org (Jakub Kicinski) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] net: stmmac: dwmac-sun8i: Honor the RX checksum offload setting Date: Thu, 19 Nov 2026 14:48:48 -0800 Organization: Usenet Network Message-ID: <20261119144848.4ddd88cb@kernel.org> References: <20261115-submit-sun8i-emac-rx-checksum-v1-v1-1-f186d127b39f@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="3001998"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:H5Tf2fT5JYd5RbmKdOPjhHrNGjg= sha256:5h5NEEzcHq3cg4Fwu3oWx2v7MelRR1M+tD6kOUPFfIM= sha1:99RJIaVMvA/763132axLYONmRSk= sha256:/athAwXh6rlea+jq+w2Q+nju7ZxxfCA8vXVArVTgTyg= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id EABC31157D9; Fri, 20 Nov 2026 01:49:14 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FbUihHmh_EaN; Fri, 20 Nov 2026 01:49:11 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-367393-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 73EBF1157CE; Fri, 20 Nov 2026 01:49:01 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id CE32BE3C32; Thu, 19 Nov 2026 22:48:51 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795128530; b=oErHLK4pGpjLXkDwYHVl27ODCoqmQ9SpqsgVn3SqIoUM3vqSYfphNZTz/GM6NA802CsC RcXQkD8sqPpG4hzt01mEC7qwxCXSi66q7ZltfkqbfrlXTPZq69bqToS4q7y0mWStqbuD3 6UXGhoHKcO1+YyhlFdqRuvtXMeCZ6m/KLJrlQIpAC3SSAucEIQ9lkbHFEQIK2OK9LOGDK 0mdv3DrAGrZ1MiVqa3YqrDRvBXWIPNdDjtnrqw4ZJGtvmBXIM3XVGmyweNjz15lJcWLCE 6ju02TAsk7tR+ZP5/UvE6NF1u9owT8lgL0B+PRIcKgPKoeeLXbRgsCxOg9sjftl00ag== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795128530; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:In-Reply-To:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=uxdKeh6JL2oY2XBBPbmZrNwISGDq9uDthjhiqqIBPyo=; b=kkT8aDDyF6gGVEw00axnTfcrC5jE4eL4dY/yT6GeQHRo9kHTzFb4acGrf4XSUFAecqgX QCtdXuJaef2uMGjJZ+fXYfxb7aaQCV+tEtnEWBv+mrusNLJGtbI+FNDC0zrZBWsodML8B 2gqOuclimoaI3GoIe42zEQ7hxzDhnrv7woi3DoGAzeRDTf5K9Yo7EK8POkgNeNOlxwR2J StyiKvaE/JsQokqhlDPLy+N/52GqK8bLfKqMrjZ3e5jAxZyuqc4igDQ/Jz1C7U9Je7PPY wrNHHAQIF9cqYS1vWAJRfD7qX0Ek5gdVJuTC3FNiB/XbP25MnvZ6p1pjhqk8XlFALBQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ffVgQ9h8; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5697606A339; Thu, 19 Nov 2026 22:48:50 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ffVgQ9h8 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795128530; b=hlZRZxVnrcWgektwlFOGVsdi5T08i0H3VyyWXJ4jKRRzkfNZdv2dnQiVN1hykFLurnU+ fcpe2IMYkt6RzaIiwSUul/KoNz7M2kkl+Lrmu8XkLuYEG2PCUg6WZxMUEfgPhIERgCiIG qMy5pfwTJ04yC2Hrsc9Kr9LvSx8gxUqOzt8SUbNmknCIJm7FAOvuSt9jf/K/c5/8qw85s XrZA9NrblCW/jIJh62/VKyWwKKJORgsYDyNmIuy/wxGfZwRCidDPhUzS/HDSA6PMwfpq9 EeIAsvtT9/wHu2gvOKfLl1YnKGwsUjKbPXKnExm6SxPxT7BiSzKQqr0sVqItGW5xoyw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795128530; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=uxdKeh6JL2oY2XBBPbmZrNwISGDq9uDthjhiqqIBPyo=; b=fbSN9YagSgEEKo3kBqy1uirAraUZ88uwwf6GZUF6TVqzW0QuuDhzb6CValei/CBPhamF /olORfs+9ycxLHyt2/HZl3donQOHFgLZvo/1cfWjqYu3wGsIhVRyeJd8X43sKRx0FhqZk CsEampqTltD3NdBUKlB+F7sXtMy7R2BbN/JzDGfcAP6o5Ot/D1QdtDB5E6fwy80Kkws7D p/ZsunrsurJRuH8uCkVad0aySpXZsHiSqB6utqSSejN6y9tebvq01cQZ+xprgmdiRNjEu tYsI7+Y6jtKl0nhVn8ZH7RM29noC9UvG+Lj8Bto2BM1SLJsB6ZznmZFjyGMNqXh1zAw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ffVgQ9h8; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01518606A325; Thu, 19 Nov 2026 22:48:50 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A3EF1F000F4; Thu, 19 Nov 2026 22:48:49 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795128529; bh=uxdKeh6JL2oY2XBBPbmZrNwISGDq9uDthjhiqqIBPyo=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=ffVgQ9h8PYbAfvjb/j9aLLRAvUnUGIgrkaCBDw9pyRnvQSv3u+1coTIst4AxVU8XH NRTiObskWMdWIbzoqqAO602nC8w0WbYVdyF67eahSHHBG7N7ftFEPkayEMhaBs/BNY snOOLcTwLVlDglPubRcvab7a0aBNX7i53JhyatGwYHpXrQ8yj9Nzol7/T5D4L8Mdxp PAlZGU2KQAucnzJfUvQvxm+bRH5HMHOX2HTAha3KhBSamDAZNI9cmROT4kUB41N/VM A3KB4VBYm7aJnsZEBW9Brl5KRg48316bR+5e+5wWTjtr2gvkjnI1LSH2wzdScKrGLQ uJmnrLk5bSiMw== X-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 X-In-Reply-To: <20261115-submit-sun8i-emac-rx-checksum-v1-v1-1-f186d127b39f@gmail.com> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list