From: Vlad Yasevich <vyasevic@redhat.com>
To: Nikolay Aleksandrov <razor@blackwall.org>, netdev@vger.kernel.org
Cc: toshiaki.makita1@gmail.com, stephen@networkplumber.org,
bridge@lists.linux-foundation.org, wkok@cumulusnetworks.com,
davem@davemloft.net,
Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Subject: Re: [PATCH net-next] bridge: vlan: allow to suppress local mac install for all vlans
Date: Wed, 26 Aug 2015 08:42:22 -0400 [thread overview]
Message-ID: <55DDB42E.5010802@redhat.com> (raw)
In-Reply-To: <1440464127-27391-1-git-send-email-razor@blackwall.org>
On 08/24/2015 08:55 PM, Nikolay Aleksandrov wrote:
> From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
>
> This patch adds a new knob that, when enabled, allows to suppress the
> installation of local fdb entries in newly created vlans. This could
> pose a big scalability issue if we have a large number of ports and a
> large number of vlans, e.g. in a 48 port device with 2000 vlans these
> entries easily go up to 96000.
> Note that packets for these macs are still received properly because they
> are added in vlan 0 as "own" macs and referenced when fdb lookup by vlan
> results in a miss.
> Also note that vlan membership of ingress port and the bridge device
> as egress are still being correctly enforced.
>
> The default (0/off) is keeping the current behaviour.
>
> Based on a patch by Wilson Kok (wkok@cumulusnetworks.com).
>
> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> ---
> As usual I'll post iproute2 patch if this one gets accepted.
>
... snip...
> diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c
> index 3cef6892c0bb..f9efa1b07994 100644
> --- a/net/bridge/br_vlan.c
> +++ b/net/bridge/br_vlan.c
> @@ -98,11 +98,12 @@ static int __vlan_add(struct net_port_vlans *v, u16 vid, u16 flags)
> return err;
> }
>
> - err = br_fdb_insert(br, p, dev->dev_addr, vid);
> - if (err) {
> - br_err(br, "failed insert local address into bridge "
> - "forwarding table\n");
> - goto out_filt;
> + if (!br_vlan_ignore_local_fdb(br) || !v->port_idx) {
> + err = br_fdb_insert(br, p, dev->dev_addr, vid);
> + if (err) {
> + br_err(br, "failed insert local address into bridge forwarding table\n");
> + goto out_filt;
> + }
> }
>
One question. Does it make sense to push this down into br_fdb_insert?
This patch prevents automatic entries from being added. But what about
manual entries for a local fdb? The code in br_fdb_add() will still a
vid 0 entry as well as entries for all vlans currently configured on the port.
-vlad
> set_bit(vid, v->vlan_bitmap);
> @@ -492,6 +493,13 @@ int br_vlan_filter_toggle(struct net_bridge *br, unsigned long val)
> return 0;
> }
>
> +int br_vlan_ignore_local_fdb_toggle(struct net_bridge *br, unsigned long val)
> +{
> + br->vlan_ignore_local_fdb = val ? true : false;
> +
> + return 0;
> +}
> +
> int br_vlan_set_proto(struct net_bridge *br, unsigned long val)
> {
> int err = 0;
>
next prev parent reply other threads:[~2015-08-26 12:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-25 0:55 [PATCH net-next] bridge: vlan: allow to suppress local mac install for all vlans Nikolay Aleksandrov
2015-08-25 23:41 ` David Miller
2015-08-25 23:47 ` Nikolay Aleksandrov
2015-08-26 0:04 ` David Miller
2015-08-26 12:42 ` Vlad Yasevich [this message]
2015-08-26 12:56 ` Nikolay Aleksandrov
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=55DDB42E.5010802@redhat.com \
--to=vyasevic@redhat.com \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=razor@blackwall.org \
--cc=stephen@networkplumber.org \
--cc=toshiaki.makita1@gmail.com \
--cc=wkok@cumulusnetworks.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