From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E5AC9A00C5; Tue, 7 Jul 2020 07:27:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5CFB31DB02; Tue, 7 Jul 2020 07:26:44 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 781F71DAEA for ; Tue, 7 Jul 2020 07:26:43 +0200 (CEST) IronPort-SDR: xZ0SojDH2sJO0fEVJ2liyYtUSq4NFB85MzJqlW7dqGnUdbUZ/bic7iwI85KP/9t1uOZxwXTFKa acs93+Ggrwtg== X-IronPort-AV: E=McAfee;i="6000,8403,9674"; a="145640346" X-IronPort-AV: E=Sophos;i="5.75,321,1589266800"; d="scan'208";a="145640346" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 22:26:43 -0700 IronPort-SDR: REvm2/Nmidgvc6g30/XbOe8lrGbRwL99vmD2DVJ1q4HG3bwxowyINSa13YkAoc5vX6nQAxAoFa fehmRESI6jSg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,321,1589266800"; d="scan'208";a="266727861" Received: from npg-dpdk-cvl-jeffguo-01.sh.intel.com ([10.67.111.128]) by fmsmga007.fm.intel.com with ESMTP; 06 Jul 2020 22:26:41 -0700 From: Jeff Guo To: qi.z.zhang@intel.com, qiming.yang@intel.com Cc: dev@dpdk.org, jingjing.wu@intel.com, junfeng.guo@intel.com, beilei.xing@intel.com, simei.su@intel.com, jia.guo@intel.com Date: Tue, 7 Jul 2020 13:25:46 +0800 Message-Id: <20200707052546.14151-5-jia.guo@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200707052546.14151-1-jia.guo@intel.com> References: <20200621140927.20602-2-jia.guo@intel.com> <20200707052546.14151-1-jia.guo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [dpdk-dev v5 4/4] app/testpmd: add GTPU to RSS hash commands X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add testpmd cmdline support for GTPU, it could be used to configure gtpu teid hash. The commands as below: testpmd> flow create 0 ingress pattern eth / ipv4 / udp / gtpu / \ ipv4 / end actions rss types gtpu end key_len 0 queues end / end Signed-off-by: Jeff Guo --- v5->v4: no change. --- app/test-pmd/cmdline.c | 8 +++++--- app/test-pmd/config.c | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 1ac0b89dd..81c87c8c3 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -2274,7 +2274,7 @@ 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_AH | ETH_RSS_PFCP | ETH_RSS_GTPU; else if (!strcmp(res->value, "eth")) rss_conf.rss_hf = ETH_RSS_ETH; else if (!strcmp(res->value, "vlan")) @@ -2319,6 +2319,8 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf = ETH_RSS_PFCP; else if (!strcmp(res->value, "pppoe")) 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, "none")) rss_conf.rss_hf = 0; else if (!strcmp(res->value, "default")) @@ -2492,7 +2494,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"); + "l2tpv3#esp#ah#pfcp#pppoe#gtpu"); cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL); @@ -2505,7 +2507,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 " + "l2tpv3|esp|ah|pfcp|pppoe|gtpu " "", .tokens = { (void *)&cmd_config_rss_hash_key_port, diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index a0f8ea9f2..a79019f52 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -77,7 +77,8 @@ static const struct { 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_L2TPV3 | ETH_RSS_ESP | ETH_RSS_AH | ETH_RSS_PFCP | + ETH_RSS_GTPU}, { "none", 0 }, { "eth", ETH_RSS_ETH }, { "l2-src-only", ETH_RSS_L2_SRC_ONLY }, @@ -119,6 +120,7 @@ const struct rss_type_info rss_type_table[] = { { "l2tpv3", ETH_RSS_L2TPV3 }, { "pfcp", ETH_RSS_PFCP }, { "pppoe", ETH_RSS_PPPOE }, + { "gtpu", ETH_RSS_GTPU }, { NULL, 0 }, }; -- 2.20.1