🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #24070

Re: [PATCH net-next 1/2] net: usb: ax88179: Make receiving FCS on AX88179A configurable

#24070
From: Birger Koblitz
Date: Sun, 29 Nov 2026 07:17
137 lines
15689 bytes
On 28/11/2026 7:42 am, netdev-bot+sashiko@kernel.org wrote:> Thank you 
for your contribution! Sashiko AI review found 3 potential
> issue(s) to consider.
> 
> Critical: 0 · High: 0 · Medium: 1 · Low: 2
> 
> 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).
> 
> - [Medium] ax88179_set_multicast()
>    (drivers/net/usb/ax88179_lib.c:362-364) treats NETIF_F_RXALL the same…
> - [Low] The commit is titled as making FCS reception 'configurable', but
>    what it really does is fix a bug.
> - [Low] The new condition `data->chip_version != AX_VERSION_AX88179A` in
>    ax88179_set_multicast() (drivers/net/usb/ax88179_lib.c:363) also…
> 
> --
> 
> net: usb: ax88179: Make receiving FCS on AX88179A configurable
> 
> With this commit, ax88179_set_multicast() no longer always sets
> AX_RX_CTL_DROPCRCERR. That bit keeps the FCS attached to received frames.
> On AX88179A it is now only set when NETIF_F_RXFCS or NETIF_F_RXALL is
> enabled. Other chip versions behave as before.
> 
>> diff --git a/drivers/net/usb/ax88179_lib.c b/drivers/net/usb/ax88179_lib.c
>> index 821ee9cd8ded1..85d774bf214f8 100644
>> --- a/drivers/net/usb/ax88179_lib.c
>> +++ b/drivers/net/usb/ax88179_lib.c
>> @@ -356,10 +356,12 @@ void ax88179_set_multicast(struct net_device *net)
>>   
>>   	data = dev->driver_priv;
>>   
>> -	rxctl = (AX_RX_CTL_START | AX_RX_CTL_AB | AX_RX_CTL_DROPCRCERR);
>> +	rxctl = (AX_RX_CTL_START | AX_RX_CTL_AB);
>>   	if (data->ip_align)
>>   		rxctl |= AX_RX_CTL_IPE;
>> -
>> +	if (net->features & (NETIF_F_RXFCS | NETIF_F_RXALL) ||
> 
> [Severity: Medium]
> Should NETIF_F_RXALL by itself cause the FCS to be kept?
> 
> NETIF_F_RXALL is about delivering frames with errors, such as a bad FCS.
> NETIF_F_RXFCS is the flag that tells the stack skbs end with the FCS.
> Other drivers keep the two separate. For example, e1000 trims the 4 bytes
> unless NETIF_F_RXFCS is set.
> 
> This branch can't be reached in this patch alone, because hw_features
> doesn't include these bits yet. The follow-up commit "net: usb: ax88179:
> Support NETIF_F_RXFCS and NETIF_F_RXALL on AX88179A" adds them to
> hw_features in ax88179a_bind(). It also copies the same mapping into
> ax88179a_set_features() and ax88179a_reset():
> 
>      if (features & (NETIF_F_RXFCS | NETIF_F_RXALL))
>          rxctl |= AX_RX_CTL_DROPCRCERR;
> 
> In that series, ax88179a_rx_fixup() only uses the flags to widen the MTU
> check:
> 
>      if (features & (NETIF_F_RXFCS | NETIF_F_RXALL))
>          fcs_trailer = ETH_FCS_LEN;
> 
> After that check, it copies the full pkt_len without trimming:
> 
> 		skb_put(ax_skb, pkt_len);
> 		memcpy(ax_skb->data, skb->data + (ax179_data->ip_align ? AX179A_RX_HW_PAD : 0),
> 		       pkt_len);
> 
> Take "ethtool -K <dev> rx-all on" with rx-fcs off. Wouldn't every frame
> then reach the stack with 4 extra trailing bytes, and nothing to show
> that they are an FCS?
> 
> Could AX_RX_CTL_DROPCRCERR depend only on NETIF_F_RXFCS? Another option
> is to trim ETH_FCS_LEN in ax88179a_rx_fixup() when only NETIF_F_RXALL is
> set.
I will send an updated version where ETH_FCS_LEN is trimmed in 
ax88179a_rx_fixup() when only NETIF_F_RXALL is set.


> 
>> +	    data->chip_version != AX_VERSION_AX88179A)
> 
> [Severity: Low]
> This isn't a bug, but the subject says FCS reception is being made
> "configurable", and the change also fixes existing behaviour.
> 
> Before this patch, AX_RX_CTL_DROPCRCERR was always set on AX88179A, and
> ax88179a_rx_fixup() doesn't trim the FCS. So every frame received on
> AX88179A/AX88772D reached the stack with the 4-byte FCS still attached.
> 
> Could the commit message say this directly? Could it also add a Fixes:
> tag for 7d573278f9a5 ("ax88179_178a: Add HW support for AX179A-based
> chips")? That commit is where DROPCRCERR became always-on for these chips.
> It was merged to net-next on 2026-11-14 and is probably not in a released
> kernel yet, so this is mostly for traceability.
Fixes tag will be added in the next series.

> 
> The commit message also doesn't mention that the new chip_version test
> affects the AX88772D.
The commit message will be updated to mention the AX88772D.

> 
> [Severity: Low]
> Does the chip_version != AX_VERSION_AX88179A test also change behaviour
> on the AX88772D? ax88179_lib.h has:
> 
> 	AX_VERSION_AX88179A		= 0x6,	/* Also AX88772D */
> 
> ax88179a_bind() tells the two chips apart only through is_ax88772d:
> 
> 	if (ax179_data->chip_version == AX_VERSION_AX88179A) {
> 		if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x300)
> 			ax179_data->is_ax88772d = 1;
> 	}
> 
> So AX_RX_CTL_DROPCRCERR is now cleared on AX88772D as well. The commit
> message says this was only tested on AX88179A. According to the comment
> in ax88179a_bind(), AX88279 needs the same bit for correct RX URB
> framing.
> 
> The follow-up commit "net: usb: ax88179: Support NETIF_F_RXFCS and
> NETIF_F_RXALL on AX88179A" keeps this behaviour. ax88179a_reset() only
> forces DROPCRCERR for AX88279, and RXFCS/RXALL are advertised on AX88772D
> too.
> 
> Has this been tested on an AX88772D, or should that chip be excluded
> using is_ax88772d? Either way, could the commit message mention the
> AX88772D?
> This has also been tested on the AX88772D and it works the same as for 
the AX88179A as the AX88772D is a AX88179A just with a different 100MBit
PHY and this is purely MAC functionality.
Technical Details
Message-ID: <58423eeb-e343-4597-b006-461a7871f6eb@birger-koblitz.de>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!193.141.40.65.MISMATCH!npeer.as286.net!npeer-ng0.as286.net!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373394-linux-kernel-netdev=dewy.ru
References: <20261127-fcs-v1-1-0c4ede015bf5@birger-koblitz.de> <179584815990.3135.5137971484005173950@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!193.141.40.65.MISMATCH!npeer.as286.net!npeer-ng0.as286.net!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373394-linux-kernel-netdev=dewy.ru
From: mail@birger-koblitz.de (Birger Koblitz)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 1/2] net: usb: ax88179: Make receiving FCS on
 AX88179A configurable
Date: Sun, 29 Nov 2026 08:17:36 +0100
Organization: Usenet Network
Message-ID: <58423eeb-e343-4597-b006-461a7871f6eb@birger-koblitz.de>
References: <20261127-fcs-v1-1-0c4ede015bf5@birger-koblitz.de>
 <179584815990.3135.5137971484005173950@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1124282"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:H4YXPhbSvBrzi8fQrP9zbV0NHcc= sha256:TnKCHuaI+S//X9XVDD5ucDDOp4CrbaU8++GTrbvdjdw=
	sha1:S7VwVbo9l1XZ9YFH3SdTqPbHmAQ= sha256:KXxdvIb4ZU/R1O23HprsF9Doska1hGqG0oIrIfqffk0=
Content-Language: en-US
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 5B902125F94; Sun, 29 Nov 2026 10:18:13 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.951
X-Spam-Status: No, score=-1.951 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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=birger-koblitz.de header.b=LL+5lRLb; dkim=pass (2048-bit key)
	header.d=birger-koblitz.de header.b=aHo0OG+M
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 M6u0PloSBZXy;
	Sun, 29 Nov 2026 10:18:10 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373394-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=birger-koblitz.de
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id B14FE125F93; Sun, 29 Nov 2026 10:17:56 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id E9B2624E05; Sun, 29 Nov 2026 07:17:54 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail;
	t=1795936674;
	b=JyB+xQgkXHsPs1B+y2VuqgSir1HRxL1c4+yXHkgmnwJXpG39ulWMwZY5x1ICpPCSHOYt
	 Qf2Yc/HUae3ql+w+6yC/OUqsicIl00sZMfK03EUi0MRPFZlybu2iFxCyGdnRXNRe94F/M
	 R2Q8mq1ouJaE9k+4YA13FERR9fvsAMNNI6MtHati0kaPat0sjy+0ShmBeX/U1OBxtldih
	 9svaooMKxxLIbBzcVu7sZYrt77Rhn2TMVu0zN0WcUqdbQtnLTtLJHqJFgInkLJGnNRvi9
	 0r/0QBxteCyAiUdqvD5Ti5UM2BCT1beq0JITim14ezru8CDcs6C8kDnUEj6Q8uY65Mw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795936674;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:
	 X-Spam-Level:DKIM-Signature:Received:Message-ID:Date:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:User-Agent:Subject:To:Cc:
	 References:From:Content-Language:In-Reply-To:Content-Type:
	 Content-Transfer-Encoding;
	bh=c1+B8AWjiBaMp/qblBSKD90TA3gJ/5XmJmQQHICJeAs=;
	b=hDv4TDjKQ6vBkSqk26PfNwNvSMMA67GxKeL0H+VCS1dT9txUC8SKzwyxxB6G483CK03P
	 9j+GfEm73HFDdu+H0QR4XZOHsnFwZu9HHfsOGfpS1qKR7zYnmt0HfD64wTcM9Tbv/uLRZ
	 5FX6UYpLsasfqMVwZdw+qzSIHUwCtk5aWvuKmMEsMkJ+cEl/FBILcNQfLwg5Rt30GL3Yv
	 LutRZSbPoXZLLLwO4QuiT3iqBWdvquDPPVFPNvALtwtksWo0rZhFaumY9k0R0alhGDcL6
	 KzQkXsOch5mHhkYMoWbPkWG0mBVp3OGeaSz032u1f0rzhdJEArjKXYakccsWAsFYRtQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=birger-koblitz.de header.i=@birger-koblitz.de header.a=rsa-sha256 header.s=default header.b=LL+5lRLb;
	dkim=pass header.d=birger-koblitz.de header.i=@birger-koblitz.de header.a=rsa-sha256 header.s=default header.b=aHo0OG+M;
	dmarc=none header.from=birger-koblitz.de;
	spf=pass smtp.mailfrom=birger-koblitz.de;
	arc=fail 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 E172B606A325;
	Sun, 29 Nov 2026 07:17:53 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=birger-koblitz.de header.i=@birger-koblitz.de header.a=rsa-sha256 header.s=default header.b=LL+5lRLb;
	dkim=pass (2048-bit key) header.d=birger-koblitz.de header.i=@birger-koblitz.de header.a=rsa-sha256 header.s=default header.b=aHo0OG+M
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=23.88.97.239
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795936663;
	b=VfMCAi2lIXJxpKy5SNzCMhOmMyyuTBAAUf6tRdEkwde2kQllKanBt/czojK+FfPKPWge
	 qaqsTDdKG+Ub/gBsMEZQzU4s0ZTsBjqzkkzXGfWi55Gsnz2Anb49apcnq4zSKA7WfubCu
	 M9y63vgNRq/RGg5Ywiofs3bpGvc/pAPITee/wc8Yx7cESEPOusQL28YyMQ2l3A/H3AAHz
	 f186bV4Mp4RA+MA7vOJE0G5W+pN+atkPsOHgQqx4ZGaCxt5MDB7EaceB15oMY8cNdg4Cq
	 3DwTK9k8XpYLO8TDWpf+OKwW00IJULBanndE7iYi7ZOa3y3IPCpK2uCAi0t6hvwGKJQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795936663;
	h=DMARC-Filter:DKIM-Signature:Received:X-Spam-Checker-Version:
	 X-Spam-Level:X-Spam-Status:DKIM-Signature:Received:Message-ID:Date:
	 MIME-Version:User-Agent:Subject:To:Cc:References:From:
	 Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding;
	bh=c1+B8AWjiBaMp/qblBSKD90TA3gJ/5XmJmQQHICJeAs=;
	b=Wb9Ji3Ki24FLWrizWTb9XuLjWPZ2/C9eeOw5vGyTHVrMC5tRDLRsTLNS/cJctUsMZR84
	 hHxPaOz/MaZ0L821c2prIjJxK5TDH/FFDDFsYxsv1urJZi3ek0gZ2uONYauQYnUMS8MKL
	 ws2BwSaCEKOTGS1ZsvxCjlTSYcB9IuLXdBVFhwedqCoLjjm2VGmFHeKyYCV7cNegjGVes
	 gCiB6EiAYld9vMyMjOu5gOv2l7PSL2kamKW8P3DFpWGENoTBdXvOSLzfEOVZ8c3agYGRF
	 jkm3W6UT1rI9zhTky+YQv7xtx1ref0i/+7IdM7fmr7vI/w5aEgUayeCSG56FJhehwOA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=birger-koblitz.de;
	spf=pass smtp.mailfrom=birger-koblitz.de;
	dkim=pass header.d=birger-koblitz.de header.i=@birger-koblitz.de header.a=rsa-sha256 header.s=default header.b=LL+5lRLb;
	dkim=pass header.d=birger-koblitz.de header.i=@birger-koblitz.de header.a=rsa-sha256 header.s=default header.b=aHo0OG+M;
	arc=none smtp.remote-ip=23.88.97.239
X-Received: from bkemail.birger-koblitz.de (bkemail.birger-koblitz.de [23.88.97.239])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D2DD606A31C;
	Sun, 29 Nov 2026 07:17:42 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7D2DD606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=birger-koblitz.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=birger-koblitz.de
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=birger-koblitz.de;
	s=default; t=1795936660;
	bh=qIMMwqeyt3a6E/jNNwq/TrEmJyXbiIr1fAUQAXd4IF4=;
	h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
	b=LL+5lRLbVTTjnJBgNwKhlhprLI+e4zslEqRvWYOFerFNaqB3XaQiZf3CGsbNB1K22
	 /tIgQoQt8usAqY7AODRe/fAT6pA0RxH3T2EqumOqroJUEJwSoFXtYK3p4IC8fox5h9
	 HgYCfOXxUL2b1VLeARwOhgJZpqOMqU6B8zQhPEsqtLQBeoHwRIqnYv3lsN9Y+RmS7N
	 1S6xLxITkysfnj1ejFbRjGxNEkGnJ3VRb19smWNP1srAMFyiqMw1LHVxMCRx3boFaq
	 +WdtNr0budlb6Vw/NNJCjOvakkMfAFG0ZEB/T/98nfNi4VFS12wy+eONs1xvXXlqLv
	 7gwMsWU9Knahw==
X-Received: by bkemail.birger-koblitz.de (Postfix, from userid 109)
	id 8E2A049B5A; Sun, 29 Nov 2026 07:17:40 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=birger-koblitz.de;
	s=default; t=1795936658;
	bh=qIMMwqeyt3a6E/jNNwq/TrEmJyXbiIr1fAUQAXd4IF4=;
	h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
	b=aHo0OG+MWd4f7NS8GWNyF8yvMYz4jgmCOgbtoMnfIG67SvTFVe5FF9eSWVpa9VLRW
	 TKpE5MKv5XvMhwuW5F0ozObndU760JzjVcHrKKfCfT+miLEYQ4ZmsmGH1qV2jmSO7h
	 xwOLtkYz/dMkfZVBFETd4KyyKZtEjhDV12u+nMscz4AjIuNIf7ZG0d1zbUYQ7OSyf7
	 PmY7dxsi8ZIruh3v09a8nvFs2eGzec8B71my1hf3LBEU0B28Cmxj9qsubRaNavOhqM
	 kr+YGcuG+f/D0MdzgzDkL9q6IbigfLj7TLOiOCgAcnC82hHos3rSJMukatj1pBV5H0
	 CxNboGfy5vH8Q==
X-Received: from [IPV6:2a00:6020:47a3:e800:271c:c6c5:9fde:77cb] (unknown [IPv6:2a00:6020:47a3:e800:271c:c6c5:9fde:77cb])
	by bkemail.birger-koblitz.de (Postfix) with ESMTPSA id D2D4049B50;
	Sun, 29 Nov 2026 07:17:37 +0000 (UTC)
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-User-Agent: Mozilla Thunderbird
X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
 kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
 linux-usb@vger.kernel.org, benjamin.larsson@genexis.eu
X-In-Reply-To: <179584815990.3135.5137971484005173950@kernel.org>