examples/l3fwd: fix validation for queue id of config tuple
authorReshma Pattan <reshma.pattan@intel.com>
Fri, 25 Mar 2016 15:13:44 +0000 (15:13 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 25 Mar 2016 18:53:00 +0000 (19:53 +0100)
commita6b450805ba18ae5768dd6f303843f8b6807e97d
treeabe5d67e50333313024e956c9b9b281206bc0ce7
parent1a95fe0be196ba80a29d5fc74481060a3c9b31b8
examples/l3fwd: fix validation for queue id of config tuple

Added validation for queue id of config parameter tuple.

This validation enforces user to enter queue ids of a port
from 0 and in sequence.

This additional validation on queue ids avoids ixgbe crash caused
by null rxq pointer access inside ixgbe_dev_rx_init.

Reason for null rxq is, L3fwd application allocates memory only for
queues passed by user. But rte_eth_dev_start tries to initialize rx
queues in sequence from 0 to nb_rx_queues,
which is not true and coredump while accessing the unallocated queue .

Fixes: af75078fece3 ("first public release")

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
examples/l3fwd/main.c