From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 91259A04E6;
	Wed, 18 Nov 2020 02:44:46 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id C1070C8CC;
	Wed, 18 Nov 2020 02:44:15 +0100 (CET)
Received: from mga06.intel.com (mga06.intel.com [134.134.136.31])
 by dpdk.org (Postfix) with ESMTP id C4881593A
 for <dev@dpdk.org>; Wed, 18 Nov 2020 02:44:13 +0100 (CET)
IronPort-SDR: f1KkmJF1c5EHbvtoQYqNKyvDhhZ4BeUS/87PPadv+l2guEpyyqUSRb9cF46ZA8O0g+e+tSMjBf
 Uz1Qnp1Cg74Q==
X-IronPort-AV: E=McAfee;i="6000,8403,9808"; a="232662681"
X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="232662681"
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga005.fm.intel.com ([10.253.24.32])
 by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 17 Nov 2020 17:44:13 -0800
IronPort-SDR: Hq+uQFtRlJDPty92GclBJEXiSNg0VyrqkWgwWGxR3bsED30+QQ9lnPjTH0IBH1qYkhoJkH2pgU
 +EI0pwbKbJzg==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="534030812"
Received: from unknown (HELO npg-dpdk-cvl-simeisu-118d193.sh.intel.com)
 ([10.67.119.195])
 by fmsmga005.fm.intel.com with ESMTP; 17 Nov 2020 17:44:11 -0800
From: Simei Su <simei.su@intel.com>
To: ferruh.yigit@intel.com,
	qi.z.zhang@intel.com
Cc: dev@dpdk.org, junfeng.guo@intel.com, yahui.cao@intel.com,
 xiao.zhang@intel.com, Simei Su <simei.su@intel.com>
Date: Wed, 18 Nov 2020 09:34:49 +0800
Message-Id: <20201118013449.106762-3-simei.su@intel.com>
X-Mailer: git-send-email 2.9.5
In-Reply-To: <20201118013449.106762-1-simei.su@intel.com>
References: <20201116053238.440870-1-simei.su@intel.com>
 <20201118013449.106762-1-simei.su@intel.com>
Subject: [dpdk-dev] [PATCH v2 2/2] app/testpmd: support extended RSS offload
	types
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

This patch adds testpmd cmdline support for eCPRI.

Signed-off-by: Simei Su <simei.su@intel.com>
---
 app/test-pmd/cmdline.c                      | 13 ++++++++-----
 app/test-pmd/config.c                       |  3 ++-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  2 +-
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 5e2881e..bde0de5 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -788,7 +788,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"receive buffers available.\n\n"
 
 			"port config all rss (all|default|ip|tcp|udp|sctp|"
-			"ether|port|vxlan|geneve|nvgre|vxlan-gpe|none|level-default|"
+			"ether|port|vxlan|geneve|nvgre|vxlan-gpe|ecpri|none|level-default|"
 			"level-outer|level-inner|<flowtype_id>)\n"
 			"    Set the RSS mode.\n\n"
 
@@ -2164,7 +2164,8 @@ cmd_config_rss_parsed(void *parsed_result,
 		rss_conf.rss_hf = ETH_RSS_ETH | ETH_RSS_VLAN | ETH_RSS_IP |
 			ETH_RSS_TCP | ETH_RSS_UDP | ETH_RSS_SCTP |
 			ETH_RSS_L2_PAYLOAD | ETH_RSS_L2TPV3 | ETH_RSS_ESP |
-			ETH_RSS_AH | ETH_RSS_PFCP | ETH_RSS_GTPU;
+			ETH_RSS_AH | ETH_RSS_PFCP | ETH_RSS_GTPU |
+			ETH_RSS_ECPRI;
 	else if (!strcmp(res->value, "eth"))
 		rss_conf.rss_hf = ETH_RSS_ETH;
 	else if (!strcmp(res->value, "vlan"))
@@ -2223,6 +2224,8 @@ cmd_config_rss_parsed(void *parsed_result,
 		rss_conf.rss_hf = ETH_RSS_PPPOE;
 	else if (!strcmp(res->value, "gtpu"))
 		rss_conf.rss_hf = ETH_RSS_GTPU;
+	else if (!strcmp(res->value, "ecpri"))
+		rss_conf.rss_hf = ETH_RSS_ECPRI;
 	else if (!strcmp(res->value, "none"))
 		rss_conf.rss_hf = 0;
 	else if (!strcmp(res->value, "level-default")) {
@@ -2293,7 +2296,7 @@ cmdline_parse_inst_t cmd_config_rss = {
 	.data = NULL,
 	.help_str = "port config all rss "
 		"all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|"
-		"nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|none|level-default|"
+		"nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|ecpri|none|level-default|"
 		"level-outer|level-inner|<flowtype_id>",
 	.tokens = {
 		(void *)&cmd_config_rss_port,
@@ -2407,7 +2410,7 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type =
 				 "ipv6-tcp-ex#ipv6-udp-ex#"
 				 "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
 				 "l2-src-only#l2-dst-only#s-vlan#c-vlan#"
-				 "l2tpv3#esp#ah#pfcp#pppoe#gtpu");
+				 "l2tpv3#esp#ah#pfcp#pppoe#gtpu#ecpri");
 cmdline_parse_token_string_t cmd_config_rss_hash_key_value =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
 
@@ -2420,7 +2423,7 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {
 		"l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
 		"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|"
 		"l2-src-only|l2-dst-only|s-vlan|c-vlan|"
-		"l2tpv3|esp|ah|pfcp|pppoe|gtpu "
+		"l2tpv3|esp|ah|pfcp|pppoe|gtpu|ecpri "
 		"<string of hex digits (variable length, NIC dependent)>",
 	.tokens = {
 		(void *)&cmd_config_rss_hash_key_port,
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 91e7542..b51de59 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -87,7 +87,7 @@ const struct rss_type_info rss_type_table[] = {
 	{ "all", ETH_RSS_ETH | ETH_RSS_VLAN | ETH_RSS_IP | ETH_RSS_TCP |
 		ETH_RSS_UDP | ETH_RSS_SCTP | ETH_RSS_L2_PAYLOAD |
 		ETH_RSS_L2TPV3 | ETH_RSS_ESP | ETH_RSS_AH | ETH_RSS_PFCP |
-		ETH_RSS_GTPU},
+		ETH_RSS_GTPU | ETH_RSS_ECPRI},
 	{ "none", 0 },
 	{ "eth", ETH_RSS_ETH },
 	{ "l2-src-only", ETH_RSS_L2_SRC_ONLY },
@@ -136,6 +136,7 @@ const struct rss_type_info rss_type_table[] = {
 	{ "pfcp", ETH_RSS_PFCP },
 	{ "pppoe", ETH_RSS_PPPOE },
 	{ "gtpu", ETH_RSS_GTPU },
+	{ "ecpri", ETH_RSS_ECPRI },
 	{ NULL, 0 },
 };
 
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index ebf7e68..9be4500 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2270,7 +2270,7 @@ port config - RSS
 
 Set the RSS (Receive Side Scaling) mode on or off::
 
-   testpmd> port config all rss (all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|none)
+   testpmd> port config all rss (all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|ecpri|none)
 
 RSS is on by default.
 
-- 
2.9.5