All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jay Vosburgh <fubar@us.ibm.com>
To: Jiri Pirko <jpirko@redhat.com>
Cc: netdev@vger.kernel.org
Subject: Re: [question] bond_set_slave_inactive_flags
Date: Wed, 02 Mar 2011 13:41:29 -0800	[thread overview]
Message-ID: <12609.1299102089@death> (raw)
In-Reply-To: <20110301074318.GF2855@psychotron.redhat.com>

Jiri Pirko <jpirko@redhat.com> wrote:

>Jay,
>
>Looking at function bond_set_slave_inactive_flags:
>
>static inline void bond_set_slave_inactive_flags(struct slave *slave)
>{
>        struct bonding *bond = netdev_priv(slave->dev->master);
>        if (!bond_is_lb(bond))
>                slave->state = BOND_STATE_BACKUP;
>        if (!bond->params.all_slaves_active)
>                slave->dev->priv_flags |= IFF_SLAVE_INACTIVE;
>        if (slave_do_arp_validate(bond, slave))
>                slave->dev->priv_flags |= IFF_SLAVE_NEEDARP;
>}
>
>Why BOND_STATE_BACKUP is set only for non-lb bonds?
>This was introduced by 8f903c708fcc2b579ebf16542bf6109bad593a1d but
>I do not see why.

	It broke something to have slaves in alb or tlb mode (what
"bond_is_lb" means) set to state == BACKUP; I'm trying to remember what
it was.  I know it would mess up some text messages (calling alb/tlb
slaves "backup", for example), but I think also broke the alb/tlb modes
themselves because SLAVE_IS_OK returns false if state != ACTIVE.

	For alb/tlb, there is an "active" slave, and that's the one that
handles multicast and broadcast.  The others are "inactive," but not
really; they still send and receive regular traffic, but not bcast /
mcast.  The IFF_SLAVE_INACTIVE flag is used to exclude the bcast / mcast
traffic from the "inactive" slaves.

	-J

---
	-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com

      reply	other threads:[~2011-03-02 21:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01  7:43 [question] bond_set_slave_inactive_flags Jiri Pirko
2011-03-02 21:41 ` Jay Vosburgh [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=12609.1299102089@death \
    --to=fubar@us.ibm.com \
    --cc=jpirko@redhat.com \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.