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

Link status change takes time that depends on the HW and the kernel.
It was checked immediately after the change was issued at probing.
If the port had been down before probing, a "down" state may be read,
while the port would be "up" imminently.
After that, DPDK reported the port as "down" mistakenly
and "ifconfig $DEV up" did not trigger an LSC event,
because from the system's perspective the port was "up" already.

Install Netlink event handler at port probe before requesting the port
to come up in order to receive LSC event even if it comes up
between probe and start.

Fixes: a85a606ca501 ("net/mlx5: fix link status initialization")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c