* [PATCH net v1] net: stmmac: enable HW-accelerated VLAN stripping for gmac4 only
@ 2024-07-01 8:19 Furong Xu
2024-07-03 8:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Furong Xu @ 2024-07-01 8:19 UTC (permalink / raw)
To: David S. Miller, Alexandre Torgue, Jose Abreu, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Joao Pinto,
Lai Peter Jun Ann
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, xfr, rock.xu,
Furong Xu
Commit 750011e239a5 ("net: stmmac: Add support for HW-accelerated VLAN
stripping") enables MAC level VLAN tag stripping for all MAC cores, but
leaves set_hw_vlan_mode() and rx_hw_vlan() un-implemented for both gmac
and xgmac.
On gmac and xgmac, ethtool reports rx-vlan-offload is on, both MAC and
driver do nothing about VLAN packets actually, although VLAN works well.
Driver level stripping should be used on gmac and xgmac for now.
Fixes: 750011e239a5 ("net: stmmac: Add support for HW-accelerated VLAN stripping")
Signed-off-by: Furong Xu <0x1207@gmail.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index b3afc7cb7d72..c58782c41417 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -7662,9 +7662,10 @@ int stmmac_dvr_probe(struct device *device,
#ifdef STMMAC_VLAN_TAG_USED
/* Both mac100 and gmac support receive VLAN tag detection */
ndev->features |= NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_STAG_RX;
- ndev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX;
- priv->hw->hw_vlan_en = true;
-
+ if (priv->plat->has_gmac4) {
+ ndev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX;
+ priv->hw->hw_vlan_en = true;
+ }
if (priv->dma_cap.vlhash) {
ndev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
ndev->features |= NETIF_F_HW_VLAN_STAG_FILTER;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net v1] net: stmmac: enable HW-accelerated VLAN stripping for gmac4 only
2024-07-01 8:19 [PATCH net v1] net: stmmac: enable HW-accelerated VLAN stripping for gmac4 only Furong Xu
@ 2024-07-03 8:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-07-03 8:20 UTC (permalink / raw)
To: Furong Xu
Cc: davem, alexandre.torgue, joabreu, edumazet, kuba, pabeni,
mcoquelin.stm32, jpinto, jun.ann.lai, netdev, linux-stm32,
linux-arm-kernel, linux-kernel, xfr, rock.xu
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Mon, 1 Jul 2024 16:19:36 +0800 you wrote:
> Commit 750011e239a5 ("net: stmmac: Add support for HW-accelerated VLAN
> stripping") enables MAC level VLAN tag stripping for all MAC cores, but
> leaves set_hw_vlan_mode() and rx_hw_vlan() un-implemented for both gmac
> and xgmac.
>
> On gmac and xgmac, ethtool reports rx-vlan-offload is on, both MAC and
> driver do nothing about VLAN packets actually, although VLAN works well.
>
> [...]
Here is the summary with links:
- [net,v1] net: stmmac: enable HW-accelerated VLAN stripping for gmac4 only
https://git.kernel.org/netdev/net/c/8eb301bd7b0f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-03 8:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-01 8:19 [PATCH net v1] net: stmmac: enable HW-accelerated VLAN stripping for gmac4 only Furong Xu
2024-07-03 8:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).