From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: kvm@vger.kernel.org, netdev@vger.kernel.org,
bridge@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
xen-devel@lists.xenproject.org
Subject: Re: [Bridge] [PATCH 3/3] bridge: fix bridge root block on designated port
Date: Sat, 15 Mar 2014 02:08:28 -0000 [thread overview]
Message-ID: <20140315020826.GB28801@wotan.suse.de> (raw)
In-Reply-To: <20140313151623.03e0484d@nehalam.linuxnetplumber.net>
[-- Attachment #1: Type: text/plain, Size: 1596 bytes --]
On Thu, Mar 13, 2014 at 03:16:23PM -0700, Stephen Hemminger wrote:
> On Wed, 12 Mar 2014 20:15:27 -0700
> "Luis R. Rodriguez" <mcgrof@do-not-panic.com> wrote:
>
> > --- a/net/bridge/br_private.h
> > +++ b/net/bridge/br_private.h
> > @@ -150,6 +150,7 @@ struct net_bridge_port
> > u8 priority;
> > u8 state;
> > u16 port_no;
> > + bool root_block_enabled;
> > unsigned char topology_change_ack;
>
> It seems a bit confusing to have both a ROOT_BLOCK flag in the
> data structure and and additional root_block_enabled flag.
> If nothing else it is a waste of space.
Indeed, however there is a use for it. Consider the case where we loop
over each port and check to see if its root blocked and need to tickle it
or the bridge. In the case that root port block was enabled before and
someone is lifting it the flag would be removed and therefore not on
but it was root blocked though and we need a way to keep track of that.
The flag then is a toggle for userspace, while the bool tells us about
the current state.
> Looks like you are changing the meaning slightly.
Let me know in what way. I can't see it.
> is possible to have BR_ROOT_BLOCK set but !root_block_enabled?
Yeah in the case a new request to set it to root block then
BR_ROOT_BLOCK would be set but root_block_enabled would not be set.
> and what about the inverse?
BR_ROOT_BLOCK would not be set when userspace wants to disable root
port block and root_block_enabled would be enabled in this case if
it used to be enabled. So yes, both are possible.
Luis
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
prev parent reply other threads:[~2014-03-15 2:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1394680527-28970-1-git-send-email-mcgrof@do-not-panic.com>
2014-03-13 3:15 ` [Bridge] [PATCH 1/3] bridge: preserve random init MAC address Luis R. Rodriguez
2014-03-19 0:42 ` Toshiaki Makita
2014-03-19 0:50 ` Luis R. Rodriguez
2014-03-19 1:04 ` Toshiaki Makita
2014-03-19 1:10 ` Luis R. Rodriguez
2014-03-19 16:09 ` Toshiaki Makita
2014-03-19 3:10 ` Stephen Hemminger
2014-03-19 3:37 ` Luis R. Rodriguez
2014-03-20 2:05 ` Luis R. Rodriguez
2014-04-22 19:41 ` Luis R. Rodriguez
2014-04-30 18:40 ` Luis R. Rodriguez
2014-04-30 19:11 ` Vlad Yasevich
2014-03-13 3:15 ` [Bridge] [PATCH 2/3] bridge: trigger a bridge calculation upon port changes Luis R. Rodriguez
2014-03-13 18:26 ` Cong Wang
2014-03-15 1:39 ` Luis R. Rodriguez
2014-03-18 20:46 ` Cong Wang
2014-03-18 21:22 ` Luis R. Rodriguez
2014-04-22 19:43 ` Luis R. Rodriguez
2014-04-30 18:38 ` Luis R. Rodriguez
2014-04-30 20:04 ` Vlad Yasevich
2014-04-30 22:59 ` Luis R. Rodriguez
2014-05-01 0:12 ` Vlad Yasevich
2014-03-13 3:15 ` [Bridge] [PATCH 3/3] bridge: fix bridge root block on designated port Luis R. Rodriguez
2014-03-13 22:16 ` Stephen Hemminger
2014-03-15 2:08 ` Luis R. Rodriguez [this message]
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=20140315020826.GB28801@wotan.suse.de \
--to=mcgrof@suse.com \
--cc=bridge@lists.linux-foundation.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=xen-devel@lists.xenproject.org \
/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