From: Zhou Zhenghua <zhenghuax.zhou@intel.com>
To: Wenzhuo Lu <wenzhuo.lu@intel.com>,
Beilei Xing <beilei.xing@intel.com>,
Bernard Iremonger <bernard.iremonger@intel.com>
Cc: dev@dpdk.org, Zhou Zhenghua <zhenghuax.zhou@intel.com>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH] app/testpmd: don't allow to dynamic change nbcore
Date: Tue, 27 Oct 2020 06:42:52 +0000 [thread overview]
Message-ID: <20201027064252.9624-1-zhenghuax.zhou@intel.com> (raw)
When changing the number of forwarding cores in runtime, two issues may be
encountered:
- If the setting nbcore little than current nbcore, the forwarding
thread will still running on the extra cores. Therefore, trying to
stop forwarding will hang testpmd, since it will wait for the extra
cores to stop.
- If the setting nbcore greate than actual nbcore, the newly added
cores are not allocated resources.
This will face the problem of dynamic resource allocation, so it's not
allow to changes nbcore number when forwarding is running.
Fixes: 0c0db76f42ed ("app/testpmd: separate forward config setup from display")
Cc: bernard.iremonger@intel.com
Cc: stable@dpdk.org
Signed-off-by: Zhou Zhenghua <zhenghuax.zhou@intel.com>
---
app/test-pmd/config.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 1668ae323..e9245053d 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3504,6 +3504,10 @@ set_fwd_lcores_mask(uint64_t lcoremask)
void
set_fwd_lcores_number(uint16_t nb_lc)
{
+ if (test_done == 0) {
+ printf("Please stop forwarding first\n");
+ return;
+ }
if (nb_lc > nb_cfg_lcores) {
printf("nb fwd cores %u > %u (max. number of configured "
"lcores) - ignored\n",
--
2.17.1
next reply other threads:[~2020-10-27 6:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 6:42 Zhou Zhenghua [this message]
2020-10-29 4:43 ` [dpdk-stable] [dpdk-dev] " Dharmik Thakkar
2020-10-30 10:46 ` Ferruh Yigit
2020-11-02 15:20 ` 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=20201027064252.9624-1-zhenghuax.zhou@intel.com \
--to=zhenghuax.zhou@intel.com \
--cc=beilei.xing@intel.com \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=wenzhuo.lu@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).