All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolai Buchwitz <nb@tipi-net.de>
To: Florian Fainelli <florian.fainelli@broadcom.com>
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>
Subject: Re: [PATCH net-next 2/2] net: bcmgenet: add support for NETIF_F_RXFCS
Date: Sat, 05 Dec 2026 13:23:58 +0100	[thread overview]
Message-ID: <c98622db162d9860a6c21455583fea52@tipi-net.de> (raw)
In-Reply-To: <20261204230048.3554713-3-florian.fainelli@broadcom.com>

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

  reply	other threads:[~2026-12-05 12:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 23:00 [PATCH net-next 0/2] net: bcmgenet: Support for NETIF_F_RXFCS Florian Fainelli
2026-12-04 23:00 ` [PATCH net-next 1/2] net: bcmgenet: keep FCS forwarding when exiting Wake-on-LAN Florian Fainelli
2026-12-05 12:16   ` Nicolai Buchwitz
2026-12-05 23:30   ` netdev-bot+sashiko
2026-12-04 23:00 ` [PATCH net-next 2/2] net: bcmgenet: add support for NETIF_F_RXFCS Florian Fainelli
2026-12-05 12:23   ` Nicolai Buchwitz [this message]
2026-12-05 23:30   ` netdev-bot+sashiko

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=c98622db162d9860a6c21455583fea52@tipi-net.de \
    --to=nb@tipi-net.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=opendmb@gmail.com \
    --cc=pabeni@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.