[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211004124745.57e2dzauxlmvzlhw@skbuf>
Date: Mon, 4 Oct 2021 12:47:46 +0000
From: Vladimir Oltean <vladimir.oltean@....com>
To: Andrew Lunn <andrew@...n.ch>
CC: netdev <netdev@...r.kernel.org>,
Tobias Waldekranz <tobias@...dekranz.com>,
Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH net] dsa: tag_dsa: Handle !CONFIG_BRIDGE_VLAN_FILTERING
case
On Mon, Oct 04, 2021 at 02:18:54PM +0200, Andrew Lunn wrote:
> On Sun, Oct 03, 2021 at 09:03:55PM +0000, Vladimir Oltean wrote:
> > On Sun, Oct 03, 2021 at 05:51:41PM +0200, Andrew Lunn wrote:
> > > If CONFIG_BRIDGE_VLAN_FILTERING is disabled, br_vlan_enabled() is
> > > replaced with a stub which returns -EINVAL.
> >
> > br_vlan_enabled() returns bool, so it cannot hold -EINVAL. The stub for
> > that returns false. We negate that false, make it true, and then call
> > br_vlan_get_pvid_rcu() which returns -EINVAL because of _its_ stub
> > implementation.
>
> Yeh, i got the names of the functions wrong. I will fix that.
>
> > In fact it is actually wrong to inject into the switch using the
> > bridge's pvid, if VLAN awareness is turned off. We should be able to
> > send and receive packets in that mode regardless of whether a pvid
> > exists for the bridge device or not. That is also what we document in
> > Documentation/networking/switchdev.rst.
> >
> > So if VLAN 0 does that trick, perfect, we should just delete the entire
> > "if (!br_vlan_enabled(br))" block.
>
> I will rework the patch and test it without the if.
>
> Thanks
> Andrew
I already resent the patch here:
https://patchwork.kernel.org/project/netdevbpf/patch/20211003222312.284175-2-vladimir.oltean@nxp.com/
Powered by blists - more mailing lists