From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Ovidiu Panait <ovidiu.panait.rb@renesas.com>,
recv.jo@gmail.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,
joabreu@synopsys.com, jun.ann.lai@intel.com,
yi.fang.gan@intel.com
Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v6 4/5] net: stmmac: Do not advertise S-VLAN stripping when it is disabled
Date: Wed, 30 Sep 2026 23:42:54 +0200 [thread overview]
Message-ID: <87598792-c93d-4e2b-9094-0f3e9c72e2c8@bootlin.com> (raw)
In-Reply-To: <20260928203441.34876-5-ovidiu.panait.rb@renesas.com>
Hi,
On 9/28/26 22:34, Ovidiu Panait wrote:
> C-VLAN and S-VLAN tag stripping are both controlled by the EVLS bit,
> so disabling rx-vlan-offload also disables S-VLAN tag stripping.
> However, rx-vlan-stag-hw-parse keeps being advertised as enabled:
>
> root@rzv2h-evk:~# ethtool -K end1 rx-vlan-offload off
> root@rzv2h-evk:~# ethtool -k end1 | grep -i vlan
> rx-vlan-offload: off
> tx-vlan-offload: off [fixed]
> rx-vlan-filter: on [fixed]
> vlan-challenged: off [fixed]
> tx-vlan-stag-hw-insert: off [fixed]
> rx-vlan-stag-hw-parse: on [fixed]
> rx-vlan-stag-filter: on [fixed]
>
> Fix this inconsistency by making NETIF_F_HW_VLAN_STAG_RX follow
> NETIF_F_HW_VLAN_CTAG_RX.
>
> Fixes: 750011e239a5 ("net: stmmac: Add support for HW-accelerated VLAN stripping")
> Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Maxime
> ---
> v6 changes: None.
>
> v5 changes:
> - Rebased on top of the rename patch: used dwmac_is_xmac() instead of
> the dropped hw_svlan_en flag.
>
> v4 changes:
> - New patch.
>
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 0d70eb452af7..b007ff120471 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -6211,6 +6211,13 @@ static netdev_features_t stmmac_fix_features(struct net_device *dev,
> if (priv->plat->bugged_jumbo && (dev->mtu > ETH_DATA_LEN))
> features &= ~NETIF_F_CSUM_MASK;
>
> + if (dwmac_is_xmac(priv->plat->core_type)) {
> + if (features & NETIF_F_HW_VLAN_CTAG_RX)
> + features |= NETIF_F_HW_VLAN_STAG_RX;
> + else
> + features &= ~NETIF_F_HW_VLAN_STAG_RX;
> + }
> +
> return features;
> }
>
next prev parent reply other threads:[~2026-09-30 21:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 20:34 [PATCH net v6 0/5] net: stmmac: Fix double VLAN 802.1ad tag handling Ovidiu Panait
2026-09-28 20:34 ` [PATCH net v6 1/5] net: stmmac: Remove VLAN perfect matching dead code Ovidiu Panait
2026-10-02 8:37 ` netdev-bot+sashiko
2026-09-28 20:34 ` [PATCH net v6 2/5] net: stmmac: Stop toggling the EDVLP bit Ovidiu Panait
2026-10-02 8:37 ` netdev-bot+sashiko
2026-10-05 14:42 ` Ovidiu Panait
2026-09-28 20:34 ` [PATCH net v6 3/5] net: stmmac: Rename double VLAN references to svlan Ovidiu Panait
2026-09-30 21:41 ` Maxime Chevallier
2026-10-02 8:37 ` netdev-bot+sashiko
2026-10-03 15:42 ` Maxime Chevallier
2026-09-28 20:34 ` [PATCH net v6 4/5] net: stmmac: Do not advertise S-VLAN stripping when it is disabled Ovidiu Panait
2026-09-30 21:42 ` Maxime Chevallier [this message]
2026-09-28 20:34 ` [PATCH net v6 5/5] net: stmmac: Disable S-Tag processing on dwmac4 Ovidiu Panait
2026-09-30 21:51 ` Maxime Chevallier
2026-10-02 8:37 ` netdev-bot+sashiko
2026-10-06 0:00 ` [PATCH net v6 0/5] net: stmmac: Fix double VLAN 802.1ad tag handling patchwork-bot+netdevbpf
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=87598792-c93d-4e2b-9094-0f3e9c72e2c8@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=joabreu@synopsys.com \
--cc=jun.ann.lai@intel.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=ovidiu.panait.rb@renesas.com \
--cc=pabeni@redhat.com \
--cc=recv.jo@gmail.com \
--cc=yi.fang.gan@intel.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.