From: Dekel Peled Date: Sun, 10 May 2020 11:18:32 +0000 (+0300) Subject: net/mlx5: prefer DevX API to create Rx objects X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d237d22fbe62;p=dpdk.git net/mlx5: prefer DevX API to create Rx objects Currently, DevX API is used to create Rx objects (RQ, RQT, TIR) only if LRO or hairpin features are enabled on this RQ. This patch uses DevX API by default, if DevX is supported and can be used. Otherwise, Verbs API is used. Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index feb9154199..8d53648fa2 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -107,17 +107,11 @@ 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 = MLX5_RXQ_OBJ_TYPE_IBV; - struct mlx5_rxq_data *rxq = NULL; + 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; - 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. */