commit 6df8464b15d9bcec126d70982d96a0f49f5b9758 Author: Jiri Pirko jiri@resnulli.us Date: Thu Oct 4 17:44:49 2012 +0200
recipes: team: add recipe for testing queue_mapping
Signed-off-by: Jiri Pirko jiri@resnulli.us
recipes/team/netconfig-br_queue_mapping.xml | 18 ++++++++ recipes/team/netconfig-team_rr_queue_mapping.xml | 50 ++++++++++++++++++++++ recipes/team/recipey_rr_queue_mapping.xml | 21 +++++++++ recipes/team/sequence_queue_mapping.xml | 43 +++++++++++++++++++ 4 files changed, 132 insertions(+), 0 deletions(-) --- diff --git a/recipes/team/netconfig-br_queue_mapping.xml b/recipes/team/netconfig-br_queue_mapping.xml new file mode 100644 index 0000000..0331142 --- /dev/null +++ b/recipes/team/netconfig-br_queue_mapping.xml @@ -0,0 +1,18 @@ +<netconfig> + <interface id="1" phys_id="1" type="eth"/> + <interface id="2" phys_id="2" type="eth"/> + <interface id="3" phys_id="3" type="eth"/> + <interface id="testiface" type="bridge"> + <slaves> + <slave id="1"/> + <slave id="2"/> + <slave id="3"/> + </slaves> + <addresses> + <address value="172.0.1.2/24"/> + <address value="172.0.2.2/24"/> + <address value="172.0.3.2/24"/> + <address value="172.0.4.2/24"/> + </addresses> + </interface> +</netconfig> diff --git a/recipes/team/netconfig-team_rr_queue_mapping.xml b/recipes/team/netconfig-team_rr_queue_mapping.xml new file mode 100644 index 0000000..b07f521 --- /dev/null +++ b/recipes/team/netconfig-team_rr_queue_mapping.xml @@ -0,0 +1,50 @@ +<netconfig> + <interface id="1" phys_id="1" type="eth"> + <options> + <option name="teamd_port_config"> + { + "queue_id": 1 + } + </option> + </options> + </interface> + <interface id="2" phys_id="2" type="eth"> + <options> + <option name="teamd_port_config"> + { + "queue_id": 2 + } + </option> + </options> + </interface> + <interface id="3" phys_id="3" type="eth"> + <options> + <option name="teamd_port_config"> + { + "queue_id": 3 + } + </option> + </options> + </interface> + <interface id="testiface" type="team"> + <options> + <option name="teamd_config"> + { + "hwaddr": "00:11:22:33:44:55", + "runner": {"name": "roundrobin"} + } + </option> + </options> + <slaves> + <slave id="1"/> + <slave id="2"/> + <slave id="3"/> + </slaves> + <addresses> + <address value="172.0.1.1/24"/> + <address value="172.0.2.1/24"/> + <address value="172.0.3.1/24"/> + <address value="172.0.4.1/24"/> + </addresses> + </interface> +</netconfig> diff --git a/recipes/team/recipey_rr_queue_mapping.xml b/recipes/team/recipey_rr_queue_mapping.xml new file mode 100644 index 0000000..4250837 --- /dev/null +++ b/recipes/team/recipey_rr_queue_mapping.xml @@ -0,0 +1,21 @@ +<nettestrecipe> + <machines> + <define> + <alias name="testip" value="192.168.111.1/24"/> + <alias name="testip6" value="fe01::1/64"/> + </define> + <machine id="1"> + <machineconfig source="machineconfig-peanut.xml"/> + <netconfig source="netconfig-team_rr_queue_mapping.xml"/> + </machine> + <define> + <alias name="testip" value="192.168.111.2/24"/> + <alias name="testip6" value="fe01::2/64"/> + </define> + <machine id="2"> + <machineconfig source="machineconfig-dhcp-37-128.xml"/> + <netconfig source="netconfig-br_queue_mapping.xml"/> + </machine> + </machines> + <command_sequence source="sequence_queue_mapping.xml"/> +</nettestrecipe> diff --git a/recipes/team/sequence_queue_mapping.xml b/recipes/team/sequence_queue_mapping.xml new file mode 100644 index 0000000..d3999f7 --- /dev/null +++ b/recipes/team/sequence_queue_mapping.xml @@ -0,0 +1,43 @@ +<command_sequence> + <command type="exec" value="sleep 4"/> + <command machine_id="1" type="exec" value="tc qdisc add dev {devname(1,testiface)} handle 1 root multiq"/> + <command machine_id="1" type="exec" value="tc filter add dev {devname(1,testiface)} protocol ip parent 1: prio 1 u32 match ip dst {ip(2,testiface,0)} action skbedit queue_mapping 1"/> + <command machine_id="1" type="exec" value="tc filter add dev {devname(1,testiface)} protocol ip parent 1: prio 1 u32 match ip dst {ip(2,testiface,1)} action skbedit queue_mapping 2"/> + <command machine_id="1" type="exec" value="tc filter add dev {devname(1,testiface)} protocol ip parent 1: prio 1 u32 match ip dst {ip(2,testiface,2)} action skbedit queue_mapping 3"/> + <command machine_id="1" timeout="60" type="test" value="IcmpPing" bg_id="1"> + <options> + <option name="addr" value="{ip(2,testiface,0)}"/> + <option name="count" value="100"/> + <option name="interval" value="0.01"/> + <option name="limit_rate" value="95"/> + </options> + </command> + <command machine_id="1" timeout="60" type="test" value="IcmpPing" bg_id="2"> + <options> + <option name="addr" value="{ip(2,testiface,1)}"/> + <option name="count" value="100"/> + <option name="interval" value="0.01"/> + <option name="limit_rate" value="95"/> + </options> + </command> + <command machine_id="1" timeout="60" type="test" value="IcmpPing" bg_id="3"> + <options> + <option name="addr" value="{ip(2,testiface,2)}"/> + <option name="count" value="100"/> + <option name="interval" value="0.01"/> + <option name="limit_rate" value="95"/> + </options> + </command> + <command machine_id="1" timeout="60" type="test" value="IcmpPing" bg_id="4"> + <options> + <option name="addr" value="{ip(2,testiface,3)}"/> + <option name="count" value="100"/> + <option name="interval" value="0.01"/> + <option name="limit_rate" value="95"/> + </options> + </command> + <command machine_id="1" type="wait" value="1"/> + <command machine_id="1" type="wait" value="2"/> + <command machine_id="1" type="wait" value="3"/> + <command machine_id="1" type="wait" value="4"/> +</command_sequence>
lnst-developers@lists.fedorahosted.org