Olivier Matz 3c1a5444d4 app/testpmd: fix crash at mbuf pool creation
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>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-05-01 15:14:31 +02:00
..
2017-04-20 22:29:22 +02:00
2017-03-10 14:11:56 +01:00
2017-01-15 19:16:48 +01:00
2017-01-15 19:16:48 +01:00
2017-03-27 23:28:43 +02:00
2017-01-15 19:16:48 +01:00