netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [question] bond_set_slave_inactive_flags
@ 2011-03-01  7:43 Jiri Pirko
  2011-03-02 21:41 ` Jay Vosburgh
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Pirko @ 2011-03-01  7:43 UTC (permalink / raw)
  To: fubar; +Cc: netdev

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.

Thanks for reply in advance.

Jirka

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [question] bond_set_slave_inactive_flags
  2011-03-01  7:43 [question] bond_set_slave_inactive_flags Jiri Pirko
@ 2011-03-02 21:41 ` Jay Vosburgh
  0 siblings, 0 replies; 2+ messages in thread
From: Jay Vosburgh @ 2011-03-02 21:41 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-02 21:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-01  7:43 [question] bond_set_slave_inactive_flags Jiri Pirko
2011-03-02 21:41 ` Jay Vosburgh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).