summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2015-03-26 17:02:45 +0000
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-03-26 22:27:51 +0100
commit14b53e27b30ebda5740d7a3a12d5d696aeaeb04b (patch)
tree2451eaeeecb5919bddb8fba9bd382243d91bdd96 /config
parent504a29af13a7b87064f9fe0c5cc020b8a739efd3 (diff)
downloaddpdk-14b53e27b30ebda5740d7a3a12d5d696aeaeb04b.zip
dpdk-14b53e27b30ebda5740d7a3a12d5d696aeaeb04b.tar.gz
dpdk-14b53e27b30ebda5740d7a3a12d5d696aeaeb04b.tar.xz
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: 4dc294158cac ("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>
Diffstat (limited to 'config')
-rw-r--r--config/common_bsdapp1
-rw-r--r--config/common_linuxapp1
2 files changed, 2 insertions, 0 deletions
diff --git a/config/common_bsdapp b/config/common_bsdapp
index 8ff4dc2..93d2f9e 100644
--- a/config/common_bsdapp
+++ b/config/common_bsdapp
@@ -137,6 +137,7 @@ CONFIG_RTE_LIBRTE_KVARGS=y
CONFIG_RTE_LIBRTE_ETHER=y
CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=n
CONFIG_RTE_MAX_ETHPORTS=32
+CONFIG_RTE_MAX_QUEUES_PER_PORT=256
CONFIG_RTE_LIBRTE_IEEE1588=n
CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=16
CONFIG_RTE_ETHDEV_RXTX_CALLBACKS=y
diff --git a/config/common_linuxapp b/config/common_linuxapp
index 09a58ac..19de75f 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -134,6 +134,7 @@ CONFIG_RTE_LIBRTE_KVARGS=y
CONFIG_RTE_LIBRTE_ETHER=y
CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=n
CONFIG_RTE_MAX_ETHPORTS=32
+CONFIG_RTE_MAX_QUEUES_PER_PORT=256
CONFIG_RTE_LIBRTE_IEEE1588=n
CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=16
CONFIG_RTE_ETHDEV_RXTX_CALLBACKS=y