Skip to content

ibstat: ignore non-RDMA endpoint devices when umad_get_ca() fails#1722

Open
NagappanRMPL wants to merge 1 commit intolinux-rdma:masterfrom
NagappanRMPL:master
Open

ibstat: ignore non-RDMA endpoint devices when umad_get_ca() fails#1722
NagappanRMPL wants to merge 1 commit intolinux-rdma:masterfrom
NagappanRMPL:master

Conversation

@NagappanRMPL
Copy link
Copy Markdown

Orabug: 38502630

When umad_get_ca() fails, ibstat currently propagates the error even for devices that are not usable RDMA endpoints.

Add lightweight sysfs checks to detect non-endpoint devices by verifying either the presence of port GID 0 (ports//gids/0) or the Connection Manager capability bit (port cap_mask bit 16). If neither is present, treat the device as non-RDMA and return 0 instead of failing.

This improves behavior on systems exposing non-endpoint IB-class devices under /sys/class/infiniband/.

@NagappanRMPL NagappanRMPL force-pushed the master branch 4 times, most recently from 1544744 to de2b9a2 Compare March 24, 2026 09:17
@NagappanRMPL
Copy link
Copy Markdown
Author

Hi,

Could you please review the changes for ibstat command.

Thanks,
Nagappan

When umad_get_ca() fails, ibstat currently propagates the error even for
devices that are not usable RDMA endpoints.

Add lightweight sysfs checks to detect non-endpoint devices by verifying
either the presence of port GID 0 (ports/<n>/gids/0) or the Connection
Manager capability bit (port cap_mask bit 16). If neither is present,
treat the device as non-RDMA and return 0 instead of failing.

This improves behavior on systems exposing non-endpoint IB-class devices
under /sys/class/infiniband/.

Signed-off-by: Nagappan Ramasamy Palaniappan <nagappan.ramasamy.palaniappan@oracle.com>
@NagappanRMPL
Copy link
Copy Markdown
Author

Hi @rleon ,

Could you please review this change for ibstat command.

Thanks,
Nagappan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant