Compare commits

..

3 Commits

Author SHA1 Message Date
Vitaliy Filippov 4f3a45da29 Add an alternative RDMA implementation via RDMA-CM
Required for non-RoCE cards: iWARP and, possibly, Infiniband
2025-03-31 20:34:20 +03:00
Vitaliy Filippov a4b6a83998 Support multiple RDMA networks 2025-03-31 20:34:20 +03:00
Vitaliy Filippov 24f6c5d251 Support multiple OSD networks and separate OSD cluster network 2025-03-31 20:34:20 +03:00
2 changed files with 12 additions and 4 deletions

View File

@ -169,7 +169,15 @@ void osd_t::parse_config(bool init)
else
immediate_commit = IMMEDIATE_NONE;
// Bind address
bind_address = config["bind_address"].string_value();
cfg_bind_addresses.clear();
if (config.find("bind_address") != config.end())
{
if (config["bind_address"].is_string())
cfg_bind_addresses.push_back(config["bind_address"].string_value());
else if (config["bind_address"].is_array())
for (auto & addr: config["bind_address"].array_items())
cfg_bind_addresses.push_back(addr.string_value());
}
bind_port = config["bind_port"].uint64_value();
if (bind_port <= 0 || bind_port > 65535)
bind_port = 0;
@ -332,9 +340,9 @@ void osd_t::parse_config(bool init)
void osd_t::bind_socket()
{
if (bind_address != "")
if (cfg_bind_addresses.size())
{
bind_addresses.push_back(bind_address);
bind_addresses = cfg_bind_addresses;
}
else if (msgr.all_osd_network_masks.size())
{

View File

@ -107,7 +107,7 @@ class osd_t
bool no_recovery = false;
bool no_scrub = false;
bool allow_net_split = false;
std::string bind_address;
std::vector<std::string> cfg_bind_addresses;
int bind_port, listen_backlog = 128;
bool use_rdmacm = false;
bool disable_tcp = false;