net/mlx5: change hairpin queue peer checking
authorBing Zhao <bingz@nvidia.com>
Mon, 26 Oct 2020 16:37:41 +0000 (00:37 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:03 +0000 (23:35 +0100)
commit1a01264f623fd739635919fa8971b26df1f05262
tree3a16d51ad4b426c9e2fa8bfe167b197d6f3b5275
parente4b7b8d082db943355100fd7270113bd4be0fff6
net/mlx5: change hairpin queue peer checking

In the current implementation of single port mode hairpin, the peer
queue should belong to the same port of the current queue. When the
two ports hairpin mode is introduced, such checking should be removed
to make the hairpin queue setup execute successfully since it is not
an invalid condition, if the Tx port and Rx port are not the same.

In the meanwhile, different devices could have different queue
configurations. The queues number of peer port is unknown to the
current device. The checking should be removed also.

If the Tx and Rx port IDs of a hairpin peer are different, only the
manual binding and explicit Tx flows are supported. Or else, the four
combinations of modes could be supported. The mode attributes
consistency checking will be done when connecting the queue with its
peer queue.

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