net: microchip: sparx5: Egress VLAN TPID configuration follows IFH
authorSteen Hegelund <steen.hegelund@microchip.com>
Tue, 14 Feb 2023 10:40:42 +0000 (11:40 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 16 Feb 2023 07:59:48 +0000 (08:59 +0100)
This changes the TPID of the egress frames to use the TPID stored in the
IFH (internal frame header), which ensures that this is the TPID classified
for the frame at ingress.

Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/microchip/sparx5/sparx5_vlan.c

index 34f954bbf815155f6bd680d4b50e0bd969a3441f..ac001ae59a38568584f6ef5d4b45a8847dc96c84 100644 (file)
@@ -219,8 +219,8 @@ void sparx5_vlan_port_apply(struct sparx5 *sparx5,
        spx5_wr(val, sparx5,
                ANA_CL_VLAN_FILTER_CTRL(port->portno, 0));
 
-       /* Egress configuration (REW_TAG_CFG): VLAN tag type to 8021Q */
-       val = REW_TAG_CTRL_TAG_TPID_CFG_SET(0);
+       /* Egress configuration (REW_TAG_CFG): VLAN tag selected via IFH */
+       val = REW_TAG_CTRL_TAG_TPID_CFG_SET(5);
        if (port->vlan_aware) {
                if (port->vid)
                        /* Tag all frames except when VID == DEFAULT_VLAN */