* [dpdk-stable] [PATCH] app/testpmd: fix core dump
@ 2019-05-17 0:31 simei
0 siblings, 0 replies; only message in thread
From: simei @ 2019-05-17 0:31 UTC (permalink / raw)
To: beilei.xing; +Cc: simei, stable
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-05-17 1:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-17 0:31 [dpdk-stable] [PATCH] app/testpmd: fix core dump simei
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).