Skip to content

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

Merged
rleon merged 1 commit intolinux-rdma:masterfrom
NagappanRMPL:master
Apr 15, 2026
Merged

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

Conversation

@NagappanRMPL
Copy link
Copy Markdown
Contributor

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
Contributor 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
Contributor Author

Hi @rleon ,

Could you please review this change for ibstat command.

Thanks,
Nagappan.

@rleon
Copy link
Copy Markdown
Member

rleon commented Apr 15, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@rleon rleon merged commit 4be917c into linux-rdma:master Apr 15, 2026
14 checks passed
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.

2 participants