Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
To: netdev-bot+sashiko@kernel.org
Cc: maxime.chevallier@bootlin.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, mcoquelin.stm32@gmail.com,
	alexandre.torgue@foss.st.com, ast@kernel.org,
	daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com,
	sdf@fomichev.me, Jose.Abreu@synopsys.com,
	boon.leong.ong@intel.com, horms@kernel.org, andrii@kernel.org,
	eddyz87@gmail.com, memxor@gmail.com, martin.lau@linux.dev,
	song@kernel.org, yonghong.song@linux.dev, jolsa@kernel.org,
	emil@etsalapatis.com, ihor.solodrai@linux.dev,
	matthew.gerlach@altera.com, boon.khai.ng@altera.com,
	linux@armlinux.org.uk, willemb@google.com,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	bpf@vger.kernel.org, nb@tipi-net.de
Subject: Re: [PATCH net-next v14 2/5] net: stmmac: remove software VLAN tag stripping
Date: Sat, 5 Dec 2026 18:33:35 +0100	[thread overview]
Message-ID: <axRK7-_y0UmjBOHL@lore-desk> (raw)
In-Reply-To: <axP6DyBA-92gZtO9@lore-desk>

[-- Attachment #1: Type: text/plain, Size: 5029 bytes --]

On Dec 05, Lorenzo Bianconi wrote:
> On Dec 05, netdev-bot+sashiko@kernel.org wrote:
> > Thank you for your contribution! Sashiko AI review found 1 potential
> > issue(s) to consider.
> > 
> > Critical: 0 · High: 0 · Medium: 1 · Low: 0
> > 
> > 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] With this patch, the PHY is allowed to stop RXC in LPI on
> >   dwmac100/dwmac1000 and on DWXLGMAC builds that have no vlhash/vlins.
> > 
> > --
> > 
> > net: stmmac: remove software VLAN tag stripping
> > 
> > This removes the software VLAN stripping fallback in stmmac_rx_vlan().
> > stmmac_has_ip_ethertype() is reworked so it still recognises IPv4/IPv6
> > behind a single in-payload C-tag on RX. NETIF_F_HW_VLAN_CTAG_RX and
> > NETIF_F_HW_VLAN_STAG_RX are now advertised only on cores that actually
> > provide hardware RX VLAN offload.
> > 
> > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > > index b3524d46863da..c429cb9e1ccbe 100644
> > > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > 
> > [ ... ]
> > 
> > > @@ -8282,15 +8255,15 @@ static int __stmmac_dvr_probe(struct device *device,
> > >  	ndev->features |= ndev->hw_features | NETIF_F_HIGHDMA;
> > >  	ndev->watchdog_timeo = msecs_to_jiffies(watchdog);
> > >  #ifdef STMMAC_VLAN_TAG_USED
> > > -	/* Both mac100 and gmac support receive VLAN tag detection */
> > > -	ndev->features |= NETIF_F_HW_VLAN_CTAG_RX;
> > > -	if (priv->plat->core_type == DWMAC_CORE_XGMAC)
> > > -		ndev->features |= NETIF_F_HW_VLAN_STAG_RX;
> > > -
> > > -	if (dwmac_is_xmac(priv->plat->core_type)) {
> > > +	if (stmmac_rx_8021q_offload(priv)) {
> > > +		ndev->features |= NETIF_F_HW_VLAN_CTAG_RX;
> > >  		ndev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX;
> > >  		priv->hw->hw_vlan_en = true;
> > >  	}
> > > +
> > > +	if (stmmac_rx_8021ad_offload(priv))
> > > +		ndev->features |= NETIF_F_HW_VLAN_STAG_RX;
> > > +
> > 
> > [Severity: Medium]
> > Can this change let the PHY stop RXC in LPI on cores where it never could
> > before, with CONFIG_VLAN_8021Q=y?
> > 
> > Before this patch, NETIF_F_HW_VLAN_CTAG_RX was set on every core. Now
> > dwmac100/dwmac1000 have no .vlan ops, and dwxlgmac2_vlan_ops has no
> > .rx_hw_vlan. On those cores without vlhash/vlins, NETIF_F_VLAN_FEATURES
> > is therefore empty by the time stmmac_phylink_setup() runs:
> > 
> > stmmac_phylink_setup() {
> >     ...
> > 	if (!(priv->plat->flags & STMMAC_FLAG_RX_CLK_RUNS_IN_LPI) &&
> > 	    !(priv->dev->features & NETIF_F_VLAN_FEATURES))
> > 		config->eee_rx_clk_stop_enable = true;
> >     ...
> > }
> > 
> > Because of that, RX clock stop is now on by default for dwmac1000 with EEE
> > and for DWXLGMAC without vlhash/vlins.
> > 
> > stmmac_set_rx_mode() still writes the MAC address, hash and frame filter
> > registers through stmmac_set_filter() with BH disabled. It does not call
> > phylink_rx_clk_stop_block():
> > 
> >  *  FIXME: This may need RXC to be running, but it may be called with BH
> >  *  disabled, which means we can't call phylink_rx_clk_stop*().
> >  */
> > static void stmmac_set_rx_mode(struct net_device *dev)
> > 
> > If a multicast join, unicast address change or promisc toggle arrives
> > while the link is idle in LPI and RXC is stopped, can the hardware filter
> > end up out of sync with the software lists? One example is a missed IPv6
> > solicited-node multicast address, which would break ND until the next
> > set_rx_mode call.
> > 
> > The commit message acknowledges this window and says a dedicated
> > follow-up will fix it. That follow-up does not seem to be part of this
> > series. At the last commit of the series ("net: stmmac: rework stmmac_rx
> > to support XDP rx multi-buff"), stmmac_phylink_setup() still uses the
> > same NETIF_F_VLAN_FEATURES gate.
> > 
> > The patch also carries "Fixes: 534df0c1724b", so stable could pick it up
> > without the decoupling change. Could eee_rx_clk_stop_enable be decoupled
> > from NETIF_F_VLAN_FEATURES before this patch, or in the same series?
> 
> As previously pointed out this issue is not introduced by this patch
> (CONFIG_VLAN_8021Q=n) so I think it should be fixed with a dedicated patch.

I posted a dedicated fix for this issue here:
https://lore.kernel.org/netdev/20261205-stmmac-keep-rxc-running-v1-1-35f8cb71cb98@oss.qualcomm.com/T/#u

Regards,
Lorenzo

> 
> Regards,
> Lorenzo
> 
> > 
> > -- 
> > Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204-stmmac-rx-mb-v14-0-5506796fd39e%40oss.qualcomm.com



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 10:44 [PATCH net-next v14 0/5] net: stmmac: introduce XDP rx multi-buff support Lorenzo Bianconi
2026-12-04 10:44 ` [PATCH net-next v14 1/5] net: stmmac: selftests: Prevent RXC from being disabled in LPI Lorenzo Bianconi
2026-12-04 10:44 ` [PATCH net-next v14 2/5] net: stmmac: remove software VLAN tag stripping Lorenzo Bianconi
2026-12-05 10:51   ` netdev-bot+sashiko
2026-12-05 11:48     ` Lorenzo Bianconi
2026-12-05 17:33       ` Lorenzo Bianconi [this message]
2026-12-04 10:44 ` [PATCH net-next v14 3/5] net: xdp: add xdp_buff_shrink_tail() helper Lorenzo Bianconi
2026-12-04 10:44 ` [PATCH net-next v14 4/5] net: xdp: add __xdp_return_buff() helper Lorenzo Bianconi
2026-12-04 10:44 ` [PATCH net-next v14 5/5] net: stmmac: rework stmmac_rx to support XDP rx multi-buff Lorenzo Bianconi
2026-12-05 10:51   ` 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=axRK7-_y0UmjBOHL@lore-desk \
    --to=lorenzo.bianconi@oss.qualcomm.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=boon.khai.ng@altera.com \
    --cc=boon.leong.ong@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=eddyz87@gmail.com \
    --cc=edumazet@kernel.org \
    --cc=emil@etsalapatis.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=ihor.solodrai@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=martin.lau@linux.dev \
    --cc=matthew.gerlach@altera.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=memxor@gmail.com \
    --cc=nb@tipi-net.de \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=willemb@google.com \
    --cc=yonghong.song@linux.dev \
    /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