net/mlx5: fix inconsistent link status
net/mlx5: fix inconsistent link status

Querying the link status can end up being in an inconsistent state,
like the port is reporting speed although it is down.

For this case another query is scheduled.

A race condition can occur between the scheduled query and link
status interrupt handlers.

When the scheduled query by-pass interrupt handlers, the link status
will be stuck in an inconsistent state.

This patch addresses the race condition by not blocking link status
queries in case delayed query is used.

Fixes: 198a3c339a8f ("mlx5: handle link status interrupts")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <59427d49da6f2b944fbf4cb5ee70ef3ac25f744f@mellanox.com>
Acked-by: Nelio Laranjeiro <2f8dd9032d5b85ca4b53dec8ce664eb6998836be@6wind.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk