From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 5C8895F72; Fri, 12 Apr 2019 15:12:42 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us4.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id D61A080076; Fri, 12 Apr 2019 13:12:40 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 12 Apr 2019 06:12:38 -0700 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Fri, 12 Apr 2019 06:12:37 -0700 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id x3CDCa2w019536; Fri, 12 Apr 2019 14:12:36 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 44AC416161B; Fri, 12 Apr 2019 14:12:36 +0100 (BST) From: Andrew Rybchenko To: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger CC: , Date: Fri, 12 Apr 2019 14:12:33 +0100 Message-ID: <1555074753-9098-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24546.005 X-TM-AS-Result: No-0.032400-4.000000-10 X-TMASE-MatchedRID: ri8AYtl46rOqwXfztHm9pev8QGaI25e3SV3lGyX22Zd794qAHfSq0rPy AEfYVzOl+FVAbsNxrCvMJYD0aRF0RZH0YXYnbGozFEUknJ/kEl7dB/CxWTRRu5n92B/ceXSVfE6 tEWAO4X+rnkY+qXwJCkIaWURKcL1aXHDDt0gTo2+g7RZeMcAaAuK5a0QLGQVs5W/kiTqaM+0787 VpbjtTGDoiPGxNwGO+D1y8R38S3l1URzkirO0Q1F5h9KQWrq4BvuMTr7CQJJ6JNKCbyQlUpEMMp rcbiest X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10-0.032400-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24546.005 X-MDID: 1555074761-zD44jtU90ANA Subject: [dpdk-dev] [PATCH] app/testpmd: set fixed flag when exact link speed is chosen 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: , X-List-Received-Date: Fri, 12 Apr 2019 13:12:42 -0000 Setting exact link speed makes sense if auto-negotiation is disabled. Fixed flag is required to disable auto-negotiation. Fixes: 88fbedcd5e5a ("app/testpmd: move speed and duplex parsing in a function") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko --- app/test-pmd/cmdline.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 2ab03c111..691d818a6 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -1440,17 +1440,17 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed) return -1; } if (!strcmp(speedstr, "1000")) { - *speed = ETH_LINK_SPEED_1G; + *speed = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_FIXED; } else if (!strcmp(speedstr, "10000")) { - *speed = ETH_LINK_SPEED_10G; + *speed = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_FIXED; } else if (!strcmp(speedstr, "25000")) { - *speed = ETH_LINK_SPEED_25G; + *speed = ETH_LINK_SPEED_25G | ETH_LINK_SPEED_FIXED; } else if (!strcmp(speedstr, "40000")) { - *speed = ETH_LINK_SPEED_40G; + *speed = ETH_LINK_SPEED_40G | ETH_LINK_SPEED_FIXED; } else if (!strcmp(speedstr, "50000")) { - *speed = ETH_LINK_SPEED_50G; + *speed = ETH_LINK_SPEED_50G | ETH_LINK_SPEED_FIXED; } else if (!strcmp(speedstr, "100000")) { - *speed = ETH_LINK_SPEED_100G; + *speed = ETH_LINK_SPEED_100G | ETH_LINK_SPEED_FIXED; } else if (!strcmp(speedstr, "auto")) { *speed = ETH_LINK_SPEED_AUTONEG; } else { -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 6AA34A0096 for ; Fri, 12 Apr 2019 15:12:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 55FD51B128; Fri, 12 Apr 2019 15:12:44 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 5C8895F72; Fri, 12 Apr 2019 15:12:42 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us4.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id D61A080076; Fri, 12 Apr 2019 13:12:40 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 12 Apr 2019 06:12:38 -0700 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Fri, 12 Apr 2019 06:12:37 -0700 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id x3CDCa2w019536; Fri, 12 Apr 2019 14:12:36 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 44AC416161B; Fri, 12 Apr 2019 14:12:36 +0100 (BST) From: Andrew Rybchenko To: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger CC: , Date: Fri, 12 Apr 2019 14:12:33 +0100 Message-ID: <1555074753-9098-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24546.005 X-TM-AS-Result: No-0.032400-4.000000-10 X-TMASE-MatchedRID: ri8AYtl46rOqwXfztHm9pev8QGaI25e3SV3lGyX22Zd794qAHfSq0rPy AEfYVzOl+FVAbsNxrCvMJYD0aRF0RZH0YXYnbGozFEUknJ/kEl7dB/CxWTRRu5n92B/ceXSVfE6 tEWAO4X+rnkY+qXwJCkIaWURKcL1aXHDDt0gTo2+g7RZeMcAaAuK5a0QLGQVs5W/kiTqaM+0787 VpbjtTGDoiPGxNwGO+D1y8R38S3l1URzkirO0Q1F5h9KQWrq4BvuMTr7CQJJ6JNKCbyQlUpEMMp rcbiest X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10-0.032400-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24546.005 X-MDID: 1555074761-zD44jtU90ANA Subject: [dpdk-dev] [PATCH] app/testpmd: set fixed flag when exact link speed is chosen 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" Message-ID: <20190412131233.CUwB3GIUILfTklY-J8B1Ok5UKcM3VhhZVCAn1WcwLgs@z> Setting exact link speed makes sense if auto-negotiation is disabled. Fixed flag is required to disable auto-negotiation. Fixes: 88fbedcd5e5a ("app/testpmd: move speed and duplex parsing in a function") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko --- app/test-pmd/cmdline.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 2ab03c111..691d818a6 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -1440,17 +1440,17 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed) return -1; } if (!strcmp(speedstr, "1000")) { - *speed = ETH_LINK_SPEED_1G; + *speed = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_FIXED; } else if (!strcmp(speedstr, "10000")) { - *speed = ETH_LINK_SPEED_10G; + *speed = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_FIXED; } else if (!strcmp(speedstr, "25000")) { - *speed = ETH_LINK_SPEED_25G; + *speed = ETH_LINK_SPEED_25G | ETH_LINK_SPEED_FIXED; } else if (!strcmp(speedstr, "40000")) { - *speed = ETH_LINK_SPEED_40G; + *speed = ETH_LINK_SPEED_40G | ETH_LINK_SPEED_FIXED; } else if (!strcmp(speedstr, "50000")) { - *speed = ETH_LINK_SPEED_50G; + *speed = ETH_LINK_SPEED_50G | ETH_LINK_SPEED_FIXED; } else if (!strcmp(speedstr, "100000")) { - *speed = ETH_LINK_SPEED_100G; + *speed = ETH_LINK_SPEED_100G | ETH_LINK_SPEED_FIXED; } else if (!strcmp(speedstr, "auto")) { *speed = ETH_LINK_SPEED_AUTONEG; } else { -- 2.17.1