numam-dpdk/lib/librte_ether
Bruce Richardson 14b53e27b3 ethdev: fix crash with multiprocess
The data structure for the rx and tx callbacks is local to each process
since it contains function pointers and cannot be shared between
different unique binaries. However, because it is not in
rte_eth_dev_data structure, the array is not getting initialized for
secondary processes - neither is it getting appropriately resized if the
number of RX/TX queues changes. This causes crashes in secondary
processes as they dereference a null pointer in struct rte_eth_dev.

This patch fixes this by introducing an upper-bound on the number of
queues per port that can be configured, and then uses this to make the
array statically sized, thereby avoiding the crashes.

Fixes: 4dc294158c ("ethdev: support optional Rx and Tx callbacks")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-03-26 22:27:51 +01:00
..
Makefile mk: add library version extension 2015-02-03 16:56:58 +01:00
rte_eth_ctrl.h ethdev: unification of flow types 2015-02-22 23:56:20 +01:00
rte_ethdev.c ethdev: fix crash with multiprocess 2015-03-26 22:27:51 +01:00
rte_ethdev.h ethdev: fix crash with multiprocess 2015-03-26 22:27:51 +01:00
rte_ether_version.map ethdev: add missing symbol export for port release 2015-03-05 21:58:07 +01:00
rte_ether.h ether: add transparent ethernet bridging type 2015-02-23 16:25:55 +01:00