]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
async/dpdk: when enable dpdk, multiple message queue defect 25404/head
authorYongSheng Zhang <ptozys@gmail.com>
Wed, 5 Dec 2018 05:48:14 +0000 (13:48 +0800)
committerYongSheng Zhang <ptozys@gmail.com>
Wed, 5 Dec 2018 06:52:43 +0000 (14:52 +0800)
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 <ptozys@gmail.com>
src/msg/async/dpdk/DPDKStack.cc

index 2a293991cb2187f5d5bfe829e0d5fb55aa8bb602..3101ae57ac2339b46f94cccc61475f9050bba9b0 100644 (file)
@@ -258,13 +258,14 @@ void DPDKStack::spawn_worker(unsigned i, std::function<void ()> &&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<void*>(&funcs[i]), core_id);
+    r = rte_eal_remote_launch(dpdk_thread_adaptor, static_cast<void*>(&funcs[j]), core_id);
     if (r < 0) {
       lderr(cct) << __func__ << " remote launch failed, r=" << r << dendl;
       ceph_abort();