OPTION(xio_mp_max_page, OPT_INT, 4096) // max 1K chunks
OPTION(xio_mp_max_hint, OPT_INT, 4096) // max size-hint chunks
OPTION(xio_portal_threads, OPT_INT, 2) // xio portal threads per messenger
+OPTION(xio_transport_type, OPT_STR, "rdma") // xio transport type: {rdma or tcp}
DEFAULT_SUBSYS(0, 5)
SUBSYS(lockdep, 0, 1)
}
/* free functions */
-static string xio_uri_from_entity(const entity_addr_t& addr, bool want_port)
+static string xio_uri_from_entity(const string &type,
+ const entity_addr_t& addr, bool want_port)
{
const char *host = NULL;
char addr_buf[129];
+ string xio_uri;
switch(addr.addr.ss_family) {
case AF_INET:
break;
};
+ if (type == "rdma" || type == "tcp")
+ xio_uri = type + "://";
+ else
+ xio_uri = "rdma://";
+
/* The following can only succeed if the host is rdma-capable */
- string xio_uri = "rdma://";
xio_uri += host;
if (want_port) {
xio_uri += ":";
entity_addr_t shift_addr = *a;
- string base_uri = xio_uri_from_entity(shift_addr, false /* want_port */);
+ string base_uri = xio_uri_from_entity(cct->_conf->xio_transport_type,
+ shift_addr, false /* want_port */);
ldout(cct,4) << "XioMessenger " << this << " bind: xio_uri "
<< base_uri << ':' << shift_addr.get_port() << dendl;
}
else {
conns_sp.unlock();
- string xio_uri = xio_uri_from_entity(dest.addr, true /* want_port */);
+ string xio_uri = xio_uri_from_entity(cct->_conf->xio_transport_type,
+ dest.addr, true /* want_port */);
ldout(cct,4) << "XioMessenger " << this << " get_connection: xio_uri "
<< xio_uri << dendl;