Thread (5 messages) flat view 5 messages, 4 authors, 2012-12-21

Re: bonding driver - how to recognize the active slave

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]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help