From: Simon Horman <simon.horman@corigine.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: dsa: tag_sja1105: fix source port decoding in vlan_filtering=0 bridge mode
Date: Sat, 1 Jul 2023 21:38:06 +0200 [thread overview]
Message-ID: <ZKCAngK+ngGrrG3q@corigine.com> (raw)
In-Reply-To: <20230630222010.1691671-1-vladimir.oltean@nxp.com>
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@nxp.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
next prev parent reply other threads:[~2023-07-01 19:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-30 22:20 [PATCH net] net: dsa: tag_sja1105: fix source port decoding in vlan_filtering=0 bridge mode Vladimir Oltean
2023-07-01 19:38 ` Simon Horman [this message]
2023-07-03 8:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZKCAngK+ngGrrG3q@corigine.com \
--to=simon.horman@corigine.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox