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