From: Andrew Lunn <andrew@lunn.ch>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev <netdev@vger.kernel.org>,
Tobias Waldekranz <tobias@waldekranz.com>,
Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH net] dsa: tag_dsa: Handle !CONFIG_BRIDGE_VLAN_FILTERING case
Date: Mon, 4 Oct 2021 14:18:54 +0200 [thread overview]
Message-ID: <YVrxLvHqkyvdYIfb@lunn.ch> (raw)
In-Reply-To: <20211003210354.tiyaqsdje6ju7arz@skbuf>
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
next prev parent reply other threads:[~2021-10-04 12:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-03 15:51 [PATCH net] dsa: tag_dsa: Handle !CONFIG_BRIDGE_VLAN_FILTERING case Andrew Lunn
2021-10-03 21:03 ` Vladimir Oltean
2021-10-04 12:18 ` Andrew Lunn [this message]
2021-10-04 12:47 ` Vladimir Oltean
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=YVrxLvHqkyvdYIfb@lunn.ch \
--to=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=tobias@waldekranz.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