From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 0BC722E89 for ; Wed, 5 Nov 2014 04:02:12 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 04 Nov 2014 19:11:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="411591073" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by FMSMGA003.fm.intel.com with ESMTP; 04 Nov 2014 19:02:57 -0800 Received: from pgsmsx107.gar.corp.intel.com (10.221.44.105) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 5 Nov 2014 11:10:15 +0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 5 Nov 2014 11:10:14 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.174]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.13]) with mapi id 14.03.0195.001; Wed, 5 Nov 2014 11:10:12 +0800 From: "Jiajia, SunX" To: "Doherty, Declan" , "dev@dpdk.org" Thread-Topic: [PATCH v5 0/8] link bonding Thread-Index: AQHP567ZxfmgA2tLjUe0t2ParROsXJxRab1Q Date: Wed, 5 Nov 2014 03:10:12 +0000 Message-ID: References: <1412071079-7355-1-git-send-email-declan.doherty@intel.com> <1413291597-27326-1-git-send-email-declan.doherty@intel.com> In-Reply-To: <1413291597-27326-1-git-send-email-declan.doherty@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 v5 0/8] link bonding X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2014 03:02:15 -0000 Tested-by: Jiajia, SunX =20 - Tested Commit: f7aaae2fe6f7f9a78eab7313d77e92b934693b5d - OS: Fedora20 3.11.10-301.fc20.x86_64 and 3.16.6-200.fc20.x86_64 - GCC: gcc version 4.8.2 - CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz - NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [80= 86:10fb] - Default x86_64-native-linuxapp-gcc configuration - Total 18 cases, 18 passed, 0 failed TOPO: * Connections ports between tester/ixia and DUT - TESTER(Or IXIA)-------DUT - portA------------------port0 - portB------------------port1 - portC------------------port2 - portD------------------port3 * 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 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. - Case: Basic bonding--Create bonded devices and slaves Description:=20 Use Setup#1. Create bonded device and add some ports as salve of bonded device, Then removed slaves or added slaves or change the bonding prima= ry slave Or change bonding mode and so on. Expected test result: Verify the basic functions are normal. - Case: Basic bonding--MAC Address Test Description:=20 Use Setup#1. Create bonded device and add some ports as slaves of bonded device, Check that the changes of the bonded device and slave MAC=20 Expected test result: Verify the behavior of bonded device and slave according to the= mode. - Case: Basic bonding--Device Promiscuous Mode Test Description:=20 Use Setup#1. Create bonded device and add some ports as slaves of bonded device, Set promiscuous mode on or off, then send packets to the bonded= device Or slaves. Expected test result: Verify the RX/TX status of bonded device and slaves according t= o the mode. - Case: Mode 0(Round Robin) TX/RX test Description:=20 Use Setup#1. Create bonded device with mode 0 and add 3 ports as slaves of bonded devi= ce, Forward packets between bonded device and unbounded device, sta= rt to forward, And send packets to unbound device or slaves. Expected test result: Verify the RX/TX status of bonded device and slaves in mode 0. - Case: Mode 0(Round Robin) Bring one slave link down Description:=20 Use Setup#1. Create bonded device with mode 0 and add 3 ports as slaves of bonded devi= ce, Forward packets between bonded device and unbounded device, sta= rt to forward, Bring the link on either port 0, 1 or 2 down. And send packets = to unbound=20 device or slaves. Expected test result: Verify the RX/TX status of bonded device and slaves in mode 0. - Case: Mode 0(Round Robin) Bring all slave links down Description:=20 Use Setup#1. Create bonded device with mode 0 and add 3 ports as slaves of bonded devi= ce, Forward packets between bonded device and unbounded device, sta= rt to forward, Bring the links down on all bonded ports. And send packets to u= nbound=20 device or slaves. Expected test result: Verify the RX/TX status of bonded device and slaves in mode 0. - Case: Mode 1(Active Backup) TX/RX Test Description:=20 Use Setup#1. Create bonded device with mode 1 and add 3 ports as slaves of bonded devi= ce, Forward packets between bonded device and unbounded device, sta= rt to forward, And send packets to unbound device or slaves. Expected test result: Verify the RX/TX status of bonded device and slaves in mode 1. - Case: Mode 1(Active Backup) Change active slave, RX/TX test Description:=20 Use Setup#1. Continuing from previous test case.Change the active slave port from port= 0=20 to port1.Verify that the bonded device's MAC has changed to sla= ve1's MAC. testpmd> set bonding primary 1 4=20 Repeat the transmission and reception(TX/RX) test verify that da= ta is now=20 transmitted and received through the new active slave and no lon= ger through port0 =20 Expected test result: Verify the RX/TX status of bonded device and slaves in mode 1. - Case: Mode 1(Active Backup) Link up/down active eth dev Description:=20 Use Setup#1. Bring link between port A and port0 down. If tester is ixia, can= use=20 IxExplorer to set the "Simulate Cable Disconnect" at the port pr= operty. =20 Verify that the active slave has been changed from port0. Repeat= the=20 transmission and reception test verify that data is now transmit= ted and received through the new active slave and no longer through port= 0 Bring port0 to link down at the remote end.Verify the active sla= ve has been changed from port0. send 100 packets to port3. testpmd> show port stats 4----(Verify port3 have 100 rx packets,= meanwhile port4 have 100 tx packets,the current primary port have 100 tx pa= ckets,and port0 doesn`t have any packet) Expected test result: Verify the RX/TX status of bonded device and slaves in mode 1.= =20 - Case: Mode 1(Active Backup) Bring all slave links down Description:=20 Use Setup#1. Bring all slave ports of bonded port down. Verify that bonded callback for link down is called and no acti= ve slaves.=20 Verify that data cannot be sent or received through bonded port= . Send 100 packets=20 to port3 and verify that bonded port can't TX 100 packets. Bring port 0-2 to link down at the remote end. Verify port4 has= been link down and has no active slave. Send 100 rx packets to port3.=20 testpmd> show port stats 4----(Verify port3 have 100 rx packets,me= anwhile=20 port4 doesn`t have any packet) Expected test result: Verify the RX/TX status of bonded device and slaves in mode 1. - Case: Mode 2(Balance XOR) TX Load Balance test Description:=20 Use Setup#1. Bonded port will activate each slave eth dev based on the follo= wing hash function: ((dst_mac XOR src_mac) % (number of slave ports)) Send 300 packets from IXIA port D to non-bonded port(port3),and= verify these packets=20 will be forwarded to bonded device. The bonded device will tran= simit these packets to all slaves. Verify that each slave receive correct number of packets accord= ing to the policy. The total number of packets which received by slave should be equal as 300 packe= ts.=20 Create 3 streams in the IXIA,which streams source MAC are 00:00= :03:00:0F:00, 00:00:03:00:0F:01,00:00:03:00:0F:02 respectively (make sure gen= erate different value by the policy ((dst_mac XOR src_mac) % (number of slave ports)) ) = and dest MAC all is=20 90:E2:BA:4A:54:80(this value should been your unbonded port add= ress). Respectively send 100 packets to port3 by the 3 streams. testpmd> show port stats all----(Verify port3 have 300 rx packe= ts, port4 have 300 tx packets,and port 0-2 have 100 tx packets resp= ectively) Expected test result: Verify the RX/TX status of bonded device and slaves in mode 2. - Case: Mode 2(Balance XOR) TX Load Balance Link down Description:=20 Use Setup#1. ring link down of one slave. Send 300 packets from non-bonded port(port3), and verify these= =20 packets will be forwarded to bonded device.=20 Verify that each active slave receive correct number of packets (according to the mode policy), and the down slave will not rec= eive packets. Link down slave 0 at the remote end.Create 3 streams in the IXIA like cas= e13. Then respectively send 100 packets to port3 by the 3 streams. Expected test result: Verify the RX/TX status of bonded device and slaves in mode 2. - Case: Mode 2(Balance XOR) Bring all slave links down Description:=20 Use Setup#1. Bring all slave links down. Verify that bonded callback for link down is called. Verify no packet can be sent. Bring all slaves to link down at the remote end.Create=20 3 streams in the IXIA like case13.Then respectively send 100 packets=20 to port3 by the 3 streams. testpmd> show port info 4----(Verify bonding port has been linked down) testpmd> show port stats all----(Verify port3 have 300 rx packets= ,meanwhile port 0,1,2 and 4 don`t have any packet) Expected test result: Verify the RX/TX status of bonded device and slaves in mode 2. - Case: Mode 2(Balance XOR) Layer 3+4 forwarding =09 Description:=20 Use Setup#1. Use "xmit_hash_policy()" to change to this forwarding mode Create a stream of traffic which will exercise all slave ports using the = transmit policy=20 ((SRC_PORT XOR DST_PORT) XOR ((SRC_IP XOR DST_IP) AND 0xffff) % # of = Slaves Transmit data through bonded device, verify TX packet count for each slav= e port is as expected Create 3 streams on a port which is mapped with unbonded port 3 at the IX= IA end. And set different IP by the transmit policy.Then send 100 packets on= each stream. testpmd> show port stats all----(Verify port3 have 300 rx packet= s, meanwhile port4 have 300 rx packets, port 0-2 have 100 tx packets respe= ctively) Add Vlan tag in the previouse 3 streams. Everthing else remains the same.= =20 Then send 100 packets on each stream. Verify the packet statics is the sa= me as above. =20 testpmd> show port stats all----(Verify port3 =20 have 300 rx packets,meanwhile port4 have 300 rx packets,port 0-2 have 100= tx packets respecitvely) Expected test result: Verify the RX/TX status of bonded device and slaves in mode 2. - Case: Mode 2(Balance XOR) RX test Description:=20 Use Setup#1. Send 100 packets to each bonded slaves(port0,1,2) Verify that each slave receives 100 packets and the bonded device receive= a total 300 packets. Verify that the bonded device forwards 300 packets to the non-bonded port= (port4). Send 100 packets to port0,1,2 respectively. testpmd> show port stats all----(Verify port0,1,2 have 100 tx packets= respectively=20 and port4 have 300 rx packets,and port3 have 300 tx packets) Expected test result: Verify the RX/TX status of bonded device and slaves in mode 2. - Case: Mode 3(Broadcast) TX/RX Test Description:=20 Use Setup#1. Add ports 0-2 as slave devices to the bonded port 4. Make all slaves to be active slaves on bonded device.=20 RX: Send a packet stream(100 packets) from port A on the traffi= c generator to be forwarded through the bonded port4 to port3. Verify the sum of the packets transmitted from the traffic generator portA is equal the total received packets on port0, port4 and portD(T= raffic generator). testpmd> show port stats all---(Verify port0 receive 100 pac= kets,=20 and port4 receive 100 packets, and port3 transmit 100 packets) TX: Send a packet stream(100 packets) from portD on the traffic = generator=20 to be forwarded through port3 to the bonded port4. Verify th= e sum of=20 the packets(100packets) transmitted from the traffic generat= or port is equal the total=20 received packets on port4, portA and transmitted to port0. =20 testpmd> show port stats all---(Verify port3 RX 100 packets,=20 and port0,1,2 TX 100 packets,port4 has 300 TX packets) Expected test result: Verify the RX/TX status of bonded device and slaves in mode 3. - Case: Mode 3(Broadcast) Bring one slave link down Description:=20 Use Setup#1. Bring one slave port link down. Send 100 packets through portD to port3, then port3 forwards to bondede device(port4), verify that the bonded= device=20 and other slaves TX the correct number of packets(100 packets for each po= rt). Expected test result: Verify the RX/TX status of bonded device and slaves in mode 3. - Case: Mode 3(Broadcast) Bring all slave links down Description:=20 Use Setup#1. Bring all slave ports of bonded port down Verify that bonded callback for link down is called Verify that data cannot be sent or received through bonded port. Expected test result: Verify the RX/TX status of bonded device and slaves in mode 3. > -----Original Message----- > From: Doherty, Declan > Sent: Tuesday, October 14, 2014 9:00 PM > To: dev@dpdk.org > Cc: Jiajia, SunX; De Lara Guarch, Pablo; thomas.monjalon@6wind.com; > Doherty, Declan > Subject: [PATCH v5 0/8] link bonding >=20 > v5: > - Fix uninitialized variable in broadcast_tx_burst function which > caused a > build error in 32-bit build > - Address unit test issue which is exposed by new test in mode 4/5 > patch sets >=20 > v4: > - Rebased to account for changes in master. > - Fix for rte_eth_bond_slaves_get() introduced in v3 patch set > - Addressed issue around disabling/enabling link status polling around > adding/ > removing slaves devices. >=20 > v3 : > - Typo fix for the bond free mbufs patch. > - Rebased to account for changes in the mbuf patches. > - Add support for slave devices which don't support link status > interrupts > - Tidy up the link bonding unit test so that all tests use the new test > macros. >=20 > v2 : > Addresses issues with the logic around the handling of fail > transmissions. > In this version all modes behave in a manner similar to a standard PMD, > returning the number of successfully transmitted mbufs and with the > failing > mbufs at the end of bufs array for freeing / retransmission by the > application software >=20 > v1: >=20 > This patch set adds support for link status interrupt in the link > bonding > pmd. It also contains some patches to tidy up the code structure and to > of the link bonding code and to fix bugs relating to transmission > failures in the under lying slave pmd which could lead to leaked mbufs. >=20 >=20 > Declan Doherty (8): > bond: link status interrupt support > bond: removing switch statement from rx burst method > bond: fix naming inconsistency in tx_burst_round_robin > bond: free mbufs if transmission fails in bonding tx_burst functions > test app: adding support for generating variable sized packet > testpmd: adding parameter to reconfig method to set socket_id when > adding new port to portlist > bond: lsc polling support > bond: unit test test macro refactor >=20 > app/test-pmd/cmdline.c | 65 +- > app/test-pmd/testpmd.c | 3 +- > app/test-pmd/testpmd.h | 2 +- > app/test/packet_burst_generator.c | 25 +- > app/test/packet_burst_generator.h | 6 +- > app/test/test.h | 7 +- > app/test/test_link_bonding.c | 3342 ++++++++++++++------ > -------- > app/test/virtual_pmd.c | 96 +- > app/test/virtual_pmd.h | 53 +- > lib/librte_pmd_bond/rte_eth_bond.h | 80 + > lib/librte_pmd_bond/rte_eth_bond_api.c | 319 ++- > lib/librte_pmd_bond/rte_eth_bond_args.c | 30 +- > lib/librte_pmd_bond/rte_eth_bond_pmd.c | 550 +++-- > lib/librte_pmd_bond/rte_eth_bond_private.h | 71 +- > 14 files changed, 2691 insertions(+), 1958 deletions(-) >=20 > -- > 1.7.12.2