net/mlx5: fix flow priorities probing error path
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>
Thu, 21 Feb 2019 09:02:16 +0000 (09:02 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Mar 2019 16:52:22 +0000 (17:52 +0100)
commit4fb27c1dfe054972bec62fdeb6fc91680ccb3f3c
tree7ec16ebba8c38e5dce5248826674445e39d392a7
parent82a9eab70d80741177fb934d37e6b28d7e22d1e1
net/mlx5: fix flow priorities probing error path

The mlx5 PMD probes the Verbs flow priorities supported with
ibv_create_flow() function. If rdma-core or kernel fails for
some reason, the returned error causes the drop queue is not
destroyed, and pd is locked by not freed resource.

Also the mlx5_flow_discover_priorities() returned negative value
as error, and this code was reported "as is", without sign
changing (eventually causing assert(err > 0)).

Fixes: 2815702baea7 ("net/mlx5: replace verbs priorities by flow")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5_flow.c