Ethernet Bridge development
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Vlad Yasevich <vyasevic@redhat.com>
Cc: john.r.fastabend@intel.com, netdev@vger.kernel.org,
	shemminger@vyatta.com, bridge@lists.linux-foundation.org,
	jhs@mojatatu.com
Subject: Re: [Bridge] [PATCH RFC 0/7] Non-promisc bidge ports support
Date: Wed, 26 Feb 2014 18:34:52 +0200	[thread overview]
Message-ID: <20140226163452.GM15330@redhat.com> (raw)
In-Reply-To: <1393427905-6811-1-git-send-email-vyasevic@redhat.com>

On Wed, Feb 26, 2014 at 10:18:18AM -0500, Vlad Yasevich wrote:
> This patch series is a complete re-design and re-implementation of
> prior attempts to support non-promiscuous bridge ports.

Nice.
For those that wonder: the setups that benefit from this
could look e.g. like this:

A---+
    |
    |
   BRIDGE--C
    |
    |
B---+

If A, B, C all use standard NICs without setting them
into promiscous mode, unicast packets sent to e.g. A that don't match
the address of its NIC will be dropped anyway.  Same applies to B and C.

With this patchset we'll be able to bypass the
need for promisc mode on NICs in the BRIDGE box.





> The basic design is as follows.  The bridge keeps track of
> all the ports that flood packets to unknown destinations.  If
> the flooding is disabled on the port, to get traffic to flow
> through, user/management would need to add an fdb describing
> such traffic.  When such fdb is added, we save the address
> to bridge private hardware address list. 
> Since we now have static configuration for all non-flooding
> ports and only 1 flooding port, we can make this single port
> non-promiscuous and program the receive filter with our list
> of addresses.  On HW that doesn't support unicast filtering or
> if the list too bit, the device will be placed in promiscuous mode
> by the application of the filter.
> 
> There are multiple reasons I chose to do private hw address
> list in the bridge in patch 3:
>   1)  I tried using the fdb table itself as main repository, but
>       this caused difficulties in synchronizing this table with
>       the interface filters later on.
>   2)  I tried using the bridge device 'uc' list to store these
>       addresses, but that caused issues with devices on top of
>       a bridge (vlans, bonds) that changed their mac addresses
>       and propagated this down to bridge.   I recently figured
>       out a way that might allow us to do this which involves
>       learning to be added br_dev_xmi().  We can discuss this,
>       if there serious objections to current proposal.
> 
> There are some other cases when promiscuous mode has to be turned
> back on.  One is when the bridge itself if placed in promiscuous
> mode (use sets promisc flag).  The other is when vlans devices are
> configured on top of the bridge and vlan filtering is disabled (default).
> This allows the bridge to receive all tagged frames and doesn't create
> a dependency between this code and vlan filtering.
> 
> The last patch in the series is a special case where all ports
> are non-flooding.  This could be useful in a routed configurations.
> In this case, since all ports will be configured manually, we can
> sync the our address list across all port of the bridge and make all
> ports non-promiscuous.
> 
> Thanks
> -vlad
> 
> Vlad Yasevich (7):
>   bridge: Turn flag change macro into a function.
>   bridge: Keep track of ports capable of flooding.
>   bridge: Add addresses from static fdbs to bridge address list
>   bridge: Automatically manage port promiscuous mode.
>   bridge: Correctly manage promiscuity when user requested it.
>   bridge: Manage promisc mode when vlans are configured on top of a
>     bridge
>   bridge: Support promisc management when all ports are non-flooding
> 
>  include/linux/netdevice.h |   9 +++
>  net/bridge/br_device.c    |  23 +++++++
>  net/bridge/br_fdb.c       | 122 +++++++++++++++++++++++++++++++++--
>  net/bridge/br_if.c        | 159 ++++++++++++++++++++++++++++++++++++++++++++--
>  net/bridge/br_netlink.c   |   3 +
>  net/bridge/br_private.h   |  18 ++++++
>  net/bridge/br_sysfs_if.c  |  33 +++++++---
>  net/bridge/br_vlan.c      |   1 +
>  net/core/dev.c            |   1 +
>  net/core/dev_addr_lists.c |  21 +++---
>  10 files changed, 361 insertions(+), 29 deletions(-)
> 
> -- 
> 1.8.5.3

  parent reply	other threads:[~2014-02-26 16:34 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26 15:18 [Bridge] [PATCH RFC 0/7] Non-promisc bidge ports support Vlad Yasevich
2014-02-26 15:18 ` [Bridge] [PATCH 1/7] bridge: Turn flag change macro into a function Vlad Yasevich
2014-02-26 15:29   ` Michael S. Tsirkin
2014-02-26 15:36     ` Vlad Yasevich
2014-02-26 15:18 ` [Bridge] [PATCH 2/7] bridge: Keep track of ports capable of flooding Vlad Yasevich
2014-02-26 15:41   ` Michael S. Tsirkin
2014-02-26 15:41     ` Vlad Yasevich
2014-02-26 15:53       ` Michael S. Tsirkin
2014-02-27 11:59   ` Toshiaki Makita
2014-02-27 12:54     ` Vlad Yasevich
2014-02-26 15:18 ` [Bridge] [PATCH 3/7] bridge: Add addresses from static fdbs to bridge address list Vlad Yasevich
2014-02-26 15:46   ` Michael S. Tsirkin
2014-02-26 15:43     ` Vlad Yasevich
2014-02-26 16:23   ` Michael S. Tsirkin
2014-02-26 17:25     ` Vlad Yasevich
2014-02-26 17:33       ` Michael S. Tsirkin
2014-02-26 16:57   ` Stephen Hemminger
2014-02-26 17:35     ` Vlad Yasevich
2014-02-27  7:53       ` Michael S. Tsirkin
2014-02-27 13:08         ` Vlad Yasevich
2014-02-27 13:38           ` Michael S. Tsirkin
2014-02-26 15:18 ` [Bridge] [PATCH 4/7] bridge: Automatically manage port promiscuous mode Vlad Yasevich
2014-02-26 15:51   ` Michael S. Tsirkin
2014-02-26 16:02     ` Vlad Yasevich
2014-02-26 16:58   ` Stephen Hemminger
2014-02-26 17:32     ` Michael S. Tsirkin
2014-02-26 15:18 ` [Bridge] [PATCH 5/7] bridge: Correctly manage promiscuity when user requested it Vlad Yasevich
2014-02-26 15:18 ` [Bridge] [PATCH 6/7] bridge: Manage promisc mode when vlans are configured on top of a bridge Vlad Yasevich
2014-02-26 16:00   ` Michael S. Tsirkin
2014-02-26 16:05     ` Vlad Yasevich
2014-02-26 16:25       ` Michael S. Tsirkin
2014-02-27 12:06   ` Toshiaki Makita
2014-02-27 13:17     ` Vlad Yasevich
2014-02-28 19:34       ` Vlad Yasevich
2014-03-01 14:57         ` Toshiaki Makita
2014-03-03 12:12           ` Vlad Yasevich
2014-02-26 15:18 ` [Bridge] [PATCH 7/7] bridge: Support promisc management when all ports are non-flooding Vlad Yasevich
2014-02-26 15:57   ` Michael S. Tsirkin
2014-02-27  3:46     ` Vlad Yasevich
2014-02-27  7:29       ` Michael S. Tsirkin
2014-02-26 16:01   ` Michael S. Tsirkin
2014-02-26 16:34 ` Michael S. Tsirkin [this message]
2014-02-26 23:59 ` [Bridge] [PATCH RFC 0/7] Non-promisc bidge ports support Jamal Hadi Salim
2014-02-27  3:37   ` Vlad Yasevich
2014-02-27  8:54     ` Amidu Sila
2014-02-27  7:20   ` Michael S. Tsirkin

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=20140226163452.GM15330@redhat.com \
    --to=mst@redhat.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=jhs@mojatatu.com \
    --cc=john.r.fastabend@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    --cc=vyasevic@redhat.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