Patch "net: dsa: sja1105: always enable the INCL_SRCPT option" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: dsa: sja1105: always enable the INCL_SRCPT option

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-dsa-sja1105-always-enable-the-incl_srcpt-option.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2e9ad3c5c55d896502f2645040c62dcfed0e30c5
Author: Vladimir Oltean <vladimir.oltean@xxxxxxx>
Date:   Tue Jun 27 12:42:06 2023 +0300

    net: dsa: sja1105: always enable the INCL_SRCPT option
    
    [ Upstream commit b4638af8885af93cd70351081da1909c59342440 ]
    
    Link-local traffic on bridged SJA1105 ports is sometimes tagged by the
    hardware with source port information (when the port is under a VLAN
    aware bridge).
    
    The tag_8021q source port identification has become more loose
    ("imprecise") and will report a plausible rather than exact bridge port,
    when under a bridge (be it VLAN-aware or VLAN-unaware). But link-local
    traffic always needs to know the precise source port.
    
    Modify the driver logic (and therefore: the tagging protocol itself) to
    always include the source port information with link-local packets,
    regardless of whether the port is standalone, under a VLAN-aware or
    VLAN-unaware bridge. This makes it possible for the tagging driver to
    give priority to that information over the tag_8021q VLAN header.
    
    The big drawback with INCL_SRCPT is that it makes it impossible to
    distinguish between an original MAC DA of 01:80:C2:XX:YY:ZZ and
    01:80:C2:AA:BB:ZZ, because the tagger just patches MAC DA bytes 3 and 4
    with zeroes. Only if PTP RX timestamping is enabled, the switch will
    generate a META follow-up frame containing the RX timestamp and the
    original bytes 3 and 4 of the MAC DA. Those will be used to patch up the
    original packet. Nonetheless, in the absence of PTP RX timestamping, we
    have to live with this limitation, since it is more important to have
    the more precise source port information for link-local traffic.
    
    Fixes: d7f9787a763f ("net: dsa: tag_8021q: add support for imprecise RX based on the VBID")
    Fixes: 91495f21fcec ("net: dsa: tag_8021q: replace the SVL bridging with VLAN-unaware IVL bridging")
    Signed-off-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
    Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index b70dcf32a26dc..8bd61f2ebb2ad 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -866,11 +866,11 @@ static int sja1105_init_general_params(struct sja1105_private *priv)
 		.hostprio = 7,
 		.mac_fltres1 = SJA1105_LINKLOCAL_FILTER_A,
 		.mac_flt1    = SJA1105_LINKLOCAL_FILTER_A_MASK,
-		.incl_srcpt1 = false,
+		.incl_srcpt1 = true,
 		.send_meta1  = false,
 		.mac_fltres0 = SJA1105_LINKLOCAL_FILTER_B,
 		.mac_flt0    = SJA1105_LINKLOCAL_FILTER_B_MASK,
-		.incl_srcpt0 = false,
+		.incl_srcpt0 = true,
 		.send_meta0  = false,
 		/* Default to an invalid value */
 		.mirr_port = priv->ds->num_ports,
@@ -2407,11 +2407,6 @@ int sja1105_vlan_filtering(struct dsa_switch *ds, int port, bool enabled,
 	general_params->tpid = tpid;
 	/* EtherType used to identify outer tagged (S-tag) VLAN traffic */
 	general_params->tpid2 = tpid2;
-	/* When VLAN filtering is on, we need to at least be able to
-	 * decode management traffic through the "backup plan".
-	 */
-	general_params->incl_srcpt1 = enabled;
-	general_params->incl_srcpt0 = enabled;
 
 	for (port = 0; port < ds->num_ports; port++) {
 		if (dsa_is_unused_port(ds, port))



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux