[pve-devel] OpenVSwitch GUI

Alexandre DERUMIER aderumier at odiso.com
Mon Dec 30 08:28:08 CET 2013


>>BTW, are those miimon options required
This is what I found in many configurations samples on internet.

in source code, default values are
miimon_interval = 200 and bond-detect-mode is carrier.

Seem that linux classic bonding also use carrier by default
"
use_carrier 
Specifies whether or not miimon should use MII or ETHTOOL ioctls vs. netif_carrier_ok() to determine the link status. The MII or ETHTOOL ioctls are less efficient and utilize a deprecated calling sequence within the kernel. The netif_carrier_ok() relies on the device driver to maintain its state with netif_carrier_on/off; at this writing, most, but not all, device drivers support this facility.
If bonding insists that the link is up when it should not be, it may be that your network device driver does not support netif_carrier_on/off. The default state for netif_carrier is "carrier on," so if a driver does not support netif_carrier, it will appear as if the link is always up. In this case, setting use_carrier to 0 will cause bonding to revert to the MII / ETHTOOL ioctl method to determine the link state.
A value of 1 enables the use of netif_carrier_ok(), a value of 0 will use the deprecated MII / ETHTOOL ioctls. The default value is 1.
"
So I think we can keep default values.



http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob;f=vswitchd/bridge.c;h=6311ff3a42fcac1e3dab1ae1ef24cbbf5c5d6864;hb=HEAD


port_configure_bond(struct port *port, struct bond_settings *s)
3310 {
...
3339     miimon_interval = smap_get_int(&port->cfg->other_config,
3340                                    "bond-miimon-interval", 0);
3341     if (miimon_interval <= 0) {
3342         miimon_interval = 200;
3343     }
3344 
3345     detect_s = smap_get(&port->cfg->other_config, "bond-detect-mode");
3346     if (!detect_s || !strcmp(detect_s, "carrier")) {
3347         miimon_interval = 0;
3348     } else if (strcmp(detect_s, "miimon")) {
3349         VLOG_WARN("port %s: unsupported bond-detect-mode %s, "
3350                   "defaulting to carrier", port->name, detect_s);
3351         miimon_interval = 0;
3352     }

----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Lundi 30 Décembre 2013 06:24:56 
Objet: RE: OpenVSwitch GUI 

> allow-vmbr0 bond0 
> iface bond0 inet manual 
> ovs_bridge vmbr0 
> ovs_type OVSBond 
> ovs_bonds eth0 eth1 
> ovs_options bond_mode=active-backup other_config:bond-detect- 
> mode=miimon other_config:bond-miimon-interval=100 

BTW, are those miimon options required? 


More information about the pve-devel mailing list