Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/vma/dev/net_device_val.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ bool net_device_val::verify_bond_ipoib_or_eth_qp_creation()
if (guid_iter->second.size() > 1 &&
check_bond_roce_lag_exist(bond_roce_lag_path, sizeof(bond_roce_lag_path), guid_iter->second.front().c_str()) &&
check_bond_roce_lag_exist(bond_roce_lag_path, sizeof(bond_roce_lag_path), guid_iter->second.back().c_str())) {
print_roce_lag_warnings(get_ifname_link(), bond_roce_lag_path, guid_iter->second.front().c_str(), guid_iter->second.back().c_str());
print_roce_lag_warnings(get_ifname_link(), guid_iter->second.front().c_str(), guid_iter->second.back().c_str());
}
}
#endif /* DEFINED_ROCE_LAG */
Expand Down Expand Up @@ -1644,7 +1644,7 @@ bool net_device_val::verify_qp_creation(const char* ifname, enum ibv_qp_type qp_
nd_logdbg("Cant find ib_ctx for interface %s", base_ifname);
if (qp_type == IBV_QPT_RAW_PACKET && m_bond != NO_BOND) {
if (check_bond_roce_lag_exist(bond_roce_lag_path, sizeof(bond_roce_lag_path), ifname)) {
print_roce_lag_warnings(get_ifname_link(), bond_roce_lag_path);
print_roce_lag_warnings(get_ifname_link());
} else if ((p_ib_ctx = g_p_ib_ctx_handler_collection->get_ib_ctx(get_ifname_link()))
&& strstr(p_ib_ctx->get_ibname(), "bond")) {
print_roce_lag_warnings(get_ifname_link());
Expand Down
11 changes: 2 additions & 9 deletions src/vma/util/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int get_base_interface_name(const char *if_name, char *base_ifname, size_t sz_ba
return 0;
}

void print_roce_lag_warnings(char* interface, char* disable_path /* = NULL */, const char* port1 /* = NULL */, const char* port2 /* = NULL */)
void print_roce_lag_warnings(char* interface, const char* port1 /* = NULL */, const char* port2 /* = NULL */)
{
vlog_printf(VLOG_WARNING,"******************************************************************************************************\n");

Expand All @@ -154,14 +154,7 @@ void print_roce_lag_warnings(char* interface, char* disable_path /* = NULL */, c
vlog_printf(VLOG_WARNING,"* Unexpected behaviour may occur during runtime.\n");
} else {
vlog_printf(VLOG_WARNING,"* Interface %s will not be offloaded.\n", interface);
vlog_printf(VLOG_WARNING,"* VMA cannot offload the device while RoCE LAG is enabled.\n");
}

vlog_printf(VLOG_WARNING,"* Please refer to VMA Release Notes for more info\n");

if (disable_path) {
vlog_printf(VLOG_WARNING,"* In order to disable RoCE LAG please use:\n");
vlog_printf(VLOG_WARNING,"* echo 0 > %s\n", disable_path);
vlog_printf(VLOG_WARNING,"* VMA cannot offload the device;issue with RoCE LAG.\n");
}
vlog_printf(VLOG_WARNING,"******************************************************************************************************\n");
}
Expand Down
2 changes: 1 addition & 1 deletion src/vma/util/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ size_t get_vlan_base_name_from_ifname(const char* ifname, char* base_ifname, siz
size_t get_local_ll_addr(const char* ifname, unsigned char* addr, int addr_len, bool is_broadcast);

/* Print warning while RoCE Lag is enabled */
void print_roce_lag_warnings(char* interface, char* disable_path = NULL, const char* port1 = NULL, const char* port2 = NULL);
void print_roce_lag_warnings(char* interface, const char* port1 = NULL, const char* port2 = NULL);

bool check_bond_device_exist(const char* ifname);
bool get_bond_active_slave_name(IN const char* bond_name, OUT char* active_slave_name, IN int sz);
Expand Down