From 3f5d3bd06e0730e0ec9a88e9b7212935f5da6f6f Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 24 Jun 2019 23:47:40 +0800 Subject: [PATCH] msg/async/dpdk: fix FTBFS it was broken by 3a52d3cf Signed-off-by: Kefu Chai --- src/msg/async/dpdk/DPDKStack.cc | 4 +++- src/msg/async/dpdk/DPDKStack.h | 10 ++++++---- src/msg/async/dpdk/TCP.cc | 5 +++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/msg/async/dpdk/DPDKStack.cc b/src/msg/async/dpdk/DPDKStack.cc index 3101ae57ac2..1db97c289ad 100644 --- a/src/msg/async/dpdk/DPDKStack.cc +++ b/src/msg/async/dpdk/DPDKStack.cc @@ -203,7 +203,9 @@ DPDKWorker::Impl::~Impl() _dev->unset_local_queue(id); } -int DPDKWorker::listen(entity_addr_t &sa, const SocketOptions &opt, +int DPDKWorker::listen(entity_addr_t &sa, + unsigned addr_slot, + const SocketOptions &opt, ServerSocket *sock) { ceph_assert(sa.get_family() == AF_INET); diff --git a/src/msg/async/dpdk/DPDKStack.h b/src/msg/async/dpdk/DPDKStack.h index a44ae38367f..622ff8a3c69 100644 --- a/src/msg/async/dpdk/DPDKStack.h +++ b/src/msg/async/dpdk/DPDKStack.h @@ -37,7 +37,7 @@ class DPDKServerSocketImpl : public ServerSocketImpl { typename Protocol::listener _listener; public: DPDKServerSocketImpl(Protocol& proto, uint16_t port, const SocketOptions &opt, - int type); + int type, unsigned addr_slot); int listen() { return _listener.listen(); } @@ -184,8 +184,9 @@ class NativeConnectedSocketImpl : public ConnectedSocketImpl { template DPDKServerSocketImpl::DPDKServerSocketImpl( - Protocol& proto, uint16_t port, const SocketOptions &opt, int type) - : ServerSocketImpl(type), _listener(proto.listen(port)) {} + Protocol& proto, uint16_t port, const SocketOptions &opt, + int type, unsigned addr_slot) + : ServerSocketImpl(type, addr_slot), _listener(proto.listen(port)) {} template int DPDKServerSocketImpl::accept(ConnectedSocket *s, const SocketOptions &options, entity_addr_t *out, Worker *w) { @@ -229,7 +230,8 @@ class DPDKWorker : public Worker { public: explicit DPDKWorker(CephContext *c, unsigned i): Worker(c, i) {} - virtual int listen(entity_addr_t &addr, const SocketOptions &opts, ServerSocket *) override; + virtual int listen(entity_addr_t &addr, unsigned addr_slot, + const SocketOptions &opts, ServerSocket *) override; virtual int connect(const entity_addr_t &addr, const SocketOptions &opts, ConnectedSocket *socket) override; void arp_learn(ethernet_address l2, ipv4_address l3) { _impl->_inet.learn(l2, l3); diff --git a/src/msg/async/dpdk/TCP.cc b/src/msg/async/dpdk/TCP.cc index c6397709b1a..26f29e10f75 100644 --- a/src/msg/async/dpdk/TCP.cc +++ b/src/msg/async/dpdk/TCP.cc @@ -153,9 +153,10 @@ bool ipv4_tcp::forward(forward_hash& out_hash_data, Packet& p, size_t off) } int tcpv4_listen(tcp& tcpv4, uint16_t port, const SocketOptions &opts, - int type, ServerSocket *sock) + int type, unsigned addr_slot, ServerSocket *sock) { - auto p = new DPDKServerSocketImpl>(tcpv4, port, opts, type); + auto p = new DPDKServerSocketImpl>(tcpv4, port, opts, + type, addr_slot); int r = p->listen(); if (r < 0) { delete p; -- 2.39.5