]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Support effective VF bandwidth query in LAG mode
authorLeon Romanovsky <leon@kernel.org>
Mon, 5 Jan 2026 07:39:29 +0000 (02:39 -0500)
committerLeon Romanovsky <leon@kernel.org>
Mon, 5 Jan 2026 07:39:29 +0000 (02:39 -0500)
commit976cc7ac1264ff52e05769854b472366107104ec
tree2360368e174877350b4c4d5dda19251d5b481fee
parent0789f929900d85b80b343c5f04f8b9444e991384
parentf0b2fde98065e49795ce6824837b3f53fdf16e5d
Support effective VF bandwidth query in LAG mode

Currently, mlx5 driver exposes only the parent function's speed to VFs,
providing no way to query the actual effective bandwidth in LAG and
MPESW configurations. This limitation prevents userspace and
upper-layer software from obtaining accurate bandwidth information,
which impacts traffic scheduling decisions.

This series addresses this by:

1. Adding mlx5 internal logic to calculate and propagate the effective
   aggregated LAG speed to all attached vports. The vport speeds are
   dynamically updated when LAG member link states change.

2. Extending RDMA core with a new ib_query_port_speed() verb and an
   IB_EVENT_DEVICE_SPEED_CHANGE async event. These interfaces expose
   the effective port speed to userspace, supporting speeds that are
   not expressible as IB speed * width (where width is 2^n).

This series enables userspace applications to query the effective
port speed and receive notifications on speed changes in real-time.
In LAG configurations, each mlx5 port reports the aggregated bandwidth
of all active LAG members.

Signed-off-by: Leon Romanovsky <leon@kernel.org>