Skip to content

Honor configured IB port when querying RoCE GID - #202

Merged
thesues merged 1 commit into
bytedance:mainfrom
ToLiveAndLove:fix/roce-gid-port
Sep 16, 2026
Merged

thesues merged 1 commit into
bytedance:mainfrom
ToLiveAndLove:fix/roce-gid-port

Conversation

@ToLiveAndLove

Copy link
Copy Markdown
Contributor

open_rdma_device() selects the GID index using the configured IB port, but queries the GID from port 1. With --ib-port 2, this can return the wrong GID or fail. Use rdma_dev->ib_port for the query as well.

Add a Meson test that calls the real device-opening code with mocked verbs. It covers ports 1 and 2 with automatic and explicit GID index selection, without RDMA hardware.

meson setup build src -Dwerror=true
meson test -C build --suite rdma-device --print-errorlogs

Validation: both port-2 cases fail before the fix; all four pass after it. The test target compiles with -O3 -g -Wall -Wextra -Werror, and repository-wide pre-commit checks pass. A full extension build with -Werror is blocked by warnings in unchanged files, including ibv_helper.cpp and mempool.cpp. Multi-port hardware testing was not performed.

@CLAassistant

CLAassistant commented Sep 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@thesues
thesues merged commit e572c19 into bytedance:main Sep 16, 2026
2 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.

3 participants