* Detecting backup slaves of bonding interface in network driver
@ 2008-12-11 12:34 Poornima Kamath
2008-12-11 16:35 ` Jay Vosburgh
0 siblings, 1 reply; 5+ messages in thread
From: Poornima Kamath @ 2008-12-11 12:34 UTC (permalink / raw)
To: netdev
Hi,
I have a network driver which creates virtual ethernet interfaces. I am
using the bonding driver in the active backup mode for failover.
I want to detect the interfaces which are backup slaves in the driver.
I found that the bonding driver sets the IFF_SLAVE_INACTIVE private
flag of net_device structure for all the backup slaves.
But I dont see any callbacks in my driver when this flag is set.
I am planning to check the netdevice flags in the driver. Is it
recommended to check the private flags of net_device ?
Or is there some better way in which I can find the backup slaves?
Thanks,
Poornima
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Detecting backup slaves of bonding interface in network driver
2008-12-11 12:34 Detecting backup slaves of bonding interface in network driver Poornima Kamath
@ 2008-12-11 16:35 ` Jay Vosburgh
[not found] ` <4942663A.3080801@gslab.com>
2008-12-15 5:08 ` Poornima Kamath
0 siblings, 2 replies; 5+ messages in thread
From: Jay Vosburgh @ 2008-12-11 16:35 UTC (permalink / raw)
To: Poornima Kamath; +Cc: netdev
Poornima Kamath <poornimak@gslab.com> wrote:
>I have a network driver which creates virtual ethernet interfaces. I am
>using the bonding driver in the active backup mode for failover.
>I want to detect the interfaces which are backup slaves in the driver.
What device is it, and why do you want to do this?
I ask not just out of curiosity, but because there are other
devices that have problems with bonding's handling of some things, and
there are already special options for those devices. If your device,
e.g., can't handle having the same MAC on multiple ports, then your
problem may be resolved with one of the fail_over_mac option settings.
>I found that the bonding driver sets the IFF_SLAVE_INACTIVE private flag
>of net_device structure for all the backup slaves.
>But I dont see any callbacks in my driver when this flag is set.
>I am planning to check the netdevice flags in the driver. Is it
>recommended to check the private flags of net_device ?
>Or is there some better way in which I can find the backup slaves?
Those flags are private to the driver (bonding, in this case),
and there is no callback generated when they change. The
IFF_SLAVE_INACTIVE is what you want (it's set in priv_flags for backup
slaves), but it's purpose is to identify backup slaves so that most
incoming packets on them can be dropped. It's possible that the flag
may change or be eliminated in the future.
Also, note that there is a notifier generated by bonding when a
failover occurs (NETDEV_BONDING_FAILOVER), this was added to the
mainline about six months ago. You may be able to use that to determine
when to check things.
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Detecting backup slaves of bonding interface in network driver
[not found] ` <4942663A.3080801@gslab.com>
@ 2008-12-12 16:37 ` Jay Vosburgh
2008-12-29 10:28 ` Poornima Kamath
0 siblings, 1 reply; 5+ messages in thread
From: Jay Vosburgh @ 2008-12-12 16:37 UTC (permalink / raw)
To: Poornima Kamath; +Cc: netdev
Poornima Kamath <poornimak@gslab.com> wrote:
>The driver creates virtual interfaces that talk to ethernet interfaces over
>infiniband, using an infiniband to ethernet gateway device.
>The gateway device sends data to all interfaces having same mac address. For
>this the driver needs to explicitly tell the gateway device not to send data to
>the backup slaves.
>Therefore the driver needs to know which slaves are backup slaves.
>The failover mac option works well, but it is present for kernels greater
>than 2.6.24. So this option is not available for distros like RHEL5, SLES10
>etc
I believe that RHEL5 and SLES10 contain an "ib-bonding" package
which includes a backport of the current (or at least a more current)
bonding driver specifically for use over Infiniband. I think it's also
got a couple of other patches to bonding that aren't in the mainline.
In any event, it has the fail_over_mac functionality.
Have you looked at ib-bonding?
>So in order to support these distros I need some way of identifying the backup
>slaves.
>Is it ok to check the IFF_SLAVE_INACTIVE flags for these distros?
It will do what you want (identify backup slaves), and is not
guaranteed to be available in the future. I doubt that the flag would
ever go away on RHEL5 or SLES10, but, again, no guarantee.
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Detecting backup slaves of bonding interface in network driver
2008-12-11 16:35 ` Jay Vosburgh
[not found] ` <4942663A.3080801@gslab.com>
@ 2008-12-15 5:08 ` Poornima Kamath
1 sibling, 0 replies; 5+ messages in thread
From: Poornima Kamath @ 2008-12-15 5:08 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: netdev
Hi Jay,
Thanks for your reply.
The driver creates virtual interfaces that talk to ethernet interfaces
over infiniband, using an infiniband to ethernet gateway device.
The gateway device sends data to all interfaces having same mac
address. For this the driver needs to explicitly tell the gateway
device not to send data to the backup slaves.
Therefore the driver needs to know which slaves are backup slaves.
The failover mac option works well, but it is present for kernels
greater than 2.6.24. So this option is not available for distros like
RHEL5, SLES10 etc
So in order to support these distros I need some way of identifying the
backup slaves.
Is it ok to check the IFF_SLAVE_INACTIVE flags for these distros?
Thanks,
Poornima
Jay Vosburgh wrote:
> Poornima Kamath <poornimak@gslab.com> wrote:
>
>
>> I have a network driver which creates virtual ethernet interfaces. I am
>> using the bonding driver in the active backup mode for failover.
>> I want to detect the interfaces which are backup slaves in the driver.
>>
>
> What device is it, and why do you want to do this?
>
> I ask not just out of curiosity, but because there are other
> devices that have problems with bonding's handling of some things, and
> there are already special options for those devices. If your device,
> e.g., can't handle having the same MAC on multiple ports, then your
> problem may be resolved with one of the fail_over_mac option settings.
>
>
>> I found that the bonding driver sets the IFF_SLAVE_INACTIVE private flag
>> of net_device structure for all the backup slaves.
>> But I dont see any callbacks in my driver when this flag is set.
>> I am planning to check the netdevice flags in the driver. Is it
>> recommended to check the private flags of net_device ?
>> Or is there some better way in which I can find the backup slaves?
>>
>
> Those flags are private to the driver (bonding, in this case),
> and there is no callback generated when they change. The
> IFF_SLAVE_INACTIVE is what you want (it's set in priv_flags for backup
> slaves), but it's purpose is to identify backup slaves so that most
> incoming packets on them can be dropped. It's possible that the flag
> may change or be eliminated in the future.
>
> Also, note that there is a notifier generated by bonding when a
> failover occurs (NETDEV_BONDING_FAILOVER), this was added to the
> mainline about six months ago. You may be able to use that to determine
> when to check things.
>
> -J
>
> ---
> -Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
> --
> 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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Detecting backup slaves of bonding interface in network driver
2008-12-12 16:37 ` Jay Vosburgh
@ 2008-12-29 10:28 ` Poornima Kamath
0 siblings, 0 replies; 5+ messages in thread
From: Poornima Kamath @ 2008-12-29 10:28 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: netdev
Hi Jay,
Thanks a lot for your response.
ib-bonding does have fail_over_mac functionality and works on both
RHEL5 and SLES10.
Thanks,
Poornima
Jay Vosburgh wrote:
> Poornima Kamath <poornimak@gslab.com> wrote:
>
>
>> The driver creates virtual interfaces that talk to ethernet interfaces over
>> infiniband, using an infiniband to ethernet gateway device.
>> The gateway device sends data to all interfaces having same mac address. For
>> this the driver needs to explicitly tell the gateway device not to send data to
>> the backup slaves.
>> Therefore the driver needs to know which slaves are backup slaves.
>> The failover mac option works well, but it is present for kernels greater
>> than 2.6.24. So this option is not available for distros like RHEL5, SLES10
>> etc
>>
>
> I believe that RHEL5 and SLES10 contain an "ib-bonding" package
> which includes a backport of the current (or at least a more current)
> bonding driver specifically for use over Infiniband. I think it's also
> got a couple of other patches to bonding that aren't in the mainline.
> In any event, it has the fail_over_mac functionality.
>
> Have you looked at ib-bonding?
>
>
>> So in order to support these distros I need some way of identifying the backup
>> slaves.
>> Is it ok to check the IFF_SLAVE_INACTIVE flags for these distros?
>>
>
> It will do what you want (identify backup slaves), and is not
> guaranteed to be available in the future. I doubt that the flag would
> ever go away on RHEL5 or SLES10, but, again, no guarantee.
>
> -J
>
> ---
> -Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
> --
> 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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-12-29 10:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-11 12:34 Detecting backup slaves of bonding interface in network driver Poornima Kamath
2008-12-11 16:35 ` Jay Vosburgh
[not found] ` <4942663A.3080801@gslab.com>
2008-12-12 16:37 ` Jay Vosburgh
2008-12-29 10:28 ` Poornima Kamath
2008-12-15 5:08 ` Poornima Kamath
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).