From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-gw2-out.broadcom.com (mail-gw2-out.broadcom.com [216.31.210.63]) by dpdk.org (Postfix) with ESMTP id 3465B29CA for ; Wed, 12 Oct 2016 23:26:34 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.31,485,1473145200"; d="scan'208";a="107708009" Received: from mail-irv-17.broadcom.com ([10.15.198.34]) by mail-gw2-out.broadcom.com with ESMTP; 12 Oct 2016 15:04:15 -0700 Received: from C02PT1RBG8WP.broadcom.com (unknown [10.45.252.77]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id D6C5981F52; Wed, 12 Oct 2016 14:26:32 -0700 (PDT) Date: Wed, 12 Oct 2016 16:26:31 -0500 From: Ajit Khaparde To: dev@dpdk.org Cc: Pablo de Lara Message-ID: <20161012212631.GA14658@C02PT1RBG8WP.broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: [dpdk-dev] [PATCH v2] app/testpmd: add support to configure 25G and 50G speeds X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2016 21:26:34 -0000 Support to configure 25G and 50G speeds is missing from testpmd. This patch also updates the testpmd user guide accordingly. Signed-off-by: Ajit Khaparde -- v2: shorten lines > 80 character limit --- app/test-pmd/cmdline.c | 16 +++++++++++----- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index a1da8b8..b8c7b8b 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -545,7 +545,7 @@ static void cmd_help_long_parsed(void *parsed_result, " Detach physical or virtual dev by port_id\n\n" "port config (port_id|all)" - " speed (10|100|1000|10000|40000|100000|auto)" + " speed (10|100|1000|10000|25000|40000|50000|100000|auto)" " duplex (half|full|auto)\n" " Set speed and duplex for all ports or port_id\n\n" @@ -1016,8 +1016,12 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed) *speed = ETH_LINK_SPEED_1G; } else if (!strcmp(speedstr, "10000")) { *speed = ETH_LINK_SPEED_10G; + } else if (!strcmp(speedstr, "25000")) { + *speed = ETH_LINK_SPEED_25G; } else if (!strcmp(speedstr, "40000")) { *speed = ETH_LINK_SPEED_40G; + } else if (!strcmp(speedstr, "50000")) { + *speed = ETH_LINK_SPEED_50G; } else if (!strcmp(speedstr, "100000")) { *speed = ETH_LINK_SPEED_100G; } else if (!strcmp(speedstr, "auto")) { @@ -1067,7 +1071,7 @@ cmdline_parse_token_string_t cmd_config_speed_all_item1 = TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, item1, "speed"); cmdline_parse_token_string_t cmd_config_speed_all_value1 = TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, value1, - "10#100#1000#10000#40000#100000#auto"); + "10#100#1000#10000#25000#40000#50000#100000#auto"); cmdline_parse_token_string_t cmd_config_speed_all_item2 = TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, item2, "duplex"); cmdline_parse_token_string_t cmd_config_speed_all_value2 = @@ -1077,7 +1081,8 @@ cmdline_parse_token_string_t cmd_config_speed_all_value2 = cmdline_parse_inst_t cmd_config_speed_all = { .f = cmd_config_speed_all_parsed, .data = NULL, - .help_str = "port config all speed 10|100|1000|10000|40000|100000|auto duplex " + .help_str = "port config all speed " + "10|100|1000|10000|25000|40000|50000|100000|auto duplex " "half|full|auto", .tokens = { (void *)&cmd_config_speed_all_port, @@ -1141,7 +1146,7 @@ cmdline_parse_token_string_t cmd_config_speed_specific_item1 = "speed"); cmdline_parse_token_string_t cmd_config_speed_specific_value1 = TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, value1, - "10#100#1000#10000#40000#100000#auto"); + "10#100#1000#10000#25000#40000#50000#100000#auto"); cmdline_parse_token_string_t cmd_config_speed_specific_item2 = TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, item2, "duplex"); @@ -1152,7 +1157,8 @@ cmdline_parse_token_string_t cmd_config_speed_specific_value2 = cmdline_parse_inst_t cmd_config_speed_specific = { .f = cmd_config_speed_specific_parsed, .data = NULL, - .help_str = "port config X speed 10|100|1000|10000|40000|100000|auto duplex " + .help_str = "port config X speed " + "10|100|1000|10000|25000|40000|50000|100000|auto duplex " "half|full|auto", .tokens = { (void *)&cmd_config_speed_specific_port, diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index f87e0c2..e1eea34 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -1167,7 +1167,7 @@ port config - speed Set the speed and duplex mode for all ports or a specific port:: - testpmd> port config (port_id|all) speed (10|100|1000|10000|40000|100000|auto) \ + testpmd> port config (port_id|all) speed (10|100|1000|10000|25000|40000|50000|100000|auto) \ duplex (half|full|auto) port config - queues/descriptors -- 2.8.4 (Apple Git-73)