[1/4] net/mlx5: remove hairpin queue peer port checking
Checks
Commit Message
In the current implementation of single port mode hairpin, the peer
queue should belong to the same port of the current port. When two
ports hairpin mode is introduced, the checking should be removed to
make the hairpin queue setup execute successfully.
Signed-off-by: Bing Zhao <bingz@nvidia.com>
---
drivers/net/mlx5/mlx5_rxq.c | 4 +---
drivers/net/mlx5/mlx5_txq.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
@@ -776,9 +776,7 @@
res = mlx5_rx_queue_pre_setup(dev, idx, &desc);
if (res)
return res;
- if (hairpin_conf->peer_count != 1 ||
- hairpin_conf->peers[0].port != dev->data->port_id ||
- hairpin_conf->peers[0].queue >= priv->txqs_n) {
+ if (hairpin_conf->peer_count != 1) {
DRV_LOG(ERR, "port %u unable to setup hairpin queue index %u "
" invalid hairpind configuration", dev->data->port_id,
idx);
@@ -421,9 +421,7 @@
res = mlx5_tx_queue_pre_setup(dev, idx, &desc);
if (res)
return res;
- if (hairpin_conf->peer_count != 1 ||
- hairpin_conf->peers[0].port != dev->data->port_id ||
- hairpin_conf->peers[0].queue >= priv->rxqs_n) {
+ if (hairpin_conf->peer_count != 1) {
DRV_LOG(ERR, "port %u unable to setup hairpin queue index %u "
" invalid hairpind configuration", dev->data->port_id,
idx);