verbs: Introduce ibv_query_port_speed() verb#1674
Merged
yishaih merged 5 commits intolinux-rdma:masterfrom Jan 7, 2026
Merged
Conversation
To commit: aaecff5e13cd ("RDMA/mlx5: Implement query_port_speed callback").
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Add a new API, ibv_query_port_speed(), which enables applications to query the effective bandwidth of a port. This is useful for VF LAG and multiport LAG configurations, since ibv_query_port does not report the combined bandwidth of all aggregated ports. In any case, the API can be used on non-aggregated devices as well. Signed-off-by: Or Har-Toov <ohartoov@nvidia.com> Reviewed-by: Patrisious Haddad <phaddad@nvidia.com> Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Add ioctl support for the new ibv_query_port_speed() verb, allowing providers to query the port speed from kernel via ioctl-based infrastructure. Signed-off-by: Or Har-Toov <ohartoov@nvidia.com> Reviewed-by: Patrisious Haddad <phaddad@nvidia.com> Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Add support for the newly introduced ibv_query_port_speed() API in the mlx5 provider. This enables applications to obtain the effective port bandwidth, which for VF LAG and multiport VF configurations is calculated as the sum of bandwidths of all currently active PFs that are part of the aggregation. Signed-off-by: Or Har-Toov <ohartoov@nvidia.com> Reviewed-by: Patrisious Haddad <phaddad@nvidia.com> Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Introduce IBV_EVENT_DEVICE_SPEED_CHANGE asynchronous event, which is triggered when one or many of the device's port speeds change due to configuration or state updates. This is especially useful in scenarios such as VF LAG or Multiport LAG configuration, where the effective speed of a VF can change if one of the PFs in the LAG changes state. After receiving this event, applications can use ibv_query_port_speed() on specific ports to check which ones have changed and obtain their new speeds. The event is generated at the device level to avoid flooding the user with many separate notifications when multiple ports are affected simultaneously, such as when a PF with many SFs changes state or when all ports are part of a bonded device that updates speed. Users can then query only those ports they care about for details. Signed-off-by: Or Har-Toov <ohartoov@nvidia.com> Reviewed-by: Patrisious Haddad <phaddad@nvidia.com> Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This series Introduces a new verb, ibv_query_port_speed(), which enables applications to query the effective bandwidth of a port.
This is useful for VF LAG and multiport LAG configurations, since ibv_query_port does not report the combined bandwidth of all aggregated ports.
In any case, the API can be used on non-aggregated devices as well.
The series includes mlx5 provider implementation for the new verb.
As part of the series we Introduce an IBV_EVENT_DEVICE_SPEED_CHANGE asynchronous event, which is triggered when one or many of the device's port speeds change due to configuration or state updates. This is especially useful in scenarios
such as VF LAG or Multiport LAG configuration, where the effective speed of a VF can change if one of the PFs in the LAG changes state.
After receiving this event, applications can use the new ibv_query_port_speed() verbs on specific ports to check which ones have changed and obtain their new speeds.
The matching kernel code was sent to rdma-next.