From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 5437C7E95 for ; Mon, 13 Oct 2014 14:19:31 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 13 Oct 2014 05:27:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,710,1406617200"; d="scan'208";a="604488412" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 13 Oct 2014 05:27:09 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 13 Oct 2014 05:27:09 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 13 Oct 2014 05:27:09 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.230]) by shsmsx102.ccr.corp.intel.com ([169.254.2.192]) with mapi id 14.03.0195.001; Mon, 13 Oct 2014 20:27:07 +0800 From: "Zhan, Zhaochen" To: "Zhang, Helin" , "dev@dpdk.org" Thread-Topic: [PATCH v4 0/7] Support configuring hash functions Thread-Index: AQHP5qzEsA20fOrG7US9kwngk7CFupwtzcog Date: Mon, 13 Oct 2014 12:27:06 +0000 Message-ID: <6D0EE020084B194084D70B0A8D2207B8EDC838@SHSMSX104.ccr.corp.intel.com> References: <1412058028-10971-2-git-send-email-helin.zhang@intel.com> <1413180766-12211-1-git-send-email-helin.zhang@intel.com> In-Reply-To: <1413180766-12211-1-git-send-email-helin.zhang@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/7] Support configuring hash functions 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: Mon, 13 Oct 2014 12:19:32 -0000 > These patches mainly support configuring hash functions. Tested-by: Zhaochen Zhan This patch has been verified on three kinds of Fortville NICs. Base commit: 23fcffe8ffaccf8a2901050e7daa4979597141ed CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz OS: Linux fc20 3.11.10-301.fc20.x86_64 GCC: 4.8.2 NIC: 4*10G(fortville_eagle), 2*40G(fortville_spirit), 1*40G(fortville_spiri= t_single) =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 Fortville RSS full support - Support configuring hash functions =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 This document provides test plan for testing the function of Fortville: Support configuring hash functions. Prerequisites ------------- 2x Intel(r) 82599 (Niantic) NICs (2x 10GbE full duplex optical ports per NI= C) 1x Fortville_eagle NIC (4x 10G) 1x Fortville_spirit NIC (2x 40G) 2x Fortville_spirit_single NIC (1x 40G) The four ports of the 82599 connect to the Fortville_eagle; The two ports of Fortville_spirit connect to Fortville_spirit_single. The three kinds of NICs are the target NICs. the connected NICs can send pa= ckets to these three NICs using scapy. Network Traffic --------------- The RSS feature is designed to improve networking performance by load balan= cing the packets received from a NIC port to multiple NIC RX queues, with each q= ueue handled by a different logical core. #1. The receive packet is parsed into the header fields used by the hash operation (such as IP addresses, TCP port, etc.) #2. A hash calculation is performed. The Fortville supports four hash func= tion: Toeplitz, simple XOR and their Symmetric RSS. #3. The seven LSBs of the hash result are used as an index into a 128/512 e= ntry 'redirection table'. Each entry provides a 4-bit RSS output index. #4. There are four cases to test the four hash function. Test Case: test_toeplitz =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 Testpmd configuration - 16 RX/TX queues per port ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #1. set up testpmd with fortville NICs:: ./testpmd -c fffff -n %d -- -i --coremask=3D0xffffe --rxq=3D16 --txq=3D16 #2. Reta Configuration. 128 reta entries configuration:: testpmd command: port config 0 rss reta (hash_index,queue_id) #3. PMD fwd only receive the packets:: testpmd command: set fwd rxonly #4. rss received package type configuration two received packet types confi= guration:: testpmd command: port config 0 rss ip/udp #5. verbose configuration:: testpmd command: set verbose 8 #6. set hash functions, can choose symmetric or not, chose port and packet = type:: set_hash_function 0 toeplitz #7. start packet receive:: testpmd command: start tester Configuration -------------------- #1. set up scapy #2. send packets with different type ipv4/ipv4 with tcp/ipv4 with udp/ ipv6/ipv6 with tcp/ipv6 with udp:: sendp([Ether(dst=3D"90:e2:ba:36:99:3c")/IP(src=3D"192.168.0.4", dst=3D"= 192.168.0.5")], iface=3D"eth3") test result ----------- The testpmd will print the hash value and actual queue of every packet. #1. Calaute the queue id: hash value%128or512, then refer to the redirectio= n table to get the theoretical queue id. #2. Compare the theoretical queue id with the actual queue id.=20 Test Case: test_toeplitz_symmetric =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 The same with the above steps, pay attention to "set hash function", should= use:: set_hash_function 0 toeplitz set_sym_hash_ena_per_port 0 enable set_sym_hash_ena_per_pctype 0 35 enable And send packets with the same flow in different direction:: sendp([Ether(dst=3D"90:e2:ba:36:99:3c")/IP(src=3D"192.168.0.4", dst=3D"19= 2.168.0.5")], iface=3D"eth3") sendp([Ether(dst=3D"90:e2:ba:36:99:3c")/IP(src=3D"192.168.0.5", dst=3D"19= 2.168.0.4")], iface=3D"eth3") And the hash value and queue should be the same for these two flow . Test Case: test_simple =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The same as the above two test cases. Just pay attention to set the hash fu= nction to "simple xor" Test Case: test_simple_symmetric =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 The same as the above two test cases. Just pay attention to set the hash fu= nction to "simple xor"