[dts] [PATCH V1][examples/bond]: test plan for bonding ALB mode

yufengmx yufengx.mo at intel.com
Thu Jan 31 07:31:15 CET 2019


ALB mode includes adaptive TLB and receive load balancing (RLB)0. In RLB the
bonding driver intercepts ARP replies send by local system and overwrites its
source MAC address, so that different peers send data to the server on
different slave interfaces. When local system sends ARP request, it saves IP
information from it. When ARP reply from that peer is received, its MAC is
stored, one of slave MACs assigned and ARP reply send to that peer.

Signed-off-by: yufengmx <yufengx.mo at intel.com@intel.com>
---
 test_plans/bond_alb_test_plan.rst | 316 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 316 insertions(+)
 create mode 100644 test_plans/bond_alb_test_plan.rst

diff --git a/test_plans/bond_alb_test_plan.rst b/test_plans/bond_alb_test_plan.rst
new file mode 100644
index 0000000..f2fa019
--- /dev/null
+++ b/test_plans/bond_alb_test_plan.rst
@@ -0,0 +1,316 @@
+.. Copyright (c) <2019>, Intel Corporation
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+========
+bond alb
+========
+
+This document provides test plan for bonding ALB(Adaptive Load Balancing) mode.
+
+ALB mode includes adaptive TLB and receive load balancing (RLB). In RLB the
+bonding driver intercepts ARP replies send by local system and overwrites its
+source MAC address, so that different peers send data to the server on
+different slave interfaces. When local system sends ARP request, it saves IP
+information from it. When ARP reply from that peer is received, its MAC is
+stored, one of slave MACs assigned and ARP reply send to that peer.
+
+DPDK source code has no technical document about bonding ALB mode. Here uses 
+linux technical document of balance-alb as testing reference document:
+https://www.kernel.org/doc/Documentation/networking/bonding.txt
+
+Prerequisites
+=============
+
+examples/bond should run with 2 pair link peer at least. No limitation about
+nic type.
+
+HW configuration
+----------------
+
+port topology diagram::
+
+        Tester                              DUT
+    .-----------.                      .-----------.
+    | .-------. |                      | .-------. |
+    | | portA | | <------------------> | | port0 | |
+    | | portB | | <------------------> | | port1 | |
+    | '-------' |                      | '-------' |
+    |   nic 1   |                      |   nic 2   |
+    '-----------'                      '-----------'
+
+SW configuration
+----------------
+
+#. compile examples/bond::
+
+    export RTE_SDK=`pwd`
+    export RTE_TARGET=<target>
+    make -j install T=<target>
+    make -C examples/bond
+
+#. bind two ports to igb_uio driver::
+
+    ./usertools/dpdk-devbind.py --bind=igb_uio <port0 pci address> \
+                                               <port1 pci address>
+
+#. dpdk bonding alb example source code set bond port default ip address to be
+   7.0.0.10, set tester port on link up status and ip address::
+
+    ifconfig <portA> up
+    ifconfig <portA> 7.0.0.11
+    ifconfig <portB> up
+    ifconfig <portB> 7.0.0.12
+
+Test Case: command option
+=========================
+check if command options are changed.
+
+steps
+-----
+
+#. run bonding alb binary file::
+
+    ./examples/bond/build/bond_app -c 0x0f -n 4
+
+#. run ``help`` to show command options::
+
+    bond6>help
+
+#. check command options if some options have been changed.
+
+Test Case: bond port setting
+============================
+check if bond port setting is as expected.
+
+steps
+-----
+
+#. run bonding alb binary file::
+
+    ./examples/bond/build/bond_app -c 0x0f -n 4
+
+#. run ``show`` to show bond port information::
+
+    bond6>show
+    <port 0 mac address>
+    <port 1 mac address>
+    Active_slaves:<slave number> packets received:Tot:0 Arp:0 IPv4:0
+
+#. check if slaves' ``mac address`` and ``Active_slaves`` number are as expected.
+
+Test Case: stop/start action
+============================
+looping stop/start execution several times to check if bond port link status is 
+good.
+
+steps
+-----
+
+#. run bonding alb binary file::
+
+    ./examples/bond/build/bond_app -c 0x0f -n 4
+
+#. run ``stop`` to check that output message is the expected string::
+
+    bond6>stop
+    BYE lcore_main
+    lcore_main stopped on core:1
+
+#. run ``start`` to check that output message is the expected string::
+
+    bond6>start
+    Starting lcore_main on core 1:0 Our IP:7.0.0.10
+
+#. looping execute ``stop``/``start`` commands 5 times to make sure that no
+   exception occurrs.
+
+Test Case: arp request with valid ip
+====================================
+bond port send arp request with valid client ip, check arp packet sending
+sequence.
+
+To peer port, first received arp packet should be a broadcast packet, which 
+contains bond port mac address/broadcast mac address/bond port ip/peer port ip.
+To peer port, second received arp packet should be a reply packet, which
+contains bond port mac address/peer port mac address/bond port ip/peer port ip.
+
+steps
+-----
+
+#. run bonding alb binary file::
+
+    ./examples/bond/build/bond_app -c 0x0f -n 4
+
+#. run tcpdump to capture arp packet::
+
+    tcpdump -i <portA> -P in -qe
+      or
+    tcpdump -i <portA> -Q in -qe
+
+#. run ``send`` command to send a valid client ip::
+
+    bond6>send 7.0.0.11
+
+#. check if portA has received one broadcast arp packet and one reply arp
+   packet.
+
+#. check if arp packet sent by peer port has been received by bond port::
+
+    bond6>show
+    Active_slaves:2 packets received:Tot:1 Arp:1 IPv4:0
+
+Test Case: arp request with invalid ip
+======================================
+bond port send arp request with invalid client ip, check arp packet sending 
+sequence.
+
+To peer port, first received arp packet should be a broadcast packet, which
+contains bond port mac address/broadcast mac address/bond port ip/peer port ip.
+No reply arp packet is sent by bond port.
+
+steps
+-----
+
+#. run bonding alb binary file::
+
+    ./examples/bond/build/bond_app -c 0x0f -n 4
+
+#. send an invalid client ip::
+
+    bond6>send 7.0.0.15
+
+#. check if portA only receive one broadcast arp packet.
+
+#. check if no arp packet is sent back to bond port::
+
+    bond6>show
+    Active_slaves:2 packets received:Tot:0 Arp:0 IPv4:0
+
+Test Case: arp request with valid ip under stop status
+======================================================
+bond port send arp request with valid client ip when bond port stop, check arp
+packet sending sequence.
+
+To peer port, first received arp packet should be a broadcast packet, which
+contains bond port mac address/broadcast mac address/bond port ip/peer port ip.
+Only one arp packet is received by peer port.
+
+steps
+-----
+
+#. run bonding alb binary file::
+
+    ./examples/bond/build/bond_app -c 0x0f -n 4
+    
+#. run ``stop`` command::
+
+    bond6>stop
+
+#. run tcpdump to capture arp packet::
+
+    tcpdump -i <portA> -Q in -qe
+      or
+    tcpdump -i <portA> -P in -qe
+
+#. run ``send`` command to send arp packet to a valid ip::
+
+    bond6>send 7.0.0.11
+
+#. check if portA only receive one broadcast arp packet and no reply arp
+   packet received.
+
+#. run ``show`` to check if no arp packet is sent back::
+
+    bond6>show
+    <port 0 mac address>
+    <port 1 mac address>
+    Active_slaves:2 packets received:Tot:0 Arp:0 IPv4:0
+
+Test Case: receive packets
+==========================
+send 100 ipv4/ipv6 packet to bond port, check if bond port has received the same
+number of packets.
+
+steps
+-----
+
+#. run bonding alb binary file::
+
+    ./examples/bond/build/bond_app -c 0x0f -n 4
+
+#. send 100 ipv4 packet from portA::
+
+    scapy> sendp([Ether()/IP()/Raw('\0'*60)], iface=<portA>, count=100)
+
+#. check if bond port has received 100 IPv4 packets::
+
+    bond6>show
+    <port 0 mac address>
+    <port 1 mac address>
+    Active_slaves:2 packets received:Tot:100 Arp:0 IPv4:100
+
+#. send 100 ipv6 packet from portA::
+
+    scapy> sendp([Ether()/IPv6()/Raw('\0'*60)], iface=<portA>, count=100)
+
+#. check if bond port has received 100 IPv6 packets::
+
+    bond6>show
+    <port 0 mac address>
+    <port 1 mac address>
+    Active_slaves:2 packets received:Tot:200 Arp:0 IPv4:100
+
+Test Case: receive packets under stop status
+============================================
+When bond port stop, no packet should be received.
+
+steps
+-----
+
+#. run bonding alb binary file::
+
+    ./examples/bond/build/bond_app -c 0x0f -n 4
+    
+#. run ``stop`` command::
+
+    bond6>stop
+
+#. send 100 ipv4 packet from portA::
+
+    scapy> sendp([Ether()/IP()/Raw('\0'*60)], iface=<portA>, count=100)
+
+#. check if bond port hasn't received any packets::
+
+    bond6>show
+    <port 0 mac address>
+    <port 1 mac address>
+    Active_slaves:2 packets received:Tot:0 Arp:0 IPv4:0
\ No newline at end of file
-- 
1.9.3



More information about the dts mailing list