net/mlx5: optimize tag traversal with hash list
[dpdk.git] / drivers / net / mlx5 / mlx5_rxq.c
index 2c3d5eb..24d0eaa 100644 (file)
@@ -2096,6 +2096,32 @@ mlx5_rxq_verify(struct rte_eth_dev *dev)
        return ret;
 }
 
+/**
+ * Get a Rx queue type.
+ *
+ * @param dev
+ *   Pointer to Ethernet device.
+ * @param idx
+ *   Rx queue index.
+ *
+ * @return
+ *   The Rx queue type.
+ */
+enum mlx5_rxq_type
+mlx5_rxq_get_type(struct rte_eth_dev *dev, uint16_t idx)
+{
+       struct mlx5_priv *priv = dev->data->dev_private;
+       struct mlx5_rxq_ctrl *rxq_ctrl = NULL;
+
+       if ((*priv->rxqs)[idx]) {
+               rxq_ctrl = container_of((*priv->rxqs)[idx],
+                                       struct mlx5_rxq_ctrl,
+                                       rxq);
+               return rxq_ctrl->type;
+       }
+       return MLX5_RXQ_TYPE_UNDEFINED;
+}
+
 /**
  * Create an indirection table.
  *