* [PATCH net] net: ethernet: mtk_eth_soc: fix tx vlan tag for llc packets
@ 2025-08-31 18:20 Felix Fietkau
2025-09-01 15:54 ` Simon Horman
2025-09-02 23:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Felix Fietkau @ 2025-08-31 18:20 UTC (permalink / raw)
To: netdev, hacks, Sean Wang, Lorenzo Bianconi, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Matthias Brugger, AngeloGioacchino Del Regno, Michael Lee,
John Crispin
When sending llc packets with vlan tx offload, the hardware fails to
actually add the tag. Deal with this by fixing it up in software.
Fixes: 656e705243fd ("net-next: mediatek: add support for MT7623 ethernet")
Reported-by: Thibaut VARENE <hacks@slashdirt.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 5a5fcde76dc0..e68997a29191 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1761,6 +1761,13 @@ static netdev_tx_t mtk_start_xmit(struct sk_buff *skb, struct net_device *dev)
bool gso = false;
int tx_num;
+ if (skb_vlan_tag_present(skb) &&
+ !eth_proto_is_802_3(eth_hdr(skb)->h_proto)) {
+ skb = __vlan_hwaccel_push_inside(skb);
+ if (!skb)
+ goto dropped;
+ }
+
/* normally we can rely on the stack not calling this more than once,
* however we have 2 queues running on the same ring so we need to lock
* the ring access
@@ -1806,8 +1813,9 @@ static netdev_tx_t mtk_start_xmit(struct sk_buff *skb, struct net_device *dev)
drop:
spin_unlock(ð->page_lock);
- stats->tx_dropped++;
dev_kfree_skb_any(skb);
+dropped:
+ stats->tx_dropped++;
return NETDEV_TX_OK;
}
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: ethernet: mtk_eth_soc: fix tx vlan tag for llc packets
2025-08-31 18:20 [PATCH net] net: ethernet: mtk_eth_soc: fix tx vlan tag for llc packets Felix Fietkau
@ 2025-09-01 15:54 ` Simon Horman
2025-09-02 23:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-09-01 15:54 UTC (permalink / raw)
To: Felix Fietkau
Cc: netdev, hacks, Sean Wang, Lorenzo Bianconi, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Matthias Brugger, AngeloGioacchino Del Regno, Michael Lee,
John Crispin
On Sun, Aug 31, 2025 at 08:20:07PM +0200, Felix Fietkau wrote:
> When sending llc packets with vlan tx offload, the hardware fails to
> actually add the tag. Deal with this by fixing it up in software.
>
> Fixes: 656e705243fd ("net-next: mediatek: add support for MT7623 ethernet")
> Reported-by: Thibaut VARENE <hacks@slashdirt.org>
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: ethernet: mtk_eth_soc: fix tx vlan tag for llc packets
2025-08-31 18:20 [PATCH net] net: ethernet: mtk_eth_soc: fix tx vlan tag for llc packets Felix Fietkau
2025-09-01 15:54 ` Simon Horman
@ 2025-09-02 23:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-02 23:40 UTC (permalink / raw)
To: Felix Fietkau
Cc: netdev, hacks, sean.wang, lorenzo, andrew+netdev, davem, edumazet,
kuba, pabeni, matthias.bgg, angelogioacchino.delregno, igvtee,
john
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sun, 31 Aug 2025 20:20:07 +0200 you wrote:
> When sending llc packets with vlan tx offload, the hardware fails to
> actually add the tag. Deal with this by fixing it up in software.
>
> Fixes: 656e705243fd ("net-next: mediatek: add support for MT7623 ethernet")
> Reported-by: Thibaut VARENE <hacks@slashdirt.org>
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
>
> [...]
Here is the summary with links:
- [net] net: ethernet: mtk_eth_soc: fix tx vlan tag for llc packets
https://git.kernel.org/netdev/net/c/d4736737110f
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] 3+ messages in thread
end of thread, other threads:[~2025-09-02 23:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-31 18:20 [PATCH net] net: ethernet: mtk_eth_soc: fix tx vlan tag for llc packets Felix Fietkau
2025-09-01 15:54 ` Simon Horman
2025-09-02 23:40 ` 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).