From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <xiaoyun.li@intel.com>
Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix bitmap of link speeds when force speed
Date: Wed, 14 Apr 2021 11:02:05 +0800 [thread overview]
Message-ID: <1618369325-32797-1-git-send-email-humin29@huawei.com> (raw)
In-Reply-To: <1617877348-16394-1-git-send-email-humin29@huawei.com>
From: Huisong Li <lihuisong@huawei.com>
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 <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
v2:
* When users set 10M and 100M speed, fixed bit is still set.
v2 fix the bug.
---
app/test-pmd/cmdline.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 56cf0bf..4eff5fd 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;
}
--
2.7.4
next prev parent reply other threads:[~2021-04-14 3:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-08 10:22 [dpdk-dev] [PATCH] " Min Hu (Connor)
2021-04-13 17:08 ` Ferruh Yigit
2021-04-13 17:10 ` Ajit Khaparde
2021-04-14 3:02 ` Min Hu (Connor) [this message]
2021-04-14 11:55 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1618369325-32797-1-git-send-email-humin29@huawei.com \
--to=humin29@huawei.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=xiaoyun.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).