net/mlx5: fix hairpin unbind
authorBing Zhao <bingz@nvidia.com>
Fri, 13 Nov 2020 07:05:33 +0000 (15:05 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Nov 2020 22:36:14 +0000 (23:36 +0100)
commit0746dcabfd52a8722f3590f58b943bf8eba5840c
tree2a1fe6d7f0b9dc398285a4047c468676565ef6c4
parent6f921f61d481cc83df12e698c37dff8b5d1809da
net/mlx5: fix hairpin unbind

In the implementation of mlx5_hairpin_unbind, a copy-paste error was
inside. If a single peer Rx port needed to be unbound, it would be
bound again by mistake.

All the hardware resources were released when stopping the device and
no mess of the configuration was introduced. But when trying to unbind
the ports again, the issue would appear.

The typo of the function call is fixed. If there is no hairpin queue
bound between two ports, the unbinding process should be considered
successful.

Fixes: 37cd4501e873 ("net/mlx5: support two ports hairpin mode")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_trigger.c