before this change, async/Stack.cc includes DPDKStack.h, which in
turn includes dpdk headers. this practically renders the dpdk::dpdk an
PUBLIC library of common_async_dpdk. as dpdk needs to be compiled
with -march=core2, we should constrain the scope of this compiler
option. hence this change.
Signed-off-by: Kefu Chai <kchai@redhat.com>
#include <tuple>
#include "common/ceph_argparse.h"
+#include "dpdk_rte.h"
#include "DPDKStack.h"
#include "DPDK.h"
#include "IP.h"
_inet.set_netmask_address(ipv4_address(std::get<2>(tuples[0])));
}
+DPDKWorker::Impl::~Impl()
+{
+ _dev->unset_local_queue(id);
+}
+
int DPDKWorker::listen(entity_addr_t &sa, const SocketOptions &opt,
ServerSocket *sock)
{
}
});
}
+
+void DPDKStack::join_worker(unsigned i)
+{
+ dpdk::eal::execute_on_master([&]() {
+ rte_eal_wait_lcore(i+1);
+ });
+}
#include "common/Tub.h"
#include "msg/async/Stack.h"
-#include "dpdk_rte.h"
-#include "DPDK.h"
#include "net.h"
#include "const.h"
#include "IP.h"
std::shared_ptr<DPDKDevice> _dev;
ipv4 _inet;
Impl(CephContext *cct, unsigned i, EventCenter *c, std::shared_ptr<DPDKDevice> dev);
- ~Impl() {
- _dev->unset_local_queue(id);
- }
+ ~Impl();
};
std::unique_ptr<Impl> _impl;
virtual bool support_local_listen_table() const override { return true; }
virtual void spawn_worker(unsigned i, std::function<void ()> &&func) override;
- virtual void join_worker(unsigned i) override {
- dpdk::eal::execute_on_master([&]() {
- rte_eal_wait_lcore(i+1);
- });
- }
+ virtual void join_worker(unsigned i) override;
};
#endif