Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

RDMA/mlx5: Raise async event on device speed change

Raise IB_EVENT_DEVICE_SPEED_CHANGE whenever the speed of one of the
device's ports changes. Usually all ports of the device changes
together.

This ensures user applications and upper-layer software are immediately
notified when bandwidth changes, improving traffic management in dynamic
environments. This is especially useful for vports which are part of a
LAG configuration, to know if the effective speed of the LAG was
changed.

Signed-off-by: Or Har-Toov <ohartoov@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>

authored by

Or Har-Toov and committed by
Leon Romanovsky
3fd984d5 51a07ce2

+8
+8
drivers/infiniband/hw/mlx5/main.c
··· 2838 2838 case MLX5_PORT_CHANGE_SUBTYPE_ACTIVE: 2839 2839 case MLX5_PORT_CHANGE_SUBTYPE_DOWN: 2840 2840 case MLX5_PORT_CHANGE_SUBTYPE_INITIALIZED: 2841 + if (ibdev->ib_active) { 2842 + struct ib_event speed_event = {}; 2843 + 2844 + speed_event.device = &ibdev->ib_dev; 2845 + speed_event.event = IB_EVENT_DEVICE_SPEED_CHANGE; 2846 + ib_dispatch_event(&speed_event); 2847 + } 2848 + 2841 2849 /* In RoCE, port up/down events are handled in 2842 2850 * mlx5_netdev_event(). 2843 2851 */