net/mlx5: fix interrupt installation timing
authorSuanming Mou <suanmingm@mellanox.com>
Thu, 28 May 2020 09:22:09 +0000 (17:22 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 2 Jun 2020 14:06:24 +0000 (16:06 +0200)
commit33860cfab62ed9a3673b1077899c1c527b09e385
tree8a7747c05feed0f52fd09a5180dffccc020088fd
parent2786b7bf9084b32dde9a346d92ab1c27f0ffc476
net/mlx5: fix interrupt installation timing

Currently, the DevX counter query works asynchronously with Devx
interrupt handler return the query result. When port closes, the
interrupt handler will be uninstalled and the Devx comp obj will
also be destroyed. Meanwhile the query is still not cancelled.

In this case, counter query may use the invalid Devx comp which
has been destroyed, and query failure with invalid FD will be
reported.

Adjust the shared interrupt install and uninstall timing to make
the counter asynchronous query stop before interrupt uninstall.

Fixes: f15db67df09c ("net/mlx5: accelerate DV flow counter query")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_ethdev.c
drivers/net/mlx5/mlx5_trigger.c