]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/Stack: allow to setup dpdkstack
authorHaomai Wang <haomai@xsky.com>
Fri, 5 Aug 2016 07:46:16 +0000 (15:46 +0800)
committerHaomai Wang <haomai@xsky.com>
Wed, 9 Nov 2016 03:39:20 +0000 (11:39 +0800)
Signed-off-by: Haomai Wang <haomai@xsky.com>
src/msg/async/Stack.cc

index 35cde1ce580fa34fe3e0a6cc336903688e6220ca..e60f040b059efe9240812f5e1ea8fe10c744cf98 100644 (file)
@@ -20,6 +20,9 @@
 #ifdef HAVE_RDMA
 #include "rdma/RDMAStack.h"
 #endif
+#ifdef HAVE_DPDK
+#include "dpdk/DPDKStack.h"
+#endif
 
 #include "common/dout.h"
 #include "include/assert.h"
@@ -62,6 +65,10 @@ std::shared_ptr<NetworkStack> NetworkStack::create(CephContext *c, const string
   else if (t == "rdma")
     return std::make_shared<RDMAStack>(c, t);
 #endif
+#ifdef HAVE_DPDK
+  else if (t == "dpdk")
+    return std::make_shared<DPDKStack>(c, t);
+#endif
 
   return nullptr;
 }
@@ -73,6 +80,10 @@ Worker* NetworkStack::create_worker(CephContext *c, const string &type, unsigned
 #ifdef HAVE_RDMA
   else if (type == "rdma")
     return new RDMAWorker(c, i);
+#endif
+#ifdef HAVE_DPDK
+  else if (type == "dpdk")
+    return new DPDKWorker(c, i);
 #endif
   return nullptr;
 }