Skip to content

Commit

Permalink
msg/async/Stack: allow to setup dpdkstack
Browse files Browse the repository at this point in the history
Signed-off-by: Haomai Wang <haomai@xsky.com>
  • Loading branch information
yuyuyu101 committed Aug 17, 2016
1 parent 5bfc111 commit 8875153
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/msg/async/Stack.cc
Expand Up @@ -17,6 +17,9 @@
#include "common/Cond.h"
#include "common/errno.h"
#include "PosixStack.h"
#ifdef HAVE_DPDK
#include "dpdk/DPDKStack.h"
#endif

#include "common/dout.h"
#include "include/assert.h"
Expand Down Expand Up @@ -55,6 +58,10 @@ std::shared_ptr<NetworkStack> NetworkStack::create(CephContext *c, const string
{
if (t == "posix")
return std::make_shared<PosixNetworkStack>(c, t);
#ifdef HAVE_DPDK
else if (t == "dpdk")
return std::make_shared<DPDKStack>(c, t);
#endif

return nullptr;
}
Expand All @@ -63,6 +70,10 @@ Worker* NetworkStack::create_worker(CephContext *c, const string &type, unsigned
{
if (type == "posix")
return new PosixWorker(c, i);
#ifdef HAVE_DPDK
else if (type == "dpdk")
return new DPDKWorker(c, i);
#endif
return nullptr;
}

Expand Down

0 comments on commit 8875153

Please sign in to comment.