Skip to content

verbs: Introduce ibv_query_port_speed() verb#1674

Merged
yishaih merged 5 commits intolinux-rdma:masterfrom
yishaih:verbs_misc
Jan 7, 2026
Merged

verbs: Introduce ibv_query_port_speed() verb#1674
yishaih merged 5 commits intolinux-rdma:masterfrom
yishaih:verbs_misc

Conversation

@yishaih
Copy link
Copy Markdown
Member

@yishaih yishaih commented Dec 21, 2025

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.

yishaih and others added 5 commits January 7, 2026 09:37
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>
@yishaih yishaih merged commit c7cc0c8 into linux-rdma:master Jan 7, 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