From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <erlu.chen@intel.com>
Received: from mga11.intel.com (mga11.intel.com [192.55.52.93])
 by dpdk.org (Postfix) with ESMTP id F1ADF2E89
 for <dev@dpdk.org>; Fri,  7 Nov 2014 04:37:30 +0100 (CET)
Received: from fmsmga003.fm.intel.com ([10.253.24.29])
 by fmsmga102.fm.intel.com with ESMTP; 06 Nov 2014 19:47:00 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="412806632"
Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82])
 by FMSMGA003.fm.intel.com with ESMTP; 06 Nov 2014 19:38:22 -0800
Received: from pgsmsx106.gar.corp.intel.com (10.221.44.98) by
 PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS)
 id 14.3.195.1; Fri, 7 Nov 2014 11:45:47 +0800
Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by
 pgsmsx106.gar.corp.intel.com (10.221.44.98) with Microsoft SMTP Server (TLS)
 id 14.3.195.1; Fri, 7 Nov 2014 11:45:47 +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;
 Fri, 7 Nov 2014 11:45:45 +0800
From: "Chen, Erlu" <erlu.chen@intel.com>
To: "Zhang, Helin" <helin.zhang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH v5 0/5] Support configuring hash functions
Thread-Index: AQHP7N1MAfqrQLTqyEehAzFmib4YxZxUoJHQ
Date: Fri, 7 Nov 2014 03:45:45 +0000
Message-ID: <57080872D7808940A39EED8613FE035E4C945A@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 <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>
X-List-Received-Date: Fri, 07 Nov 2014 03:37:31 -0000

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: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 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
--------------------
=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", 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"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