From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <sunx.jiajia@intel.com>
Received: from mga03.intel.com (mga03.intel.com [134.134.136.65])
 by dpdk.org (Postfix) with ESMTP id 5FDCBA6A
 for <dev@dpdk.org>; Wed,  4 Mar 2015 04:54:06 +0100 (CET)
Received: from fmsmga001.fm.intel.com ([10.253.24.23])
 by orsmga103.jf.intel.com with ESMTP; 03 Mar 2015 19:51:35 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.09,685,1418112000"; d="scan'208";a="674818480"
Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103])
 by fmsmga001.fm.intel.com with ESMTP; 03 Mar 2015 19:54:01 -0800
Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by
 PGSMSX108.gar.corp.intel.com (10.221.44.103) with Microsoft SMTP Server (TLS)
 id 14.3.195.1; Wed, 4 Mar 2015 11:54:00 +0800
Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.161]) by
 SHSMSX152.ccr.corp.intel.com ([169.254.6.46]) with mapi id 14.03.0195.001;
 Wed, 4 Mar 2015 11:53:58 +0800
From: "Jiajia, SunX" <sunx.jiajia@intel.com>
To: "Doherty, Declan" <declan.doherty@intel.com>, "Jastrzebski, MichalX K"
 <michalx.k.jastrzebski@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH v4 0/6] Link Bonding mode 6 support (ALB)
Thread-Index: AQHQTSev4FOD77IIs0+mDxNA7NAoM5z5SWkAgBJ3AgA=
Date: Wed, 4 Mar 2015 03:53:57 +0000
Message-ID: <F21F274FCF2C0948830A3ED00345297729565E@SHSMSX104.ccr.corp.intel.com>
References: <1423840570-6452-1-git-send-email-michalx.k.jastrzebski@intel.com>
 <1424448563-8680-1-git-send-email-michalx.k.jastrzebski@intel.com>
 <54E7728E.3090208@intel.com>
In-Reply-To: <54E7728E.3090208@intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.239.127.40]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH v4 0/6] Link Bonding mode 6 support (ALB)
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Mar 2015 03:54:07 -0000

Tested-by: Jiajia, SunX <sunx.jiajia@intel.com>

- Tested Commit: 8bfc4e3c4cb922d9c7e6b8934fdaffba268c7ed2
- OS: Fedora20 3.11.10-301.fc20.x86_64
- GCC: gcc version 4.8.3
- CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
- NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [80=
86:10fb]
- Target x86_64-native-linuxapp-gcc=20
- Total 3 cases, 3 passed, 0 failed


* Connections ports between tester/ixia and switch and DUT
  - TESTER(Or IXIA)-------SWITCH
  -                       SWITCH---------DUT
  - TESTER(Or IXIA)----------------------DUT
  - portA------------------switch
  -                        switch----------port0
  -                        switch----------port1
  -                        switch----------port2
  - portB----------------------------------port3
* Connections ports between tester/ixia and switch and DUT
  - TESTER(Or IXIA)-------SWITCH
  -                       SWITCH---------DUT
  - TESTER(Or IXIA)----------------------DUT
  - portA-----------------switch
  - portB-----------------switch
  - portC-----------------switch
  -                       switch----------port0
  -                       switch----------port1
  -                       switch----------port2
=20
Test Setup#1 for Functional test
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D

Tester has 4 ports(portA--portD), and DUT has 4 ports(port0--port3), then c=
onnect portA to port0, portB to port1, portC to port2, portD to port3.=20


Test Setup#2 for Functional test
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D

Tester has 2 ports(portA--portB), DUT has 4 ports(port0--port3), and a swit=
ch that supports IEEE 802.3ad Dynamic link aggregation, then connect port0-=
port2 to the switch for dynamic link aggregation, connect portA to aggregat=
ed interface on the switch, connect portB to port3.=20

Test Setup#3 for Functional test
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D

Tester has 3 ports(portA--portC), DUT has 3 ports(port0--port2), and a swit=
ch, then connect port0-port2 to three ports on the switch, connect portA - =
portB to the other three ports on the switch.=20

Test App
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D

Use testpmd to test the mode 0, 1, 2, 3, 4, 5, use bond_app to test the mod=
e 6. If test the mode 6, Set the tester port address to=20
7.0.0.1, 7.0.0.2, 7.0.0.3. And it will be better to turn on the debug switc=
h on the config:
CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB=3Dn - deeper debug, if you want all arp an=
d ipv4 packets be printed=20
CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB_L1=3Dn - don't print packets information, =
just collects statistics from clients, you can print these statistics with =
show command.


Test Case1: Mode 6(Adaptive load balance) Basic test
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D

Verify basic commands of bond_app work well.

Use Setup#3

Now bond_app has commands of send, start, stop, show, help, quit
help:

      execute command 'help' in the bond_app, verify it will print all comm=
ands help info.

send:

	  make sure that bond_app has been started, execute command 'send 7.0.0.1'=
 on server, use=20
	  tcpdump to listen client1 port , verify the port will receive ARP reques=
ts.

start:

      step1:
            execute command 'stop' in the bond_app, then execute 'arping -c=
 1 -I device 7.0.0.10' on the client1,
            verify bond_app will not receive and reply the client1 ARP requ=
est.
      Step2:
            Execute command 'start' in the bond_app, then execute 'arping -=
c 1 -I device 7.0.0.10' on the client1,
            Verify bond_app will receive and reply the client1 ARP request.

stop:

     continue the test of  command 'start', rerun step1.

show:

     execute command 'show' in the bond_app, verify it will print  some bon=
d info: ex. active slaves etc.

quit:

     execute command 'quit' in the bond_app, verify it will terminate all t=
hreads and quit.
               =20
Verify bond_app can check the state of slaves, and do some actions.

Use Setup#1

Start bond_app.

Step1:

      Send 1 ARP request packet to bond0 from client1, verify it will recei=
ve and reply it on one slave.

Step2:

	  Bring the port of client1 link down,  verify bond0 will detect the chang=
e of slaves, by the command
      'show' to check the state of bond0, verify there are just two slaves.

Step3:

      Send 1 ARP request packet to bond0 on bond1 from client1, verify it w=
ill receive nothing.


Test Case2: Mode 6(Adaptive load balance) RX test of mode6
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D

Verify bond device can receive load balancing for IPV4 traffic.

Use Setup#3

Step1:

      Send ARP request packet (no VLAN header) to bond0 from each client, v=
erify bond0 will choose=20
      different slave to reply the request by the policy of round-robin.
      You can use the command 'arping -c 1 -I device 7.0.0.10' to server on=
 each client. The device will
      need you to change it to the interface name of your client.

Step2:

      Send ARP request packet tagged with VLAN header to bond0 from each cl=
ient, verify bond0 will
      choose different slave to reply the request by the policy of round-ro=
bin. The VLAN header will not
      affect the policy of choosing slave to reply the request.
      You can use the scapy to send these packet as below:
                               =20
      >>> eth =3D Ether(src=3D'choose-client-port-mac')
      >>> arp =3D ARP(hwsrc=3D'choose-client-port-mac', psrc=3D'choose-port=
-ip', pdst=3D'7.0.0.10')
      >>> dot1q =3D Dot1Q(vlan=3D1)
      >>> packet =3D eth/dot1q/arp
      >>> recv =3D srp1(packet, iface=3D'choose-port-interface-name', timeo=
ut=3D2)

Test Case3: Mode 6(Adaptive load balance) TX test of mode6
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D

Verify bond device can transmit load balance.

Use Setup#3

Use scapy to send 1000 IP packets to bond0, verify slave0, slave1 and slave=
2 will transmit packets like this:
average =3D packet_num / slave_num; average*0.9 < slave_transmit_num < 1.1*=
average; so each slave
will receive packets between 300 and 367.

You can use scapy to send packets as below:

    >>> eth =3D Ether(src=3D'choose-client-port-mac')
    >>> ip =3D IP(len=3D66, dst=3D'7.0.0.10')
    >>> packet =3D eth/ip
    >>> sendp(packet, iface=3D'choose-port-interface-name', count=3D1000)



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Declan Doherty
> Sent: Saturday, February 21, 2015 1:45 AM
> To: Jastrzebski, MichalX K; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v4 0/6] Link Bonding mode 6 support (ALB)
>=20
> On 20/02/15 16:09, Michal Jastrzebski wrote:
> > v4 changes:
> > - license year modified
> > - aded license to rte_eth_bond_alb files
> > - removed RTE_EXEC_ENV_BAREMETAL in #define
> >
> > v3 changes:
> > - completed description for mode 5 unit tests patch
> > - fixed errors required by checkpatch.pl
> > - moved patch version changes from patches to cover-letter
> >
> > v2 changes:
> > in mode 6 patch 2/6:
> > - add VLAN support
> > - fixed sending duplicated ARPupdates
> > - fixed assigning slaves for next clients
> > - fixed TLB mode
> >
> > in debug patch 3/6:
> > - add IPv4 RX/TX information
> > - add mode6_debug(..) function
> >
> > in the example application patch 4/6:
> > - remove count parameter from send command
> > - fixed quit command to use cmdline_quit(cl)
> > - add echo function - all IPv4 packets will be retransmitted. Bonding
> > 	driver will use TLB policy - this will show how TX works in mode
> 6
> > - remove unused structures rx_conf_default and tx_conf_default
> > - add VLAN support
> > - remove unnecessary comments
> > - nodify show command in term of printing DEBUG informations
> >
> > This patchset add support for link bonding mode 6.
> > Additionally it changes an arp_header structure definition.
> > Also a basic example is introduced. Using this example,
> > Bonding will configure each client ARP table,
> > that packets from each client will be received on different slave,
> > mode 6 uses round-robin policy to assign slave to client IP address.
> >
> > Daniel Mrzyglod (1):
> >    bond: modify TLB unit tests
> >
> > Maciej Gajdzica (3):
> >    net: changed arp_hdr struct declaration
> >    bond: add link bonding mode 6 implementation
> >    bond: add unit tests for link bonding mode 6.
> >
> > Michal Jastrzebski (2):
> >    bond: add debug info for mode 6 link bonding
> >    bond: add example application for link bonding mode 6
> >
> >   app/test-pmd/icmpecho.c                    |   27 +-
> >   app/test/packet_burst_generator.c          |   41 +-
> >   app/test/packet_burst_generator.h          |   11 +-
> >   app/test/test_link_bonding.c               |  450 +++++++++++++++-
> >   app/test/test_pmd_perf.c                   |    3 +-
> >   app/test/virtual_pmd.c                     |  109 ++--
> >   app/test/virtual_pmd.h                     |    5 +-
> >   config/common_linuxapp                     |    3 +-
> >   examples/bond/Makefile                     |   57 ++
> >   examples/bond/main.c                       |  796
> ++++++++++++++++++++++++++++
> >   examples/bond/main.h                       |   39 ++
> >   lib/librte_net/rte_arp.h                   |   13 +-
> >   lib/librte_pmd_bond/Makefile               |    1 +
> >   lib/librte_pmd_bond/rte_eth_bond.h         |   11 +-
> >   lib/librte_pmd_bond/rte_eth_bond_alb.c     |  289 ++++++++++
> >   lib/librte_pmd_bond/rte_eth_bond_alb.h     |  142 +++++
> >   lib/librte_pmd_bond/rte_eth_bond_api.c     |   28 +-
> >   lib/librte_pmd_bond/rte_eth_bond_args.c    |    3 +-
> >   lib/librte_pmd_bond/rte_eth_bond_pmd.c     |  460 ++++++++++++++--
> >   lib/librte_pmd_bond/rte_eth_bond_private.h |   12 +
> >   20 files changed, 2354 insertions(+), 146 deletions(-)
> >   create mode 100644 examples/bond/Makefile
> >   create mode 100644 examples/bond/main.c
> >   create mode 100644 examples/bond/main.h
> >   create mode 100644 lib/librte_pmd_bond/rte_eth_bond_alb.c
> >   create mode 100644 lib/librte_pmd_bond/rte_eth_bond_alb.h
> >
>=20
> Series Acked-by: Declan Doherty <declan.doherty@intel.com>