Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UCT/IB: Fix out-of-box RoCE LAG on MLNX_OFED 5.x #124

Merged
merged 1 commit into from
Jan 19, 2021
Merged
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
8 changes: 0 additions & 8 deletions src/uct/ib/base/ib_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1316,14 +1316,6 @@ unsigned uct_ib_device_get_roce_lag_level(uct_ib_device_t *dev, uint8_t port_num
char ndev_name[IFNAMSIZ];
unsigned roce_lag_level;
ucs_status_t status;
long lag_enable;

status = ucs_read_file_number(&lag_enable, 1, UCT_IB_DEVICE_SYSFS_FMT,
uct_ib_device_name(dev), "roce_lag_enable");
if ((status != UCS_OK) || !lag_enable) {
ucs_debug("RoCE LAG is disabled on %s", uct_ib_device_name(dev));
return 1;
}

status = uct_ib_device_get_roce_ndev_name(dev, port_num, gid_index,
ndev_name, sizeof(ndev_name));
Expand Down
8 changes: 6 additions & 2 deletions src/uct/ib/base/ib_iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ void uct_ib_iface_fill_ah_attr_from_gid_lid(uct_ib_iface_t *iface, uint16_t lid,
unsigned path_index,
struct ibv_ah_attr *ah_attr)
{
uint16_t udp_sport;
uint8_t path_bits;

memset(ah_attr, 0, sizeof(*ah_attr));
Expand All @@ -528,8 +529,11 @@ void uct_ib_iface_fill_ah_attr_from_gid_lid(uct_ib_iface_t *iface, uint16_t lid,
ah_attr->grh.traffic_class = iface->config.traffic_class;

if (uct_ib_iface_is_roce(iface)) {
ah_attr->dlid = UCT_IB_ROCE_UDP_SRC_PORT_BASE |
(iface->config.roce_path_factor * path_index);
udp_sport = iface->config.roce_path_factor * path_index;
/* older drivers use dlid for udp.sport, new drivers use flow_label when
its nonzero */
ah_attr->dlid = UCT_IB_ROCE_UDP_SRC_PORT_BASE | udp_sport;
ah_attr->grh.flow_label = ~udp_sport;
} else {
/* TODO iface->path_bits should be removed and replaced by path_index */
path_bits = iface->path_bits[path_index %
Expand Down