Merge pull request #25404 from ptozys/master

async/dpdk: when enable dpdk, multiple message queue defect

Reviewed-by: Haomai Wang <haomai@xsky.com>
This commit is contained in:
Kefu Chai 2018-12-11 14:21:22 +08:00 committed by GitHub
commit b88de88059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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();