Skip to content

UCT/IB: Cache RoCE network interface index per sys_dev#11230

Merged
tvegas1 merged 2 commits intoopenucx:masterfrom
tvegas1:roce_sys_dev_to_nidx
Mar 4, 2026
Merged

UCT/IB: Cache RoCE network interface index per sys_dev#11230
tvegas1 merged 2 commits intoopenucx:masterfrom
tvegas1:roce_sys_dev_to_nidx

Conversation

@tvegas1
Copy link
Copy Markdown
Contributor

@tvegas1 tvegas1 commented Mar 3, 2026

What?

Cache RoCE network interface index per sys_dev.

Why?

Some IB device to network interface index resolutions can fail, because different HCAs can have identical node_guid.

How?

Replace by sys_dev as the node_guid is only used in the caching key, not for actual network interface index lookup.

Comment thread src/uct/ib/base/ib_device.c Outdated
uint8_t gid_index, unsigned *ndev_index_p)
{
uct_ib_device_to_ndev_key_t ib_dev = {.guid = IBV_DEV_ATTR(dev, node_guid),
uct_ib_device_to_ndev_key_t ib_dev = {.sys_dev = dev->sys_dev,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can use the uint32_t built-in hash since can now pack the smaller hash key to uint32

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@tvegas1 tvegas1 merged commit c6cd4f1 into openucx:master Mar 4, 2026
152 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