-
Notifications
You must be signed in to change notification settings - Fork 29
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
libpsm2 cannot find sysfs entry for hfi1_0 on rdma-core v24.0 #43
Comments
This change would cause massive problems for much of OPA software, not just the psm2 library, and I do not believe Intel was consulted on this change. I'm not sure how changing device names to vary by each machine they are installed on makes them more "predictable". |
This came up again while testing libpsm2 on debian/bullseye. Agreed that the use of the "predictable device name" instead of hfi1_0 would necessitate a lot of change in the other packages. I have a udev rule that renames the device as hfi1_0, which resolves this issue. Should that rule be packaged with libpsm2? If so, I will submit a pull request. |
@bsmith94 I'm consulting with my co-workers, but I think we all agree that a new udev rule is the preferred route, but I don't think the fix should be in libpms2 because it would affect more than just psm users. The persistent naming change is also going to impact all the command line utilities, the fabric manager, etc. I'm also a bit concerned that a Finally, there's the issue of what impact a new udev rule would have on systems that don't have persistent renaming. It would be hard for us to add the change if it's going to negatively impact the majority of our users. Right now I see a couple of approaches we could take:
Thoughts? |
@bsmith94, sorry for the delay in response, we were discussing internally whether this is a fix we need to include in our release or to file an issue with the linux-rdma maintainers. After much discussion, we decided that since rdma-core was doing the rename with a user space tool called through a udev rule, that the default udev rule provided by rdma-core needs to change to exclude hfi1 from their rule to rename. I have filed a patch upstream to the maintainers of linux-rdma to change the default rename behavior. I will update further if and when they accept the patch. |
Thanks for the update. |
Is there any further update to this issue? We are likely hitting the same problem on our Ubuntu 22.04 machines with the included OPA packages and libfabric.
opainfo
|
If I set
|
This is an issue with the RDMA user library. There is a long drawn out argument on the mailing list about this. I will link at the bottom, but to save you the time: Create/edit /etc/udev/rules.d/rdma-perisistent-naming-rules: |
Is the naming fix required for OPX or can we run without it? |
OK I just tested and OPX works on the same node without any modifications. This is good to know. |
I'm gonna direct that question to @charlesshereda or one of his crew. |
I spoke too soon. I can create an OPX endpoint on my machine, but I can't actually communicate from the looks of it.
|
I'm a little behind on everything but I'll either take a look at this or have someone else look next week. |
Hi @raffenet,
OPX does not support HFI_SYSFS_PATH and is hardcoded to use /sys/class/infiniband/hfi1_x. Is there a requirement such that the udev rule will not work long term? |
libpsm2 looks for sysfs entries under the path /sys/class/infiniband/hfi1_x. With rdma-core v24.0, the device is renamed according to its device type, PCI bus and device, a la "predictable interface names". This is described at https://patchwork.kernel.org/cover/10870443/ .
On my host, the sysfs path for hfi1_0 is /sys/class/infiniband/opap129s. Thus, libpsm2 fails to find the hfi1_0 sysfs entry in hfi_sysfs_port_open.
The behavior can be observed by executing fi_info on a Debian sid/bullseye host with libfabric-bin and libpsm2-2 installed. The psm2 providers will not be listed in the output. Debug output indicates that no active psm2 device is found.
I have found two orthogonal workarounds for this problem:
HFI_SYSFS_PATH=/sys/class/infiniband/opap129s fi_info
. The "129" portion of the HFI_SYSFS_PATH value needs to be set according to the PCI bus of the HFI card.ACTION=="add", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_KERNEL"
While there is a workaround, libpsm2 should address the new, default RDMA device naming scheme. opa_sysfs.c:sysfs_init() looks like the place to start.
The text was updated successfully, but these errors were encountered: