From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Ovidiu Panait <ovidiu.panait.rb@renesas.com>,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
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,
boon.khai.ng@altera.com, matthew.gerlach@altera.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 1/5] net: stmmac: Remove VLAN perfect matching dead code
Date: Wed, 29 Jul 2026 13:29:06 +0200 [thread overview]
Message-ID: <dfe9ee00-6a8a-418d-9440-339631b31e52@bootlin.com> (raw)
In-Reply-To: <20260729095110.164157-2-ovidiu.panait.rb@renesas.com>
Hi Ovidiu,
On 7/29/26 11:51, Ovidiu Panait wrote:
> stmmac_vlan_update() falls back to "perfect matching" when the VLAN hash
> filter is unavailable (!priv->dma_cap.vlhash). This fallback has been
> unreachable in normal operation since its introduction in
> commit c7ab0b8088d7 ("net: stmmac: Fallback to VLAN Perfect filtering if
> HASH is not available") because the NETIF_F_HW_VLAN_{CTAG,STAG}_FILTER
> features are advertised only when priv->dma_cap.vlhash is true.
>
> The fallback is also duplicating the code in vlan_add_hw_rx_fltr(), which
> is always available since stmmac_get_num_vlan() returns at least 1.
It's not exactly dead code, there's an stmmac selftest for that, see :
https://elixir.bootlin.com/linux/v7.2-rc4/source/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c#L973
It does exactly what you say, it fakes the fact that we don't support vlhash,
then exercise the perfect matching path.
But is it correct to drop that feature altogether ? Or should we just
relax the conditions for NETIF_F_HW_VLAN_{CTAG,STAG}_FILTER to be
advertised ?
Maxime
next prev parent reply other threads:[~2026-07-29 11:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 9:51 [PATCH net 0/5] net: stmmac: Fix double VLAN 802.1ad tag handling Ovidiu Panait
2026-07-29 9:51 ` [PATCH net 1/5] net: stmmac: Remove VLAN perfect matching dead code Ovidiu Panait
2026-07-29 11:29 ` Maxime Chevallier [this message]
2026-07-29 15:02 ` Ovidiu Panait
2026-07-29 15:08 ` Maxime Chevallier
2026-07-29 9:51 ` [PATCH net 2/5] net: stmmac: Enable double VLAN processing only when supported Ovidiu Panait
2026-07-29 9:51 ` [PATCH net 3/5] net: stmmac: Move double VLAN handling to a dedicated op Ovidiu Panait
2026-07-29 9:51 ` [PATCH net 4/5] net: stmmac: Disable double VLAN stripping on dwmac4 Ovidiu Panait
2026-07-29 9:51 ` [PATCH net 5/5] net: stmmac: Fix double VLAN stripping on dwxgmac2 Ovidiu Panait
2026-07-29 11:30 ` [PATCH net 0/5] net: stmmac: Fix double VLAN 802.1ad tag handling Maxime Chevallier
2026-07-29 11:35 ` Maxime Chevallier
2026-07-29 16:29 ` Andrew Lunn
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=dfe9ee00-6a8a-418d-9440-339631b31e52@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=boon.khai.ng@altera.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--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=matthew.gerlach@altera.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=ovidiu.panait.rb@renesas.com \
--cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox