_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);
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();
}
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) {
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);
}
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;