From: simei <simei.su@intel.com>
To: beilei.xing@intel.com
Cc: simei <simei.su@intel.com>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH] app/testpmd: fix core dump
Date: Fri, 17 May 2019 08:31:25 +0800 [thread overview]
Message-ID: <1558053085-142955-1-git-send-email-simei.su@intel.com> (raw)
This patch avoids NULL pointer exception when starting VF testpmd
with setting rx queue number and tx queue number with 0.
Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")
Cc: stable@dpdk.org
Signed-off-by: Simei Su <simei.su@intel.com>
---
app/test-pmd/cmdline.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index c1042dd..ab24c86 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1829,7 +1829,7 @@ struct cmd_config_rx_tx {
return;
}
if (!strcmp(res->name, "rxq")) {
- if (!res->value && !nb_txq) {
+ if (!res->value && nb_txq) {
printf("Warning: Either rx or tx queues should be non zero\n");
return;
}
@@ -1838,7 +1838,7 @@ struct cmd_config_rx_tx {
nb_rxq = res->value;
}
else if (!strcmp(res->name, "txq")) {
- if (!res->value && !nb_rxq) {
+ if (!res->value && nb_rxq) {
printf("Warning: Either rx or tx queues should be non zero\n");
return;
}
--
1.8.3.1
reply other threads:[~2019-05-17 1:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1558053085-142955-1-git-send-email-simei.su@intel.com \
--to=simei.su@intel.com \
--cc=beilei.xing@intel.com \
--cc=stable@dpdk.org \
/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).