The current bonding support is missing a _lot_ of the bonding driver's
options, must crucially any sort of control over monitoring the bonded
devices.
This patch here is a rough sketch of how I intend to add that support to
the interface XML schema. I'd highly appreciate feedback from the
bonding experts on this list ;)
David
diff --git a/data/xml/interface.rng b/data/xml/interface.rng
index e07a9b0..a38dea5 100644
--- a/data/xml/interface.rng
+++ b/data/xml/interface.rng
@@ -104,6 +104,64 @@
</choice>
</attribute>
</optional>
+
+ <!-- FIXME: add more attributes
+
+ mode == 802.3ad
+ ad_select
+ lacp_rate
+ xmit_hash_policy
+
+ mode == active-backup
+ fail_over_mac
+ num_grat_arp when mode == active-backup (since 3.3.0)
+ num_unsol_na when mode == active-backup (ipv6, since 3.4.0)
+
+ mode == balance-xor
+ xmit_hash_policy (since 2.6.3/3.2.2)
+ -->
+
+ <choice>
+ <element name="miimon">
+ <!-- miimon frequency in ms -->
+ <attribute name="freq"><ref
name="uint"/></attribute>
+ <optional>
+ <attribute name="downdelay"><ref
name="uint"/></attribute>
+ </optional>
+ <optional>
+ <attribute name="updelay"><ref
name="uint"/></attribute>
+ </optional>
+ <optional>
+ <!-- use_carrier -->
+ <attribute name="carrier">
+ <choice>
+ <!-- use MII/ETHTOOL ioctl -->
+ <value>ioctl</value>
+ <!-- use netif_carrier_ok() -->
+ <value>netif</value>
+ </choice>
+ </attribute>
+ </optional>
+ </element>
+ <element name="arpmon">
+ <optional>
+ <attribute name="interval"><ref
name="uint"/></attribute>
+ </optional>
+ <optional>
+ <attribute name="target"><ref
name="ipaddr-0-16"/></attribute>
+ </optional>
+ <optional>
+ <attribute name="validate">
+ <choice>
+ <value>none</value>
+ <value>active</value>
+ <value>backup</value>
+ <value>all</value>
+ </choice>
+ </attribute>
+ </optional>
+ </element>
+ </choice>
<oneOrMore>
<!-- The slave interfaces -->
<ref name="bare-ethernet-interface"/>
@@ -118,7 +176,7 @@
<element name="name"><ref
name="device-name"/></element>
<optional>
<element name="mtu">
- <attribute name="size"><ref
name="unsigned-int"/></attribute>
+ <attribute name="size"><ref
name="uint"/></attribute>
</element>
</optional>
</define>
@@ -216,7 +274,7 @@
<!-- Type library -->
- <define name='unsigned-int'>
+ <define name='uint'>
<data type='unsignedInt'>
<param name="pattern">[0-9]+</param>
</data>
Show replies by date