]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
msg/async/dpdk: fix FTBFS
authorKefu Chai <kchai@redhat.com>
Mon, 24 Jun 2019 15:47:40 +0000 (23:47 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 27 Jun 2019 11:53:41 +0000 (19:53 +0800)
it was broken by 3a52d3cf

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/msg/async/dpdk/DPDKStack.cc
src/msg/async/dpdk/DPDKStack.h
src/msg/async/dpdk/TCP.cc

index 3101ae57ac2339b46f94cccc61475f9050bba9b0..1db97c289ad453eb13d8da82750476cf2ac1d706 100644 (file)
@@ -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);
index a44ae38367f9d41d781af4abfceae4299cbebcdc..622ff8a3c6945f314bdcf7a991d18f16cde48c8d 100644 (file)
@@ -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 <typename Protocol>
 DPDKServerSocketImpl<Protocol>::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 <typename Protocol>
 int DPDKServerSocketImpl<Protocol>::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);
index c6397709b1a7aecb8cbe212d6d936eb8358716b1..26f29e10f75ac2157202bbf98ac5efff3398819f 100644 (file)
@@ -153,9 +153,10 @@ bool ipv4_tcp::forward(forward_hash& out_hash_data, Packet& p, size_t off)
 }
 
 int tcpv4_listen(tcp<ipv4_traits>& tcpv4, uint16_t port, const SocketOptions &opts,
-                 int type, ServerSocket *sock)
+                 int type, unsigned addr_slot, ServerSocket *sock)
 {
-  auto p = new DPDKServerSocketImpl<tcp<ipv4_traits>>(tcpv4, port, opts, type);
+  auto p = new DPDKServerSocketImpl<tcp<ipv4_traits>>(tcpv4, port, opts,
+                                                     type, addr_slot);
   int r = p->listen();
   if (r < 0) {
     delete p;