From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"olteanv@gmail.com" <olteanv@gmail.com>,
"nikolay@nvidia.com" <nikolay@nvidia.com>
Subject: Re: [PATCH net-next v3 1/2] net: dsa: untag the bridge pvid from rx skbs
Date: Wed, 23 Sep 2020 21:48:53 +0000 [thread overview]
Message-ID: <20200923214852.x2z5gb6pzaphpfvv@skbuf> (raw)
In-Reply-To: <20200923214038.3671566-2-f.fainelli@gmail.com>
On Wed, Sep 23, 2020 at 02:40:37PM -0700, Florian Fainelli wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> + /* The sad part about attempting to untag from DSA is that we
> + * don't know, unless we check, if the skb will end up in
> + * the bridge's data path - br_allowed_ingress() - or not.
> + * For example, there might be an 8021q upper for the
> + * default_pvid of the bridge, which will steal VLAN-tagged traffic
> + * from the bridge's data path. This is a configuration that DSA
> + * supports because vlan_filtering is 0. In that case, we should
> + * definitely keep the tag, to make sure it keeps working.
> + */
> + netdev_for_each_upper_dev_rcu(dev, upper_dev, iter) {
> + if (!is_vlan_dev(upper_dev))
> + continue;
> +
> + if (vid == vlan_dev_vlan_id(upper_dev))
> + return skb;
> + }
Argh...
So I wanted to ask you how's performance with a few 8021q uppers, then I
remembered that vlan_do_receive() probably does something more efficient
here than a complete lookup, like hashing or something, then I found the
vlan_find_dev() helper function.... Sorry for not noticing it in the
first place.
next prev parent reply other threads:[~2020-09-23 21:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-23 21:40 [PATCH net-next v3 0/2] net: dsa: b53: Configure VLANs while not filtering Florian Fainelli
2020-09-23 21:40 ` [PATCH net-next v3 1/2] net: dsa: untag the bridge pvid from rx skbs Florian Fainelli
2020-09-23 21:48 ` Vladimir Oltean [this message]
2020-09-23 21:51 ` Florian Fainelli
2020-09-23 22:01 ` Vladimir Oltean
2020-09-23 22:06 ` Florian Fainelli
2020-09-23 22:08 ` Florian Fainelli
2020-09-23 22:25 ` Vladimir Oltean
2020-09-23 22:49 ` Florian Fainelli
2020-09-23 22:54 ` Florian Fainelli
2020-09-23 22:58 ` Vladimir Oltean
2020-09-23 22:59 ` Florian Fainelli
2020-09-23 23:08 ` Vladimir Oltean
2020-09-24 4:27 ` Florian Fainelli
2020-09-23 21:40 ` [PATCH net-next v3 2/2] net: dsa: b53: Configure VLANs while not filtering Florian Fainelli
2020-09-24 1:14 ` [PATCH net-next v3 0/2] " David Miller
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=20200923214852.x2z5gb6pzaphpfvv@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nikolay@nvidia.com \
--cc=olteanv@gmail.com \
--cc=vivien.didelot@gmail.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