net/mlx5: fix inconsistent link status
authorShahaf Shuler <shahafs@mellanox.com>
Tue, 31 Jan 2017 13:13:38 +0000 (15:13 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 10 Feb 2017 11:25:48 +0000 (12:25 +0100)
commita9f2fbc42f0c58df614896a407fd694899315233
tree8cda37c5f6c70891164aafc33702b775df2d2424
parent511a4c74b8e94fd5990b222b207833290c5144b7
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 <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
drivers/net/mlx5/mlx5_ethdev.c