🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #27379

Re: [PATCH net-next 2/2] net: bcmgenet: add support for NETIF_F_RXFCS

#27379
From: Nicolai Buchwitz
Date: Sat, 05 Dec 2026 12:23
62 lines
10464 bytes
Hi Florian

On 5.12.2026 00:00, Florian Fainelli wrote:

> [...]

> @@ -814,14 +814,40 @@ static int bcmgenet_set_features(struct 
> net_device *dev,
>  	u32 reg;
>  	int ret;
> 
> +	/* Frames already queued in the RX rings were written with the old 
> FCS
> +	 * setting and cannot be told apart from new ones, so refuse a live
> +	 * change. The request stays in wanted_features and is applied by
> +	 * bcmgenet_close(). Re-applying the current features from open and
> +	 * resume does not change the flag and is not affected.
> +	 */
> +	if (netif_running(dev) && ((features ^ dev->features) & 
> NETIF_F_RXFCS))
> +		return -EBUSY;

-EBUSY never reaches userspace? ethtool reports OK, but dmesg an
error. The change shows up at the next ifdown. Every other ethtool -K 
fails too.

Maybe pin RXFCS in ndo_fix_features() while running instead?

> [...]

>  	return ret;
> @@ -2461,12 +2487,15 @@ static unsigned int bcmgenet_desc_rx(struct 
> bcmgenet_rx_ring *ring,
>  		skb_reserve(skb, GENET_RSB_PAD);
>  		__skb_put(skb, len - GENET_RSB_PAD);
> 
> -		if (priv->crc_fwd_en) {
> +		/* Strip the FCS unless the user asked to receive it */
> +		if (priv->crc_fwd_en && !(dev->features & NETIF_F_RXFCS))

Can this still hit? crc_fwd_en mirrors RXFCS now, so it could probably
go away?

>  			skb_trim(skb, skb->len - ETH_FCS_LEN);
> -		}
> 
> -		/* Set up checksum offload */
> -		if (dev->features & NETIF_F_RXCSUM) {
> +		/* Set up checksum offload. The hardware checksum excludes the
> +		 * FCS, so it cannot be used when the FCS is passed up.
> +		 */
> +		if ((dev->features & NETIF_F_RXCSUM) &&
> +		    !(dev->features & NETIF_F_RXFCS)) {

Nit: ethtool -k still shows rx-checksumming on here. Clear RXCSUM in
ndo_fix_features() while RXFCS is set (or csum_block_add() the FCS)?

> [...]

Thanks,
Nicolai
Technical Details
Message-ID: <c98622db162d9860a6c21455583fea52@tipi-net.de>
Path: mbox-mo1.pugleaf.net!news-ams.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377986-linux-kernel-netdev=dewy.ru
References: <20261204230048.3554713-1-florian.fainelli@broadcom.com> <20261204230048.3554713-3-florian.fainelli@broadcom.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-ams.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377986-linux-kernel-netdev=dewy.ru
From: nb@tipi-net.de (Nicolai Buchwitz)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 2/2] net: bcmgenet: add support for NETIF_F_RXFCS
Date: Sat, 05 Dec 2026 13:23:58 +0100
Organization: Usenet Network
Message-ID: <c98622db162d9860a6c21455583fea52@tipi-net.de>
References: <20261204230048.3554713-1-florian.fainelli@broadcom.com>
 <20261204230048.3554713-3-florian.fainelli@broadcom.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="3024265"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:NPdFt4D/LO468F08VXnZwd0rsIY= sha256:z9GUV5ZscJ2BLvPzC4CvDDkrcp89VGN7/cSzGEKC2GI=
	sha1:fTCwczJ8PkHzsIkXNiSD1YbH7qs= sha256:bY+H0QqWijgXvcz6Kpd7Z2jHY0fVpv4gNQAgX83HC+0=
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 92FFB117E16; Sat,  5 Dec 2026 15:24:18 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.398
X-Spam-Status: No, score=-3.398 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=tipi-net.de
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 Ya6PATdKAgad;
	Sat,  5 Dec 2026 15:24:15 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-377986-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tipi-net.de
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 9C1571177D1; Sat,  5 Dec 2026 15:24:07 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 7B778607407; Sat,  5 Dec 2026 12:24:06 +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=1796473443;
	b=EgvfBKb6mpTQ3Vf7N4OpXrukNssQ3dUT6PqbbwyDYRxiFl7JfQV8rDes350uI0Sy5YL0
	 ZyimtFamhGBJUJ7trvT2Gv/NtbIBIeOTI5pj1gFAN0GNPs8RPZ/5GZsrhrNq+bbqpbITx
	 uWTB2nQE1HR2hdOVDQEdAkoZh5v+5S1qSvkbwkE1KrJg6UpccXtzPHwe41hei09u6M/Gp
	 va2HFxv9paKjZbvRBUDHC/6s32kTvlUSmW5ter93nyV1mcCFDHNxJkNMjr3mMRvVTOT98
	 iEim2deWtYnIDr4uur8Rr7yvNK8v0N+spML5ZHeq/hy3XUPFdB0KumDwASI32tjR27w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796473443;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Date:From:To:Cc:
	 Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type:
	 Content-Transfer-Encoding:X-Last-TLS-Session-Version;
	bh=cN2j4NDUswqZSXhGhwUZvZX7ju2+Rh3Kn5+4QGxYIEM=;
	b=ghutxFl6dyexYHGbS5d6dxmyfGIb7TtlkuSCFOcOzWvu8jKWv92emcrAnixZUrxMOE7O
	 hDatLXjE8bfcEiBHUfTnkiwqKwQgbU+TIZAnfvfyoHoHLkRo3djFBM39ojuH3CpryXXxB
	 6tdlGJPjuLoRI64l8e7SPzCrN8SS7uApvv1YPJ0uR3t7EvYFPN1CzLdQSqN37UvytGieb
	 UnmtUi2ve+BtFXix8ehvmf8DLljdCSkVavQLIWGTGtQPWjV1MwQSsa7wYfkZkaAe3dD4f
	 puD8QKcXFWthj2KqYi+i7q3LZhHZBNKByaVgnUwIygGEMOEsFuhU2H3s5tkp7Mb9xLw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=ts7BdXam;
	dmarc=none header.from=tipi-net.de;
	spf=pass smtp.mailfrom=tipi-net.de;
	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 C82C2606A33A;
	Sat,  5 Dec 2026 12:24:03 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=ts7BdXam
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796473443;
	b=K/yoSYl+ZyMVEf3oUfwQ5SZAqAa/3JzT86766YA91whLrYE5samN6R+YiRbgkLcPqaoq
	 HS/yu4RcUK06RDzthNqFI/wNtf63BubQcL+JleRCET38atKnT5qwIKfn1WuSAcTkHvLhx
	 iNFZjZkQ+jvmxWZ4OZ7/hImoYZYxSrY1m7aIw+0gAvBGp3BA1nLmgtGxpky7WCDhlLn9N
	 GgfYg1qkte20cubTN3j94PmNWZ77ji537/6Q4hayde3KpVjFzGFXMpR8oUhJZ55Ncb4By
	 OcPZZUVPfQ7nYQxzfIqij6UErLYnorX/g6h0QgT1iE1Y/qVUGOBoP7KGeHLQDOjFH4Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796473443;
	h=DMARC-Filter:Received:DKIM-Signature:MIME-Version:Date:From:To:Cc:
	 Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type:
	 Content-Transfer-Encoding:X-Last-TLS-Session-Version;
	bh=cN2j4NDUswqZSXhGhwUZvZX7ju2+Rh3Kn5+4QGxYIEM=;
	b=mG5XyRxiVviCqOlM7VxgXpGwPJNOgu2XENFCaWecHk0qxUFWIpP4lLIxAln4ONk7m+dy
	 vSJM/+VULO4Irp/0jeUxIlXZFOpqP23tO7HZrXNpMQLNDFC26c28P9/OAo/GCenFFxxbr
	 6MyZzyxBUSTkrupeFQw8oDvQxth9O/0MDM5o37cPHMfmkicqxf/Idhp9VOT3s6pn1Jbzl
	 8uLiZXiNA1mVnIxy9KAUloGeUYTEG5h4CuG6Bxh5jv31g/QrQ/XhlatBAUJbpEyyMHHoH
	 FaU5rxANwzZBUrmkXJ6588BX3ZhKhvPV/89Wp314zN1SDzMdPeCnYbqmcpnZho9WtQA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=tipi-net.de;
	spf=pass smtp.mailfrom=tipi-net.de;
	dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=ts7BdXam;
	arc=none smtp.remote-ip=194.13.80.246
X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246])
	(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 78C4F606A333
	for <netdev@vger.kernel.org>; Sat,  5 Dec 2026 12:24:02 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 78C4F606A333
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de
X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 0654BA2B82;
	Sat, 05 Dec 2026 13:23:58 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim;
	t=1796473439; h=from:subject:date:message-id:to:cc:mime-version:content-type:
	 content-transfer-encoding:in-reply-to:references;
	bh=cN2j4NDUswqZSXhGhwUZvZX7ju2+Rh3Kn5+4QGxYIEM=;
	b=ts7BdXamI+FaEpGZ3NHr0g9gqL4wOInHwL4KoJozsiHp6tlyNdPHDuoQei699eflLw6kr+
	YVWd/TZzO2dz4jPoveWif9rboMM5DTN4FjrLtSYbFtjODE/Gvh+JPNcafRjc43OF6sMnjV
	5MFVoU1t2hrwBVOOqL/fiJaRWzRTdvoXno03l+Fijf+8bWmz8OmlaT2gnNiIEXbC1FS2oF
	8g9Kf4ufYAEG40fCiNobvKCDgjF9hp/GXO1WX8nJ3el0sgPEkTLUhFhQ3ytqhGnWOekJXB
	89SfS5W1eKKIjPbsAtf3kyY+lcEOl9y/GAxbUY6G7sfM5SfLAL5MmdRzuWnJsA==
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
X-Cc: netdev@vger.kernel.org, Doug Berger <opendmb@gmail.com>, Broadcom
 internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Andrew
 Lunn <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric
 Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni
 <pabeni@redhat.com>
X-In-Reply-To: <20261204230048.3554713-3-florian.fainelli@broadcom.com>
X-Sender: nb@tipi-net.de
X-Last-TLS-Session-Version: TLSv1.3