From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 4EB562BCE for ; Mon, 15 Oct 2018 13:52:28 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id l6-v6so20543417wrt.1 for ; Mon, 15 Oct 2018 04:52:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KSiUxpurJqpj90PcTuU8pC+l8dzyqCpvHC+lcMvGhXM=; b=suhZ4Ho7tei4TO2qd1C8GP07ux/V8tzXgJPO9m3pjY4yMvPI5cj7WkTA+Zj399tK6y SDZ/tPyqIccbHMgwmr1S6t75gl2YesRbxVQYIpLVMZsd8D6jIA1qFTX9IL/jhXQZVM3X ysY/QKpv/yfy6C+naMAJN6RWj/Rn0nUzEyTVleEM5yJ3Y4WxRqeGONrzU2dHHmEjXs0X XP8piNFyM9mOYNj/AAQ3sQFylHtUlCYLliN7eKMFv/F4W8/YoyBZa2jci7zIrXCys3o5 /OKXKZjixrzN9a6Ggf3LiaB+/DD/cIdaEGA2NddrMWorSmXe0OnZyIcxGFS8a3bnTeb+ YAYw== X-Gm-Message-State: ABuFfojKRdRookqU2lLavqN8qwHuFROFv9tIBC86886FcENWZiWwPTXP PKsBjjhcQIb4yVifJB5xTSzdpxZr X-Google-Smtp-Source: ACcGV61Vy8Pko0NdQVrgyC5b68QGmIl3TN6TqJqb/OVwVc+2bFzxFFP8M9zaRknOLPu+fAIwSZBhcg== X-Received: by 2002:adf:e784:: with SMTP id n4-v6mr15333107wrm.187.1539604347817; Mon, 15 Oct 2018 04:52:27 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id l125-v6sm40854074wmb.1.2018.10.15.04.52.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Oct 2018 04:52:26 -0700 (PDT) From: Luca Boccassi To: Ferruh Yigit Cc: Bernard Iremonger , dpdk stable Date: Mon, 15 Oct 2018 12:51:40 +0100 Message-Id: <20181015115144.27626-20-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181015115144.27626-1-bluca@debian.org> References: <20181003162121.16364-1-bluca@debian.org> <20181015115144.27626-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'app/testpmd: fix displaying RSS hash functions' has been queued to LTS release 16.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2018 11:52:28 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/17/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Luca Boccassi --- >>From fd126c9f6d8535549005e2f312d895b6c1cca939 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Thu, 4 Oct 2018 20:24:44 +0100 Subject: [PATCH] app/testpmd: fix displaying RSS hash functions [ upstream commit 5b4557ec8d16859215fafe9e24d3fb7722f43b8a ] Command shouldn't ask RSS hash functions as argument to get supported RSS hash function, those values will be overwritten by PMD anyway. To display configured RSS hash functions "show port (port_id) rss-hash" To display configured RSS hash functions and hash key "show port (port_id) rss-hash key" Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands") Signed-off-by: Ferruh Yigit Acked-by: Bernard Iremonger --- app/test-pmd/cmdline.c | 30 ++++----------------- app/test-pmd/config.c | 11 ++------ app/test-pmd/testpmd.h | 3 +-- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +- 4 files changed, 9 insertions(+), 37 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 27e3757330..4c63eb5de6 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -190,11 +190,8 @@ static void cmd_help_long_parsed(void *parsed_result, " by masks on port X. size is used to indicate the" " hardware supported reta size\n\n" - "show port rss-hash 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 [key]\n" - " Display the RSS hash functions and RSS hash key" - " of port X\n\n" + "show port (port_id) rss-hash [key]\n" + " Display the RSS hash functions and RSS hash key of port\n\n" "clear port (info|stats|xstats|fdir|stat_qmap) (port_id|all)\n" " Clear information for port_id, or all.\n\n" @@ -2109,8 +2106,7 @@ static void cmd_showport_rss_hash_parsed(void *parsed_result, { struct cmd_showport_rss_hash *res = parsed_result; - port_rss_hash_conf_show(res->port_id, res->rss_type, - show_rss_key != NULL); + port_rss_hash_conf_show(res->port_id, show_rss_key != NULL); } cmdline_parse_token_string_t cmd_showport_rss_hash_show = @@ -2122,29 +2118,18 @@ cmdline_parse_token_num_t cmd_showport_rss_hash_port_id = cmdline_parse_token_string_t cmd_showport_rss_hash_rss_hash = TOKEN_STRING_INITIALIZER(struct cmd_showport_rss_hash, rss_hash, "rss-hash"); -cmdline_parse_token_string_t cmd_showport_rss_hash_rss_hash_info = - TOKEN_STRING_INITIALIZER(struct cmd_showport_rss_hash, rss_type, - "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"); cmdline_parse_token_string_t cmd_showport_rss_hash_rss_key = TOKEN_STRING_INITIALIZER(struct cmd_showport_rss_hash, key, "key"); cmdline_parse_inst_t cmd_showport_rss_hash = { .f = cmd_showport_rss_hash_parsed, .data = NULL, - .help_str = - "show port X rss-hash 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 (X = port number)\n", + .help_str = "show port rss-hash", .tokens = { (void *)&cmd_showport_rss_hash_show, (void *)&cmd_showport_rss_hash_port, (void *)&cmd_showport_rss_hash_port_id, (void *)&cmd_showport_rss_hash_rss_hash, - (void *)&cmd_showport_rss_hash_rss_hash_info, NULL, }, }; @@ -2152,17 +2137,12 @@ cmdline_parse_inst_t cmd_showport_rss_hash = { cmdline_parse_inst_t cmd_showport_rss_hash_key = { .f = cmd_showport_rss_hash_parsed, .data = (void *)1, - .help_str = - "show port X rss-hash 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 key (X = port number)\n", + .help_str = "show port rss-hash key", .tokens = { (void *)&cmd_showport_rss_hash_show, (void *)&cmd_showport_rss_hash_port, (void *)&cmd_showport_rss_hash_port_id, (void *)&cmd_showport_rss_hash_rss_hash, - (void *)&cmd_showport_rss_hash_rss_hash_info, (void *)&cmd_showport_rss_hash_rss_key, NULL, }, diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 130ff14803..f427a83069 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1004,9 +1004,9 @@ port_rss_reta_info(portid_t port_id, * key of the port. */ void -port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key) +port_rss_hash_conf_show(portid_t port_id, int show_rss_key) { - struct rte_eth_rss_conf rss_conf; + struct rte_eth_rss_conf rss_conf = {0}; uint8_t rss_key[RSS_HASH_KEY_LENGTH]; uint64_t rss_hf; uint8_t i; @@ -1017,7 +1017,6 @@ port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key) if (port_id_is_invalid(port_id, ENABLED_WARN)) return; - memset(&dev_info, 0, sizeof(dev_info)); rte_eth_dev_info_get(port_id, &dev_info); if (dev_info.hash_key_size > 0 && dev_info.hash_key_size <= sizeof(rss_key)) @@ -1027,12 +1026,6 @@ port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key) return; } - rss_conf.rss_hf = 0; - for (i = 0; i < RTE_DIM(rss_type_table); i++) { - if (!strcmp(rss_info, rss_type_table[i].str)) - rss_conf.rss_hf = rss_type_table[i].rss_type; - } - /* Get RSS hash key if asked to display it */ rss_conf.rss_key = (show_rss_key) ? rss_key : NULL; rss_conf.rss_key_len = hash_key_size; diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index aad598e56c..b52a19d9d4 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -579,8 +579,7 @@ int set_queue_rate_limit(portid_t port_id, uint16_t queue_idx, uint16_t rate); int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate, uint64_t q_msk); -void port_rss_hash_conf_show(portid_t port_id, char rss_info[], - int show_rss_key); +void port_rss_hash_conf_show(portid_t port_id, int show_rss_key); void port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key, uint hash_key_len); void get_syn_filter(uint8_t port_id); diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index a906974f72..45280c1c4c 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -201,7 +201,7 @@ show port rss-hash Display the RSS hash functions and RSS hash key of a port:: - testpmd> show port (port_id) rss-hash 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 [key] + testpmd> show port (port_id) rss-hash [key] clear port ~~~~~~~~~~ -- 2.19.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-10-15 12:48:35.115444338 +0100 +++ 0020-app-testpmd-fix-displaying-RSS-hash-functions.patch 2018-10-15 12:48:34.601096017 +0100 @@ -1,8 +1,10 @@ -From 5b4557ec8d16859215fafe9e24d3fb7722f43b8a Mon Sep 17 00:00:00 2001 +From fd126c9f6d8535549005e2f312d895b6c1cca939 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Thu, 4 Oct 2018 20:24:44 +0100 Subject: [PATCH] app/testpmd: fix displaying RSS hash functions +[ upstream commit 5b4557ec8d16859215fafe9e24d3fb7722f43b8a ] + Command shouldn't ask RSS hash functions as argument to get supported RSS hash function, those values will be overwritten by PMD anyway. @@ -13,22 +15,21 @@ "show port (port_id) rss-hash key" Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands") -Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit Acked-by: Bernard Iremonger --- - app/test-pmd/cmdline.c | 28 ++++----------------- + app/test-pmd/cmdline.c | 30 ++++----------------- app/test-pmd/config.c | 11 ++------ app/test-pmd/testpmd.h | 3 +-- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +- - 4 files changed, 9 insertions(+), 35 deletions(-) + 4 files changed, 9 insertions(+), 37 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c -index 3376a665cf..6a769bb82a 100644 +index 27e3757330..4c63eb5de6 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c -@@ -175,11 +175,8 @@ static void cmd_help_long_parsed(void *parsed_result, +@@ -190,11 +190,8 @@ static void cmd_help_long_parsed(void *parsed_result, " by masks on port X. size is used to indicate the" " hardware supported reta size\n\n" @@ -42,7 +43,7 @@ "clear port (info|stats|xstats|fdir|stat_qmap) (port_id|all)\n" " Clear information for port_id, or all.\n\n" -@@ -2904,8 +2901,7 @@ static void cmd_showport_rss_hash_parsed(void *parsed_result, +@@ -2109,8 +2106,7 @@ static void cmd_showport_rss_hash_parsed(void *parsed_result, { struct cmd_showport_rss_hash *res = parsed_result; @@ -52,7 +53,7 @@ } cmdline_parse_token_string_t cmd_showport_rss_hash_show = -@@ -2917,28 +2913,18 @@ cmdline_parse_token_num_t cmd_showport_rss_hash_port_id = +@@ -2122,29 +2118,18 @@ cmdline_parse_token_num_t cmd_showport_rss_hash_port_id = cmdline_parse_token_string_t cmd_showport_rss_hash_rss_hash = TOKEN_STRING_INITIALIZER(struct cmd_showport_rss_hash, rss_hash, "rss-hash"); @@ -68,10 +69,11 @@ cmdline_parse_inst_t cmd_showport_rss_hash = { .f = cmd_showport_rss_hash_parsed, .data = NULL, -- .help_str = "show port rss-hash " -- "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", +- .help_str = +- "show port X rss-hash 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 (X = port number)\n", + .help_str = "show port rss-hash", .tokens = { (void *)&cmd_showport_rss_hash_show, @@ -82,14 +84,15 @@ NULL, }, }; -@@ -2946,16 +2932,12 @@ cmdline_parse_inst_t cmd_showport_rss_hash = { +@@ -2152,17 +2137,12 @@ cmdline_parse_inst_t cmd_showport_rss_hash = { cmdline_parse_inst_t cmd_showport_rss_hash_key = { .f = cmd_showport_rss_hash_parsed, .data = (void *)1, -- .help_str = "show port rss-hash " -- "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 key", +- .help_str = +- "show port X rss-hash 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 key (X = port number)\n", + .help_str = "show port rss-hash key", .tokens = { (void *)&cmd_showport_rss_hash_show, @@ -101,10 +104,10 @@ NULL, }, diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c -index 057457a814..5bd14bce06 100644 +index 130ff14803..f427a83069 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c -@@ -1679,9 +1679,9 @@ port_rss_reta_info(portid_t port_id, +@@ -1004,9 +1004,9 @@ port_rss_reta_info(portid_t port_id, * key of the port. */ void @@ -116,7 +119,7 @@ uint8_t rss_key[RSS_HASH_KEY_LENGTH]; uint64_t rss_hf; uint8_t i; -@@ -1692,7 +1692,6 @@ port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key) +@@ -1017,7 +1017,6 @@ port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key) if (port_id_is_invalid(port_id, ENABLED_WARN)) return; @@ -124,12 +127,12 @@ rte_eth_dev_info_get(port_id, &dev_info); if (dev_info.hash_key_size > 0 && dev_info.hash_key_size <= sizeof(rss_key)) -@@ -1702,12 +1701,6 @@ port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key) +@@ -1027,12 +1026,6 @@ port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key) return; } - rss_conf.rss_hf = 0; -- for (i = 0; rss_type_table[i].str; i++) { +- for (i = 0; i < RTE_DIM(rss_type_table); i++) { - if (!strcmp(rss_info, rss_type_table[i].str)) - rss_conf.rss_hf = rss_type_table[i].rss_type; - } @@ -138,10 +141,10 @@ rss_conf.rss_key = (show_rss_key) ? rss_key : NULL; rss_conf.rss_key_len = hash_key_size; diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h -index ae6a5bd4ef..3cd4bbb3e8 100644 +index aad598e56c..b52a19d9d4 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h -@@ -716,8 +716,7 @@ int set_queue_rate_limit(portid_t port_id, uint16_t queue_idx, uint16_t rate); +@@ -579,8 +579,7 @@ int set_queue_rate_limit(portid_t port_id, uint16_t queue_idx, uint16_t rate); int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate, uint64_t q_msk); @@ -150,12 +153,12 @@ +void port_rss_hash_conf_show(portid_t port_id, int show_rss_key); void port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key, uint hash_key_len); - int rx_queue_id_is_invalid(queueid_t rxq_id); + void get_syn_filter(uint8_t port_id); diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst -index 3a73000a6c..9ef2aca9ba 100644 +index a906974f72..45280c1c4c 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst -@@ -231,7 +231,7 @@ show port rss-hash +@@ -201,7 +201,7 @@ show port rss-hash Display the RSS hash functions and RSS hash key of a port::