]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/dpdk/DPDKStack.cc: assert(0) -> ceph_abort()
authorLi Wang <li.wang@kylin-cloud.com>
Tue, 6 Dec 2016 08:31:45 +0000 (08:31 +0000)
committerLi Wang <li.wang@kylin-cloud.com>
Tue, 6 Dec 2016 08:32:22 +0000 (08:32 +0000)
Signed-off-by: Li Wang <li.wang@kylin-cloud.com>
src/msg/async/dpdk/DPDKStack.cc

index efe778447142a3b91b56742546a983addf7799bd..2374fcb221846cf46df7d44c936909a860973b3c 100644 (file)
@@ -109,7 +109,7 @@ void DPDKWorker::initialize()
   } else {
     // auto master = qid % sdev->hw_queues_count();
     // sdev->set_local_queue(create_proxy_net_device(master, sdev.get()));
-    assert(0);
+    ceph_abort();
   }
   if (i == 0) {
     {
@@ -120,7 +120,7 @@ void DPDKWorker::initialize()
 
     if (sdev->init_port_fini() < 0) {
       lderr(cct) << __func__ << " init_port_fini failed " << dendl;
-      assert(0);
+      ceph_abort();
     }
     Mutex::Locker l(lock);
     create_stage = DONE;
@@ -189,7 +189,7 @@ DPDKWorker::Impl::Impl(CephContext *cct, unsigned i, EventCenter *c, std::shared
                << cct->_conf->ms_dpdk_gateway_ipv4_addr << ", "
                << cct->_conf->ms_dpdk_netmask_ipv4_addr << ", "
                << dendl;
-    assert(0);
+    ceph_abort();
   }
   _inet.set_host_address(ipv4_address(std::get<0>(tuples[0])));
   _inet.set_gw_address(ipv4_address(std::get<1>(tuples[0])));
@@ -244,7 +244,7 @@ void DPDKStack::spawn_worker(unsigned i, std::function<void ()> &&func)
   r = dpdk::eal::init(cct);
   if (r < 0) {
     lderr(cct) << __func__ << " init dpdk rte failed, r=" << r << dendl;
-    assert(0);
+    ceph_abort();
   }
   // if dpdk::eal::init already called by NVMEDevice, we will select 1..n
   // cores
@@ -253,7 +253,7 @@ void DPDKStack::spawn_worker(unsigned i, std::function<void ()> &&func)
     r = rte_eal_remote_launch(dpdk_thread_adaptor, static_cast<void*>(&funcs[i]), i+1);
     if (r < 0) {
       lderr(cct) << __func__ << " remote launch failed, r=" << r << dendl;
-      assert(0);
+      ceph_abort();
     }
   });
 }