[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZKCAngK+ngGrrG3q@corigine.com>
Date: Sat, 1 Jul 2023 21:38:06 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: dsa: tag_sja1105: fix source port decoding in
vlan_filtering=0 bridge mode
On Sat, Jul 01, 2023 at 01:20:10AM +0300, Vladimir Oltean wrote:
> There was a regression introduced by the blamed commit, where pinging to
> a VLAN-unaware bridge would fail with the repeated message "Couldn't
> decode source port" coming from the tagging protocol driver.
>
> When receiving packets with a bridge_vid as determined by
> dsa_tag_8021q_bridge_join(), dsa_8021q_rcv() will decode:
> - source_port = 0 (which isn't really valid, more like "don't know")
> - switch_id = 0 (which isn't really valid, more like "don't know")
> - vbid = value in range 1-7
>
> Since the blamed patch has reversed the order of the checks, we are now
> going to believe that source_port != -1 and switch_id != -1, so they're
> valid, but they aren't.
>
> The minimal solution to the problem is to only populate source_port and
> switch_id with what dsa_8021q_rcv() came up with, if the vbid is zero,
> i.e. the source port information is trustworthy.
>
> Fixes: c1ae02d87689 ("net: dsa: tag_sja1105: always prefer source port information from INCL_SRCPT")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
Reviewed-by: Simon Horman <simon.horman@...igine.com>
Powered by blists - more mailing lists