From: Huisong Li Date: Wed, 14 Apr 2021 03:02:05 +0000 (+0800) Subject: app/testpmd: fix bitmap of link speeds when force speed X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=312312e928c71cb6b45aeaab2b421d059897dd07;p=dpdk.git app/testpmd: fix bitmap of link speeds when force speed Currently, when the user sets force link speed through 'link_speeds', bit(0) of 'link_speeds' is not set to 1(ETH_LINK_SPEED_FIXED), which conflicts with the definition. Fixes: 88fbedcd5e5a ("app/testpmd: move speed and duplex parsing in a function") Cc: stable@dpdk.org Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) Acked-by: Ferruh Yigit Acked-by: Ajit Khaparde --- diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index ec98ccc652..5bf1497f2b 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -1525,6 +1525,9 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed) } } + if (*speed != ETH_LINK_SPEED_AUTONEG) + *speed |= ETH_LINK_SPEED_FIXED; + return 0; }