From e058bdc5958ba98dc20fbeddf72e2927767d6c97 Mon Sep 17 00:00:00 2001 From: YongSheng Zhang Date: Wed, 5 Dec 2018 13:48:14 +0800 Subject: [PATCH] async/dpdk: when enable dpdk, multiple message queue defect when enable dpdk, if set ms_async_op_threads value greater than 1 at "ceph.conf" file, then osd can not work. Signed-off-by: zhangyongsheng --- src/msg/async/dpdk/DPDKStack.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/msg/async/dpdk/DPDKStack.cc b/src/msg/async/dpdk/DPDKStack.cc index 2a293991cb2..3101ae57ac2 100644 --- a/src/msg/async/dpdk/DPDKStack.cc +++ b/src/msg/async/dpdk/DPDKStack.cc @@ -258,13 +258,14 @@ void DPDKStack::spawn_worker(unsigned i, std::function &&func) // cores ceph_assert(rte_lcore_count() >= i + 1); unsigned core_id; + int j = i; RTE_LCORE_FOREACH_SLAVE(core_id) { if (i-- == 0) { break; } } dpdk::eal::execute_on_master([&]() { - r = rte_eal_remote_launch(dpdk_thread_adaptor, static_cast(&funcs[i]), core_id); + r = rte_eal_remote_launch(dpdk_thread_adaptor, static_cast(&funcs[j]), core_id); if (r < 0) { lderr(cct) << __func__ << " remote launch failed, r=" << r << dendl; ceph_abort();