Message ID | 1412058028-10971-2-git-send-email-helin.zhang@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 337736A9C; Tue, 30 Sep 2014 08:14:01 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 59AFA6A89 for <dev@dpdk.org>; Tue, 30 Sep 2014 08:13:59 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 29 Sep 2014 23:20:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,625,1406617200"; d="scan'208";a="581057498" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 29 Sep 2014 23:20:35 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s8U6KXgX003442; Tue, 30 Sep 2014 14:20:33 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s8U6KV63011013; Tue, 30 Sep 2014 14:20:33 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s8U6KVIs011009; Tue, 30 Sep 2014 14:20:31 +0800 From: Helin Zhang <helin.zhang@intel.com> To: dev@dpdk.org Date: Tue, 30 Sep 2014 14:20:22 +0800 Message-Id: <1412058028-10971-2-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1412058028-10971-1-git-send-email-helin.zhang@intel.com> References: <1412058028-10971-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH v3 1/7] ethdev: add more annotations 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> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Zhang, Helin
Sept. 30, 2014, 6:20 a.m. UTC
Add more annotations about packet classification type. v3 changes: * Remove renamings of RSS 'SHIFT's. * Add more annotations for RSS 'SHIFT's. Signed-off-by: Helin Zhang <helin.zhang@intel.com> Acked-by: Jingjing Wu <jingjing.wu@intel.com> --- lib/librte_ether/rte_ethdev.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Comments
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. - 'ethdev' level interfaces are added. * 'rte_eth_dev_filter_supported', to check if a filter control is supported on a port. * 'rte_eth_dev_filter_ctrl', a common API to execute specific filter control. - 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'. v4 changes: * Fixed a bug in testpmd to support 'set_sym_hash_ena_per_port'. Helin Zhang (7): ethdev: add more annotations ethdev: add interfaces and relevant for filter control ethdev: add structures and enum for hash filter control i40e: add hash filter control implementation i40e: add hardware initialization i40e: Use constant random hash keys app/testpmd: add commands to support hash filter control app/test-pmd/cmdline.c | 566 ++++++++++++++++++++++++++++++++++++++ lib/librte_ether/Makefile | 1 + lib/librte_ether/rte_eth_ctrl.h | 154 +++++++++++ lib/librte_ether/rte_ethdev.c | 32 +++ lib/librte_ether/rte_ethdev.h | 53 +++- lib/librte_pmd_i40e/i40e_ethdev.c | 492 ++++++++++++++++++++++++++++++++- 6 files changed, 1291 insertions(+), 7 deletions(-) create mode 100644 lib/librte_ether/rte_eth_ctrl.h
> These patches mainly support configuring hash functions. Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com> 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_spirit_single) ================================================================== Fortville RSS full support - Support configuring hash functions ================================================================== 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 NIC) 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 packets to these three NICs using scapy. Network Traffic --------------- The RSS feature is designed to improve networking performance by load balancing the packets received from a NIC port to multiple NIC RX queues, with each queue 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 function: Toeplitz, simple XOR and their Symmetric RSS. #3. The seven LSBs of the hash result are used as an index into a 128/512 entry '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 ========================= Testpmd configuration - 16 RX/TX queues per port ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #1. set up testpmd with fortville NICs:: ./testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=16 --txq=16 #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 configuration:: 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="90:e2:ba:36:99:3c")/IP(src="192.168.0.4", dst="192.168.0.5")], iface="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 redirection table to get the theoretical queue id. #2. Compare the theoretical queue id with the actual queue id. Test Case: test_toeplitz_symmetric =================================== 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="90:e2:ba:36:99:3c")/IP(src="192.168.0.4", dst="192.168.0.5")], iface="eth3") sendp([Ether(dst="90:e2:ba:36:99:3c")/IP(src="192.168.0.5", dst="192.168.0.4")], iface="eth3") And the hash value and queue should be the same for these two flow . Test Case: test_simple ======================= The same as the above two test cases. Just pay attention to set the hash function to "simple xor" Test Case: test_simple_symmetric ================================= The same as the above two test cases. Just pay attention to set the hash function to "simple xor"
Acked-by: Jingjing Wu <jingjing.wu@intel.com> > -----Original Message----- > From: Zhang, Helin > Sent: Monday, October 13, 2014 2:13 PM > To: dev@dpdk.org > Cc: Zhan, Zhaochen; Cao, Waterman; Zhang, Helin > Subject: [PATCH v4 0/7] 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. > - 'ethdev' level interfaces are added. > * 'rte_eth_dev_filter_supported', to check if a filter control > is supported on a port. > * 'rte_eth_dev_filter_ctrl', a common API to execute > specific filter control. > - 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'. > > v4 changes: > * Fixed a bug in testpmd to support 'set_sym_hash_ena_per_port'. > > Helin Zhang (7): > ethdev: add more annotations > ethdev: add interfaces and relevant for filter control > ethdev: add structures and enum for hash filter control > i40e: add hash filter control implementation > i40e: add hardware initialization > i40e: Use constant random hash keys > app/testpmd: add commands to support hash filter control > > app/test-pmd/cmdline.c | 566 > ++++++++++++++++++++++++++++++++++++++ > lib/librte_ether/Makefile | 1 + > lib/librte_ether/rte_eth_ctrl.h | 154 +++++++++++ > lib/librte_ether/rte_ethdev.c | 32 +++ > lib/librte_ether/rte_ethdev.h | 53 +++- > lib/librte_pmd_i40e/i40e_ethdev.c | 492 > ++++++++++++++++++++++++++++++++- > 6 files changed, 1291 insertions(+), 7 deletions(-) create mode 100644 > lib/librte_ether/rte_eth_ctrl.h > > -- > 1.8.1.4
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(-)
Tested-by: Erlu Chen <erlu.chen@intel.com> - Tested Commit: 23fcffe8ffaccf8a2901050e7daa4979597141ed - 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:1572] 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: Command / instruction: #1. set up testpmd with fortville NICs:: ./testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=16 --txq=16 #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 configuration:: 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="90:e2:ba:36:99:3c")/IP(src="192.168.0.4", dst="192.168.0.5")], iface="eth3") 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 redirection table to get the theoretical queue id. #2. The theoretical queue id is the same with the actual queue id. - Case: test_toeplitz_symmetric Description: The same with the above steps, pay attention to "set hash function", 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", 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="90:e2:ba:36:99:3c")/IP(src="192.168.0.4", dst="192.168.0.5")], iface="eth3") sendp([Ether(dst="90:e2:ba:36:99:3c")/IP(src="192.168.0.5", dst="192.168.0.4")], iface="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
Tested-by: Erlu Chen <erlu.chen@intel.com> - 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:1572] 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: Command / instruction: #1. set up testpmd with fortville NICs:: ./testpmd -c fffff -n %d -- -i --coremask=0xffffe --rxq=16 --txq=16 #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 configuration:: 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="90:e2:ba:36:99:3c")/IP(src="192.168.0.4", dst="192.168.0.5")], iface="eth3") 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 redirection table to get the theoretical queue id. #2. The theoretical queue id is the same with the actual queue id. - Case: test_toeplitz_symmetric Description: The same with the above steps, pay attention to "set hash function", 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", 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="90:e2:ba:36:99:3c")/IP(src="192.168.0.4", dst="192.168.0.5")], iface="eth3") sendp([Ether(dst="90:e2:ba:36:99:3c")/IP(src="192.168.0.5", dst="192.168.0.4")], iface="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
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 flow type. * 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_flow_type * set_sym_hash_ena_per_flow_type * get_filter_swap * set_filter_swap * get_hash_function * set_hash_function It also uses constant hash keys to replace runtime generating hash keys. Global initialization is added to correctly put registers to an initial state. 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. v6 changes: * Flow type strings are used to replace Packet Classification Types, to isolate hardware specific things. * Implemented the mapping function to convert RSS offload types to Packet Classification Types, to isolate the real hardware specific things. * Removed initialization of global registers in i40e PMD, as global registers shouldn't be initialized per port. * Added more annotations to get code more understandable. * Corrected annotation format for documenation. Helin Zhang (3): i40e: Use constant as the default hash keys i40e: support of controlling hash functions app/testpmd: add commands to support hash functions app/test-pmd/cmdline.c | 628 ++++++++++++++++++++++++++++++++++++++ lib/librte_ether/rte_eth_ctrl.h | 98 +++++- lib/librte_pmd_i40e/i40e_ethdev.c | 403 +++++++++++++++++++++++- 3 files changed, 1117 insertions(+), 12 deletions(-)
Hi Helin, I think you are working on a v7 of this patchset, right? Any news?
Hi Thomas Yes, I am working on it. But still a few review comments should be dealt with. Hopefully I can send it out tomorrow. Thank you! Regards, Helin > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Thursday, November 27, 2014 11:45 PM > To: Zhang, Helin > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v6 0/3] Support configuring hash functions > > Hi Helin, > > I think you are working on a v7 of this patchset, right? > Any news? > > -- > Thomas
These patches mainly support configuring hash functions. In detail, - It can get/set global hash configurations. * Get/set symmetric hash enable per flow type. * Get/set hash function type. - It can get/set symmetric hash enable per port. - Four commands have been implemented in testpmd to support testing above. * get_sym_hash_ena_per_port * set_sym_hash_ena_per_port * get_hash_global_config * set_hash_global_config It also uses constant hash keys to replace runtime generating hash keys. Global initialization is added to correctly put registers to an initial state. 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. v6 changes: * Flow type strings are used to replace Packet Classification Types, to isolate hardware specific things. * Implemented the mapping function to convert RSS offload types to Packet Classification Types, to isolate the real hardware specific things. * Removed initialization of global registers in i40e PMD, as global registers shouldn't be initialized per port. * Added more annotations to get code more understandable. * Corrected annotation format for documenation. v7 changes: * Remove swap configurations, as it is not allowed by hardware design. * Put symmetric hash per flow type and hash function type into 'RTE_ETH_HASH_FILTER_GLOBAL_CONFIG', as they are controlling global registers which will affects all the ports of the same NIC. Helin Zhang (4): ethdev: code style fixes i40e: use constant as the default hash keys i40e: support of controlling hash functions app/testpmd: app/testpmd: add commands to support hash functions app/test-pmd/cmdline.c | 334 ++++++++++++++++++++++++++++++++++++++ lib/librte_ether/rte_eth_ctrl.h | 72 +++++++- lib/librte_pmd_i40e/i40e_ethdev.c | 312 ++++++++++++++++++++++++++++++++++- 3 files changed, 704 insertions(+), 14 deletions(-)
These patches mainly support configuring hash functions. In detail, - It can get/set global hash configurations. * Get/set symmetric hash enable per flow type. * Get/set hash function type. - It can get/set symmetric hash enable per port. - Four commands have been implemented in testpmd to support testing above. * get_sym_hash_ena_per_port * set_sym_hash_ena_per_port * get_hash_global_config * set_hash_global_config It also uses constant hash keys to replace runtime generating hash keys. Global initialization is added to correctly put registers to an initial state. 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. v6 changes: * Flow type strings are used to replace Packet Classification Types, to isolate hardware specific things. * Implemented the mapping function to convert RSS offload types to Packet Classification Types, to isolate the real hardware specific things. * Removed initialization of global registers in i40e PMD, as global registers shouldn't be initialized per port. * Added more annotations to get code more understandable. * Corrected annotation format for documenation. v7 changes: * Removed swap configurations, as it is not allowed by hardware design. * Put symmetric hash per flow type and hash function type into 'RTE_ETH_HASH_FILTER_GLOBAL_CONFIG', as they are controlling global registers which will affects all the ports of the same NIC. v8 changes: * Removed redundant checks in i40e_ethdev.c. * Solved compile errors on ICC. Helin Zhang (4): ethdev: code style fixes i40e: use constant as the default hash keys i40e: support of controlling hash functions app/testpmd: add commands to support hash functions app/test-pmd/cmdline.c | 333 ++++++++++++++++++++++++++++++++++++++ lib/librte_ether/rte_eth_ctrl.h | 72 ++++++++- lib/librte_pmd_i40e/i40e_ethdev.c | 308 +++++++++++++++++++++++++++++++++-- 3 files changed, 699 insertions(+), 14 deletions(-)
> -----Original Message----- > From: Zhang, Helin > Sent: Tuesday, December 02, 2014 2:19 AM > To: dev@dpdk.org > Cc: Cao, Waterman; Cao, Min; Ananyev, Konstantin; Zhang, Helin > Subject: [PATCH v8 0/4] Support configuring hash functions > > These patches mainly support configuring hash functions. In detail, > - It can get/set global hash configurations. > * Get/set symmetric hash enable per flow type. > * Get/set hash function type. > - It can get/set symmetric hash enable per port. > - Four commands have been implemented in testpmd to support testing above. > * get_sym_hash_ena_per_port > * set_sym_hash_ena_per_port > * get_hash_global_config > * set_hash_global_config > > It also uses constant hash keys to replace runtime generating hash keys. > Global initialization is added to correctly put registers to an initial state. > > 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. > > v6 changes: > * Flow type strings are used to replace Packet Classification Types, to isolate > hardware specific things. > * Implemented the mapping function to convert RSS offload types to Packet > Classification Types, to isolate the real hardware specific things. > * Removed initialization of global registers in i40e PMD, as global registers > shouldn't be initialized per port. > * Added more annotations to get code more understandable. > * Corrected annotation format for documenation. > > v7 changes: > * Removed swap configurations, as it is not allowed by hardware design. > * Put symmetric hash per flow type and hash function type into > 'RTE_ETH_HASH_FILTER_GLOBAL_CONFIG', as they are controlling global registers > which will affects all the ports of the same NIC. > > v8 changes: > * Removed redundant checks in i40e_ethdev.c. > * Solved compile errors on ICC. > > Helin Zhang (4): > ethdev: code style fixes > i40e: use constant as the default hash keys > i40e: support of controlling hash functions > app/testpmd: add commands to support hash functions > > app/test-pmd/cmdline.c | 333 ++++++++++++++++++++++++++++++++++++++ > lib/librte_ether/rte_eth_ctrl.h | 72 ++++++++- > lib/librte_pmd_i40e/i40e_ethdev.c | 308 +++++++++++++++++++++++++++++++++-- > 3 files changed, 699 insertions(+), 14 deletions(-) > > -- > 1.8.1.4 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
These patches mainly support configuring hash functions. In detail, - It can get/set global hash configurations. * Get/set symmetric hash enable per flow type. * Get/set hash function type. - It can get/set symmetric hash enable per port. - Four commands have been implemented in testpmd to support testing above. * get_sym_hash_ena_per_port * set_sym_hash_ena_per_port * get_hash_global_config * set_hash_global_config It also uses constant hash keys to replace runtime generating hash keys. Global initialization is added to correctly put registers to an initial state. 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. v6 changes: * Flow type strings are used to replace Packet Classification Types, to isolate hardware specific things. * Implemented the mapping function to convert RSS offload types to Packet Classification Types, to isolate the real hardware specific things. * Removed initialization of global registers in i40e PMD, as global registers shouldn't be initialized per port. * Added more annotations to get code more understandable. * Corrected annotation format for documenation. v7 changes: * Removed swap configurations, as it is not allowed by hardware design. * Put symmetric hash per flow type and hash function type into 'RTE_ETH_HASH_FILTER_GLOBAL_CONFIG', as they are controlling global registers which will affects all the ports of the same NIC. v8 changes: * Removed redundant checks in i40e_ethdev.c. * Solved compile errors on ICC. v9 changes: * Added typo fixes in rte_eth_ctrl.h. * Splitted modifications in both rte_eth_ctrl.h and i40e, one patch is for ethdev, the other one is for i40e. Helin Zhang (5): i40e: use constant as the default hash keys ethdev: code style fixes ethdev: support of configuring hash functions i40e: support of controlling hash functions app/testpmd: add commands to support hash functions app/test-pmd/cmdline.c | 333 ++++++++++++++++++++++++++++++++++++++ lib/librte_ether/rte_eth_ctrl.h | 72 ++++++++- lib/librte_pmd_i40e/i40e_ethdev.c | 308 +++++++++++++++++++++++++++++++++-- 3 files changed, 699 insertions(+), 14 deletions(-)
> These patches mainly support configuring hash functions. In detail, > - It can get/set global hash configurations. > * Get/set symmetric hash enable per flow type. > * Get/set hash function type. > - It can get/set symmetric hash enable per port. > - Four commands have been implemented in testpmd to support testing above. > * get_sym_hash_ena_per_port > * set_sym_hash_ena_per_port > * get_hash_global_config > * set_hash_global_config > > It also uses constant hash keys to replace runtime generating hash keys. > Global initialization is added to correctly put registers to an initial state. > > 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. > > v6 changes: > * Flow type strings are used to replace Packet Classification Types, to isolate > hardware specific things. > * Implemented the mapping function to convert RSS offload types to Packet > Classification Types, to isolate the real hardware specific things. > * Removed initialization of global registers in i40e PMD, as global registers > shouldn't be initialized per port. > * Added more annotations to get code more understandable. > * Corrected annotation format for documenation. > > v7 changes: > * Removed swap configurations, as it is not allowed by hardware design. > * Put symmetric hash per flow type and hash function type into > 'RTE_ETH_HASH_FILTER_GLOBAL_CONFIG', as they are controlling global registers > which will affects all the ports of the same NIC. > > v8 changes: > * Removed redundant checks in i40e_ethdev.c. > * Solved compile errors on ICC. > > v9 changes: > * Added typo fixes in rte_eth_ctrl.h. > * Splitted modifications in both rte_eth_ctrl.h and i40e, one patch is for ethdev, > the other one is for i40e. > > Helin Zhang (5): > i40e: use constant as the default hash keys > ethdev: code style fixes > ethdev: support of configuring hash functions > i40e: support of controlling hash functions > app/testpmd: add commands to support hash functions Applied Thanks
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index bbc6022..ad7b9d4 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -334,7 +334,10 @@ struct rte_eth_rss_conf { uint64_t rss_hf; /**< Hash functions to apply - see below. */ }; -/* Supported RSS offloads */ +/* + * Supported RSS offloads, below '_SHIFT' can also be used to represent + * the 'Packet Classification type (pctype)'. + */ /* for 1G & 10G */ #define ETH_RSS_IPV4_SHIFT 0 #define ETH_RSS_IPV4_TCP_SHIFT 1