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 BEC26A2F18 for ; Thu, 3 Oct 2019 13:36:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D564E1C07C; Thu, 3 Oct 2019 13:36:02 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 88B441C0AF for ; Thu, 3 Oct 2019 13:36:00 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Oct 2019 04:36:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,251,1566889200"; d="scan'208";a="216783113" Received: from unknown (HELO npg-dpdk-cvl-simeisu-118d193.sh.intel.com) ([10.67.110.183]) by fmsmga004.fm.intel.com with ESMTP; 03 Oct 2019 04:35:59 -0700 From: Simei Su To: qi.z.zhang@intel.com, xiaolong.ye@intel.com, ferruh.yigit@intel.com Cc: dev@dpdk.org, simei.su@intel.com Date: Thu, 3 Oct 2019 19:35:17 +0800 Message-Id: <1570102517-41280-4-git-send-email-simei.su@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1570102517-41280-1-git-send-email-simei.su@intel.com> References: <1569940564-311988-1-git-send-email-simei.su@intel.com> <1570102517-41280-1-git-send-email-simei.su@intel.com> Subject: [dpdk-dev] [PATCH v9 3/3] app/testpmd: add RSS offload types extending support 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" This patch adds cmdline support for extended rss types configuration. Signed-off-by: Simei Su Reviewed-by: Qi Zhang --- app/test-pmd/cmdline.c | 18 +++++++++++++++--- app/test-pmd/config.c | 4 ++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index def471d..f5c0cde 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -2189,7 +2189,9 @@ struct cmd_config_rss { if (!strcmp(res->value, "all")) rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_TCP | ETH_RSS_UDP | ETH_RSS_SCTP | - ETH_RSS_L2_PAYLOAD; + ETH_RSS_L2_PAYLOAD | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY | ETH_RSS_L4_DST_ONLY; else if (!strcmp(res->value, "ip")) rss_conf.rss_hf = ETH_RSS_IP; else if (!strcmp(res->value, "udp")) @@ -2208,6 +2210,14 @@ struct cmd_config_rss { rss_conf.rss_hf = ETH_RSS_GENEVE; else if (!strcmp(res->value, "nvgre")) rss_conf.rss_hf = ETH_RSS_NVGRE; + else if (!strcmp(res->value, "l3-src-only")) + rss_conf.rss_hf = ETH_RSS_L3_SRC_ONLY; + else if (!strcmp(res->value, "l3-dst-only")) + rss_conf.rss_hf = ETH_RSS_L3_DST_ONLY; + else if (!strcmp(res->value, "l4-src-only")) + rss_conf.rss_hf = ETH_RSS_L4_SRC_ONLY; + else if (!strcmp(res->value, "l4-dst-only")) + rss_conf.rss_hf = ETH_RSS_L4_DST_ONLY; else if (!strcmp(res->value, "none")) rss_conf.rss_hf = 0; else if (!strcmp(res->value, "default")) @@ -2375,7 +2385,8 @@ struct cmd_config_rss_hash_key { "ipv4#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#" "ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#" "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" - "ipv6-tcp-ex#ipv6-udp-ex"); + "ipv6-tcp-ex#ipv6-udp-ex#" + "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only"); cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL); @@ -2385,7 +2396,8 @@ struct cmd_config_rss_hash_key { .help_str = "port config rss-hash-key " "ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" - "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex " + "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" + "l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " "", .tokens = { (void *)&cmd_config_rss_hash_key_port, diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index a3b6cbd..5022d42 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -103,6 +103,10 @@ { "tcp", ETH_RSS_TCP }, { "sctp", ETH_RSS_SCTP }, { "tunnel", ETH_RSS_TUNNEL }, + { "l3-src-only", ETH_RSS_L3_SRC_ONLY }, + { "l3-dst-only", ETH_RSS_L3_DST_ONLY }, + { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, + { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, { NULL, 0 }, }; -- 1.8.3.1