app/testpmd: check socket id validity
authorLiu Xiaofeng <xiaofeng.liu@6wind.com>
Tue, 15 Apr 2014 13:51:39 +0000 (15:51 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 30 Apr 2014 12:23:09 +0000 (14:23 +0200)
commit20a0286fd2c0f03bfe06ae419c128b648f5bf9bf
treee11cd088431288624bb680070f3c446d4ba90a2b
parentc87215d0458d6d6cce35b85e5197d3b7b4c03087
app/testpmd: check socket id validity

Now socket id is from device's numa_node, if it is invalid, just set it to 0
as default to avoid crash which will be caused by the reference to
port_per_socket[socket_id].

Also one warning is displayed to user that port-numa-config and
ring-numa-config parameters should be used along with --numa for NUMA mode.

A check for NUMA_NO_CONFIG was also missing from init_fwd_stream().

Signed-off-by: Liu Xiaofeng <xiaofeng.liu@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
app/test-pmd/config.c
app/test-pmd/testpmd.c