Or Gerlitz <[EMAIL PROTECTED]> wrote:

>First, i'd like to verify what is the parameter setting to have the
>bonding driver use netif_carrier_ok(slave_device) as the means for
>link detection. Is setting use_carrier = 1 enough or one needs to set
>miimon to non-zero as well??? (where the value of miimon translates
>to the link monitoring frequency).

        I'll just note that all of the bonding parameters and such are
documented in the Documentation/networking/bonding.txt file that comes
with the kernel source code.  You can also download the documentation
from sourceforge.net/projects/bonding.

        To answer your question, you'd have to specify an miimon=X
interval (where X is some nonzero value, e.g., 100).  The default for
the use_carrier parameter is 1, which is what you want, so there is no
need to specify it.  The purpose of the use_carrier parameter is to
permit the old method to be used for network drivers that don't support
netif_carrier (which are pretty rare these days).

>Second, I understand that an enslaved device must **not** be UP, so
>when enslaving a device the bonding driver calls dev_open(slave_device),
>and make sure the device is UP, correct?

        Yes, the bonding driver does need to have the slave down during
part of the enslavement (to set the MAC address), but if the slave isn't
up, it will be set down.  Don't worry about it.

>What i want to better understand here, is whether for the bonding driver
>to declare a slave as "being able to carry traffic" it assumes the slave
>will move from UP to RUNNING state (and later netif_carrier_ok would
>return TRUE) without an IP address being set for the slave device ???

        The RUNNING state is set (indirectly) by the device driver when
it calls netif_carrier_on(); this is totally unrelated to the IP address
information attached to an interface.  Whatever IP address is set for a
slave is not used during operation.

>Is (per the bonding driver) the **time** it should take the slave to get
>from UP to (RUNNING && carrier_ok) state limited and/or controlled?

        I'm not exactly sure what you're asking here, but when miimon is
enabled, if the slave is not netif_carrier_ok() during any of the
periodic checks, it will be disabled by the bonding driver.

        There are also updelay and downdelay parameters to handle cases
where it takes some amount of real time for a carrier state transition
to occur (and, thus, state changes should be ignored for a period of
time).  E.g., some switches will assert link up on a port before they
are actually able to send and receive traffic; in that case, bonding
could use the updelay parameter to ignore link up changes for a period
of time.

        -J

---
        -Jay Vosburgh, IBM Linux Technology Center, [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to