2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/net/ethernet/microchip/lan966x
Horatiu Vultur 27eab4c644 net: lan966x: Make sure to insert the vlan tags also in host mode
When running these commands on DUT (and similar at the other end)
ip link set dev eth0 up
ip link add link eth0 name eth0.10 type vlan id 10
ip addr add 10.0.0.1/24 dev eth0.10
ip link set dev eth0.10 up
ping 10.0.0.2

The ping will fail.

The reason why is failing is because, the network interfaces for lan966x
have a flag saying that the HW can insert the vlan tags into the
frames(NETIF_F_HW_VLAN_CTAG_TX). Meaning that the frames that are
transmitted don't have the vlan tag inside the skb data, but they have
it inside the skb. We already get that vlan tag and put it in the IFH
but the problem is that we don't configure the HW to rewrite the frame
when the interface is in host mode.
The fix consists in actually configuring the HW to insert the vlan tag
if it is different than 0.

Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Fixes: 6d2c186afa ("net: lan966x: Add vlan support.")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Link: https://patch.msgid.link/20250528093619.3738998-1-horatiu.vultur@microchip.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-05-29 15:48:37 +02:00
..
Kconfig net: lan966x: select FDMA library 2024-09-10 11:04:16 +02:00
lan966x_cbs.c
lan966x_dcb.c net: lan966x: Add support for DSCP rewrite 2023-05-18 15:32:10 +02:00
lan966x_ethtool.c net: lan966x: Remove setting of RX software timestamp 2024-09-06 09:34:16 +01:00
lan966x_ets.c
lan966x_fdb.c
lan966x_fdma.c net: lan966x: refactor buffer reload function 2024-09-10 11:04:17 +02:00
lan966x_goto.c
lan966x_ifh.h net: lan966x: Correct spelling in comments 2024-04-25 19:13:26 -07:00
lan966x_lag.c lan966x: Fix crash when adding interface under a lag 2024-02-09 13:47:47 -08:00
lan966x_mac.c
lan966x_main.c net: lan966x: Make sure to insert the vlan tags also in host mode 2025-05-29 15:48:37 +02:00
lan966x_main.h net: lan966x: Make sure to insert the vlan tags also in host mode 2025-05-29 15:48:37 +02:00
lan966x_mdb.c
lan966x_mirror.c
lan966x_mqprio.c
lan966x_phylink.c net: phylink: pass neg_mode into c22 state decoder 2025-01-15 13:23:30 -08:00
lan966x_police.c net: lan966x: Change lan966x_police_del return type 2023-03-15 00:28:56 -07:00
lan966x_port.c net: phylink: pass neg_mode into c22 state decoder 2025-01-15 13:23:30 -08:00
lan966x_ptp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-28 10:11:15 +02:00
lan966x_regs.h net: lan966x: Add registers to configure PCP, DEI, DSCP 2023-05-18 15:32:09 +02:00
lan966x_switchdev.c net: lan966x: Make sure to insert the vlan tags also in host mode 2025-05-29 15:48:37 +02:00
lan966x_taprio.c
lan966x_tbf.c
lan966x_tc_flower.c net: lan966x: flower: check for unsupported control flags 2024-04-25 19:36:37 -07:00
lan966x_tc_matchall.c
lan966x_tc.c net/sched: taprio: replace tc_taprio_qopt_offload :: enable with a "cmd" enum 2023-05-31 10:00:30 +01:00
lan966x_vcap_ag_api.c net: lan966x: Add ES0 VCAP model 2023-05-10 09:51:10 +01:00
lan966x_vcap_ag_api.h
lan966x_vcap_debugfs.c net: lan966x: debugfs: Fix showing the port keyset 2024-01-31 13:35:19 +00:00
lan966x_vcap_impl.c net: microchip: Constify struct vcap_operations 2024-06-18 15:26:39 +02:00
lan966x_vlan.c net: lan966x: Make sure to insert the vlan tags also in host mode 2025-05-29 15:48:37 +02:00
lan966x_xdp.c lan966x: Don't use xdp_frame when action is XDP_TX 2023-04-24 18:58:04 -07:00
Makefile net: lan966x: use FDMA library symbols 2024-09-10 11:04:16 +02:00