public:
- SimplePolicyMessenger(CephContext *cct, entity_name_t name,
- string mname, uint64_t _nonce)
+ SimplePolicyMessenger(CephContext *cct, entity_name_t name)
: Messenger(cct, name)
{
}
AsyncMessenger::AsyncMessenger(CephContext *cct, entity_name_t name,
const std::string &type, string mname, uint64_t _nonce)
- : SimplePolicyMessenger(cct, name,mname, _nonce),
+ : SimplePolicyMessenger(cct, name),
dispatch_queue(cct, this, mname),
nonce(_nonce)
{
int fd() const override {
return _fd;
}
- int socket_fd() const override {
- return _fd;
- }
friend class PosixServerSocketImpl;
friend class PosixNetworkStack;
};
virtual void shutdown() = 0;
virtual void close() = 0;
virtual int fd() const = 0;
- virtual int socket_fd() const = 0;
};
class ConnectedSocket;
int fd() const {
return _csi->fd();
}
- int socket_fd() const {
- return _csi->socket_fd();
- }
explicit operator bool() const {
return _csi.get();
virtual int fd() const override {
return _conn.fd();
}
- virtual int socket_fd() const override {
- return _conn.fd();
- }
-
};
template <typename Protocol>
lderr(cct) << __func__ << " invalid queue pair type" << cpp_strerror(errno) << dendl;
ceph_abort();
}
- pd = infiniband.pd->pd;
}
int Infiniband::QueuePair::init()
return qpa.qp_state;
}
-/**
- * Return true if the queue pair is in an error state, false otherwise.
- */
-bool Infiniband::QueuePair::is_error() const
-{
- ibv_qp_attr qpa;
-
- int r = get_state();
- if (r) {
- lderr(cct) << __func__ << " failed to get state: "
- << cpp_strerror(errno) << dendl;
- return true;
- }
- return qpa.qp_state == IBV_QPS_ERR;
-}
-
-
Infiniband::CompletionChannel::CompletionChannel(CephContext *c, Infiniband &ib)
: cct(c), infiniband(ib), channel(NULL), cq(NULL), cq_events_that_need_ack(0)
{
{
}
-void Infiniband::MemoryManager::Chunk::set_offset(uint32_t o)
-{
- offset = o;
-}
-
uint32_t Infiniband::MemoryManager::Chunk::get_offset()
{
return offset;
}
-void Infiniband::MemoryManager::Chunk::set_bound(uint32_t b)
-{
- bound = b;
-}
-
uint32_t Infiniband::MemoryManager::Chunk::get_size() const
{
return bound - offset;
Chunk(ibv_mr* m, uint32_t bytes, char* buffer, uint32_t offset = 0, uint32_t bound = 0, uint32_t lkey = 0);
~Chunk();
- void set_offset(uint32_t o);
uint32_t get_offset();
- void set_bound(uint32_t b);
uint32_t get_size() const;
void prepare_read(uint32_t b);
uint32_t get_bound();
* Get the state of a QueuePair.
*/
int get_state() const;
- /**
- * Return true if the queue pair is in an error state, false otherwise.
- */
- bool is_error() const;
void add_tx_wr(uint32_t amt) { tx_wr_inflight += amt; }
void dec_tx_wr(uint32_t amt) { tx_wr_inflight -= amt; }
uint32_t get_tx_wr() const { return tx_wr_inflight; }
struct pollfd channel_poll[2];
channel_poll[0].fd = tx_cc->get_fd();
- channel_poll[0].events = POLLIN | POLLERR | POLLNVAL | POLLHUP;
+ channel_poll[0].events = POLLIN;
channel_poll[0].revents = 0;
channel_poll[1].fd = rx_cc->get_fd();
- channel_poll[1].events = POLLIN | POLLERR | POLLNVAL | POLLHUP;
+ channel_poll[1].events = POLLIN;
channel_poll[1].revents = 0;
r = 0;
perf_logger->set(l_msgr_rdma_polling, 0);
virtual void shutdown() override;
virtual void close() override;
virtual int fd() const override { return notify_fd; }
- virtual int socket_fd() const override { return tcp_fd; }
void fault();
const char* get_qp_state() { return Infiniband::qp_state_string(qp->get_state()); }
ssize_t submit(bool more);
virtual int accept(ConnectedSocket *s, const SocketOptions &opts, entity_addr_t *out, Worker *w) override;
virtual void abort_accept() override;
virtual int fd() const override { return server_setup_socket; }
- int get_fd() { return server_setup_socket; }
};
class RDMAIWARPServerSocketImpl : public RDMAServerSocketImpl {