patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: dev@dpdk.org, jingjing.wu@intel.com
Cc: bruce.richardson@intel.com, stable@dpdk.org
Subject: [dpdk-stable] [PATCH 1/2] app/testpmd: fix crash at mbuf pool creation
Date: Mon, 24 Apr 2017 14:33:57 +0200	[thread overview]
Message-ID: <20170424123358.5959-1-olivier.matz@6wind.com> (raw)

Since
commit 999b2ee0fe45 ("app/testpmd: enable NUMA support by default"),
testpmd is started with numa enabled by default. This highlights a
floating point exception when started with --total-num-mbufs without any
port (division by 0). This bug was already triggered before this commit
if the --no-numa option was given.

This commit adds a check of the nb_ports value before doing the
division. By looking at this code, it appears that the creation of the
mbuf pool is not consistent for the number of mbufs depending on the
configuration. This is fixed in the next commit.

Fixes: b6ea6408fbc7 ("ethdev: store numa_node per device")

CC: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 app/test-pmd/testpmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 3a573480d..f61f31344 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -597,7 +597,7 @@ init_config(void)
 		uint8_t i;
 		unsigned int nb_mbuf;
 
-		if (param_total_num_mbufs)
+		if (param_total_num_mbufs && nb_ports != 0)
 			nb_mbuf_per_pool = nb_mbuf_per_pool/nb_ports;
 
 		for (i = 0; i < max_socket; i++) {
-- 
2.11.0

             reply	other threads:[~2017-04-24 12:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24 12:33 Olivier Matz [this message]
2017-04-24 12:33 ` [dpdk-stable] [PATCH 2/2] app/testpmd: fix number of mbufs in pool Olivier Matz
2017-04-28  9:04   ` Wu, Jingjing
2017-04-28  8:51 ` [dpdk-stable] [PATCH 1/2] app/testpmd: fix crash at mbuf pool creation Wu, Jingjing
2017-05-01 13:18   ` Thomas Monjalon

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=20170424123358.5959-1-olivier.matz@6wind.com \
    --to=olivier.matz@6wind.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@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).