]> git.droids-corp.org - dpdk.git/commit
net/mlx5: fix link status change detection
authorDmitry Kozlyuk <dkozlyuk@nvidia.com>
Tue, 1 Mar 2022 12:15:13 +0000 (14:15 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Tue, 1 Mar 2022 15:54:07 +0000 (16:54 +0100)
commit17f95513adca1f4ee5bba305b154ac984ee50cee
tree72d32f34e78410d182871f340c93b5adbaf8c345
parentbe66461cba371c3138ce942eb9fe5657f9e9a446
net/mlx5: fix link status change detection

Sometimes net/mlx5 devices did not detect link status change to "up".

Each shared device was monitoring IBV_EVENT_PORT_{ACTIVE,ERR}
and queried the link status upon receiving the event.
IBV_EVENT_PORT_ACTIVE is delivered when the logical link status
(UP flag) is set, but the physical link status (RUNNING flag)
may be down at that time, in which case the new link status
would be erroneously considered down.

IBV interface is insufficient for the task.
Monitor interface events using Netlink.

Fixes: 198a3c339a8f ("mlx5: handle link status interrupts")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/linux/mlx5_ethdev_os.c
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_trigger.c