[dpdk-dev] [PATCH v5 0/5] Support configuring hash functions

Chen, Erlu erlu.chen at intel.com
Fri Nov 7 07:12:21 CET 2014


Tested-by: Erlu Chen <erlu.chen at 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 at dpdk.org] On Behalf Of Helin Zhang
Sent: Tuesday, October 21, 2014 11:15 AM
To: dev at 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 at dpdk.org] On Behalf Of Helin Zhang
Sent: Tuesday, October 21, 2014 11:15 AM
To: dev at 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



More information about the dev mailing list