net/mlx5: revert DevX preference for Rx objects
authorDekel Peled <dekelp@mellanox.com>
Wed, 20 May 2020 12:37:31 +0000 (15:37 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 21 May 2020 15:59:29 +0000 (17:59 +0200)
Recent patch exposed a minor performance issue,
so it is reverted.

Fixes: d237d22fbe62 ("net/mlx5: prefer DevX API to create Rx objects")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/net/mlx5/mlx5_trigger.c

index 8d53648..8106598 100644 (file)
@@ -107,11 +107,16 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
        struct mlx5_priv *priv = dev->data->dev_private;
        unsigned int i;
        int ret = 0;
-       enum mlx5_rxq_obj_type obj_type =
-                       priv->config.dv_flow_en && priv->config.devx &&
-                       priv->config.dest_tir ?
-                       MLX5_RXQ_OBJ_TYPE_DEVX_RQ : MLX5_RXQ_OBJ_TYPE_IBV;
-
+       enum mlx5_rxq_obj_type obj_type = MLX5_RXQ_OBJ_TYPE_IBV;
+       struct mlx5_rxq_data *rxq = NULL;
+
+       for (i = 0; i < priv->rxqs_n; ++i) {
+               rxq = (*priv->rxqs)[i];
+               if (rxq && rxq->lro) {
+                       obj_type =  MLX5_RXQ_OBJ_TYPE_DEVX_RQ;
+                       break;
+               }
+       }
        /* Allocate/reuse/resize mempool for Multi-Packet RQ. */
        if (mlx5_mprq_alloc_mp(dev)) {
                /* Should not release Rx queues but return immediately. */