From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 858BA4A6E for ; Fri, 7 Nov 2014 07:03:23 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 06 Nov 2014 22:12:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,329,1413270000"; d="scan'208";a="633119395" Received: from pgsmsx101.gar.corp.intel.com ([10.221.44.78]) by orsmga002.jf.intel.com with ESMTP; 06 Nov 2014 22:12:52 -0800 Received: from kmsmsx152.gar.corp.intel.com (172.21.73.87) by PGSMSX101.gar.corp.intel.com (10.221.44.78) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 7 Nov 2014 14:12:23 +0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by KMSMSX152.gar.corp.intel.com (172.21.73.87) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 7 Nov 2014 14:12:23 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.174]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.202]) with mapi id 14.03.0195.001; Fri, 7 Nov 2014 14:12:22 +0800 From: "Chen, Erlu" To: "Zhang, Helin" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v5 0/5] Support configuring hash functions Thread-Index: AQHP7N1MAfqrQLTqyEehAzFmib4YxZxUyAfg Date: Fri, 7 Nov 2014 06:12:21 +0000 Message-ID: <57080872D7808940A39EED8613FE035E4C94AB@SHSMSX104.ccr.corp.intel.com> References: <1413180766-12211-1-git-send-email-helin.zhang@intel.com> <1413861289-26662-1-git-send-email-helin.zhang@intel.com> In-Reply-To: <1413861289-26662-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 v5 0/5] 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: Fri, 07 Nov 2014 06:03:24 -0000 Tested-by: Erlu Chen - Tested Commit: b82da759779ee56d74ce36dc5a1020c60be9ca24 - OS: Linux fc20 3.11.10-301.fc20.x86_64 - CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz - GCC: gcc version 4.8.3 20140624 - NIC: Intel Corporation Ethernet Controller X710 for 10GbE SFP+ [8086:157= 2] Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ [8086:1584] Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ [8086:1583] - Default x86_64-native-linuxapp-gcc configuration - Total 4 cases, 4 passed, 0 failed - Case: test_toeplitz Description:=20 Command / instruction: #1. set up testpmd with fortville NICs:: ./testpmd -c fffff -n %d -- -i --coremask=3D0xffffe --rxq=3D16 --txq=3D1= 6 #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 conf= iguration:: 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 -------------------- =09 #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") =20 Expected 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. The theoretical queue id is the same with the actual queue id.=20 - Case: test_toeplitz_symmetric Description: The same with the above steps, pay attention to "set hash fu= nction", and the hash value and queue should be the same for these two flow= . Command / instruction: The same with the above steps, pay attention to "set hash function", shou= ld 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"1= 92.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"1= 92.168.0.4")], iface=3D"eth3") Expected test result: The hash value and queue should be the same for these two flow . - Case: test_simple Description: The same as the above two test cases. Just pay attention to = set the hash function to "simple xor" - Case: test_simple_symmetric Description: The same as the above two test cases. Just pay attention to = set the hash function to "simple xor" -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Helin Zhang Sent: Tuesday, October 21, 2014 11:15 AM To: dev@dpdk.org Subject: [dpdk-dev] [PATCH v5 0/5] Support configuring hash functions These patches mainly support configuring hash functions. In detail, - It can get or set hash functions. - It can configure symmetric hash functions. * Get/set symmetric hash enable per port. * Get/set symmetric hash enable per 'PCTYPE'. * Get/set filter swap configurations. - Six commands have been implemented in testpmd to support testing above. * get_sym_hash_ena_per_port * set_sym_hash_ena_per_port * get_sym_hash_ena_per_pctype * set_sym_hash_ena_per_pctype * get_filter_swap * set_filter_swap * get_hash_function * set_hash_function Note that 'PCTYPE' means 'Packet Classification Type'. It also uses prepared constant hash keys to replace runtime generating hash= keys. Global initialization is added to put global registers to an initial= state, as global registers can be reset by global reset only. v3 changes: * Removed renamings in rte_ethdev.h. * Redesigned filter control API and its relevant structures/enums. * Renamed header file from rte_eth_features.h to rte_eth_ctrol.h. * Remove public header file of rte_i40e.h specific for i40e. * Added hardware initialization function during port init. * Used constant random hash keys in i40e PF. * renamed the commands in testpmd based on the redesigned filter control API. v4 changes: * Fixed a bug in testpmd to support 'set_sym_hash_ena_per_port'. v5 changes: * Integrated with filter API defined recently. * Remove all for filter API definition, as it has already defined and merged recently. Helin Zhang (5): i40e: Use constant random hash keys ethdev: add enum type and relevant structures for hash filter control i40e: add hash filter control implementation i40e: add hardware initialization app/testpmd: add commands to support hash filter app/test-pmd/cmdline.c | 566 ++++++++++++++++++++++++++++++++++= ++++ lib/librte_ether/rte_eth_ctrl.h | 75 +++++ lib/librte_pmd_i40e/i40e_ethdev.c | 467 ++++++++++++++++++++++++++++++- 3 files changed, 1100 insertions(+), 8 deletions(-) -- 1.8.1.4 -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Helin Zhang Sent: Tuesday, October 21, 2014 11:15 AM To: dev@dpdk.org Subject: [dpdk-dev] [PATCH v5 0/5] Support configuring hash functions These patches mainly support configuring hash functions. In detail, - It can get or set hash functions. - It can configure symmetric hash functions. * Get/set symmetric hash enable per port. * Get/set symmetric hash enable per 'PCTYPE'. * Get/set filter swap configurations. - Six commands have been implemented in testpmd to support testing above. * get_sym_hash_ena_per_port * set_sym_hash_ena_per_port * get_sym_hash_ena_per_pctype * set_sym_hash_ena_per_pctype * get_filter_swap * set_filter_swap * get_hash_function * set_hash_function Note that 'PCTYPE' means 'Packet Classification Type'. It also uses prepared constant hash keys to replace runtime generating hash= keys. Global initialization is added to put global registers to an initial= state, as global registers can be reset by global reset only. v3 changes: * Removed renamings in rte_ethdev.h. * Redesigned filter control API and its relevant structures/enums. * Renamed header file from rte_eth_features.h to rte_eth_ctrol.h. * Remove public header file of rte_i40e.h specific for i40e. * Added hardware initialization function during port init. * Used constant random hash keys in i40e PF. * renamed the commands in testpmd based on the redesigned filter control API. v4 changes: * Fixed a bug in testpmd to support 'set_sym_hash_ena_per_port'. v5 changes: * Integrated with filter API defined recently. * Remove all for filter API definition, as it has already defined and merged recently. Helin Zhang (5): i40e: Use constant random hash keys ethdev: add enum type and relevant structures for hash filter control i40e: add hash filter control implementation i40e: add hardware initialization app/testpmd: add commands to support hash filter app/test-pmd/cmdline.c | 566 ++++++++++++++++++++++++++++++++++= ++++ lib/librte_ether/rte_eth_ctrl.h | 75 +++++ lib/librte_pmd_i40e/i40e_ethdev.c | 467 ++++++++++++++++++++++++++++++- 3 files changed, 1100 insertions(+), 8 deletions(-) -- 1.8.1.4