Hi,
Is there any way to know who is the active slave in active-passive mode?
Is there any indication for that in netdevice flags? Or some other way?
(I would like to get in my network interface driver which can be a slave of the bonding interface)
I saw that there is the flag IFF_SLAVE_INACTIVE but it is not used as far as I can see.
Thanks, Erez
From: Eric Dumazet <hidden> Date: 2012-12-20 21:19:33
On Thu, 2012-12-20 at 20:38 +0000, Erez Shitrit wrote:
Hi,
Is there any way to know who is the active slave in active-passive mode?
Is there any indication for that in netdevice flags? Or some other way?
(I would like to get in my network interface driver which can be a slave of the bonding interface)
I saw that there is the flag IFF_SLAVE_INACTIVE but it is not used as far as I can see.
From: Or Gerlitz <hidden> Date: 2012-12-20 22:27:35
On Thu, Dec 20, 2012 at 11:19 PM, Eric Dumazet [off-list ref] wrote:
cat /sys/class/net/bond0/bonding/active_slave
sure, I think Erez would like to know that from within a network
device kernel code, e.g maybe register to netdev kernel events and on
the event of bonding fail-over identify the active slave for
active-backup mode, etc.
Or.
From: Eric Dumazet <hidden> Date: 2012-12-20 22:52:17
On Fri, 2012-12-21 at 00:21 +0200, Or Gerlitz wrote:
On Thu, Dec 20, 2012 at 11:19 PM, Eric Dumazet [off-list ref] wrote:
quoted
cat /sys/class/net/bond0/bonding/active_slave
sure, I think Erez would like to know that from within a network
device kernel code, e.g maybe register to netdev kernel events and on
the event of bonding fail-over identify the active slave for
active-backup mode, etc.
OK, but then why a network driver should be aware of this bonding
detail ?
It seems part of this commit could be reverted,
ie setting IFF_SLAVE_INACTIVE again.
commit 2d7011ca79f1a8792e04d131b8ea21db179ab917
Author: Jiri Pirko [off-list ref]
Date: Wed Mar 16 08:46:43 2011 +0000
bonding: get rid of IFF_SLAVE_INACTIVE netdev->priv_flag
Since bond-related code was moved from net/core/dev.c into bonding,
IFF_SLAVE_INACTIVE is no longer needed. Replace is with flag "inactive"
stored in slave structure
Signed-off-by: Jiri Pirko [off-list ref]
Reviewed-by: Nicolas de Pesloüan [off-list ref]
Signed-off-by: David S. Miller [off-list ref]
Thu, Dec 20, 2012 at 11:21:00PM CET, or.gerlitz@gmail.com wrote:
On Thu, Dec 20, 2012 at 11:19 PM, Eric Dumazet [off-list ref] wrote:
quoted
cat /sys/class/net/bond0/bonding/active_slave
sure, I think Erez would like to know that from within a network
device kernel code, e.g maybe register to netdev kernel events and on
the event of bonding fail-over identify the active slave for
active-backup mode, etc.
I wonder why device should care of such thing? Would it behave
differently?
Or.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html