summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_trigger.c
diff options
context:
space:
mode:
authorOri Kam <orika@mellanox.com>2019-10-30 23:53:15 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-08 23:15:04 +0100
commitae18a1ae969262cc87f859497164a45285f13995 (patch)
tree4e4b2f90b0c72b2822e277a3929b3ce628ace8bd /drivers/net/mlx5/mlx5_trigger.c
parent894c4a8e5af6fc609c2401b01a99d94de390ba53 (diff)
downloaddpdk-ae18a1ae969262cc87f859497164a45285f13995.zip
dpdk-ae18a1ae969262cc87f859497164a45285f13995.tar.gz
dpdk-ae18a1ae969262cc87f859497164a45285f13995.tar.xz
net/mlx5: support Tx hairpin queues
This commit adds the support for creating Tx hairpin queues. Hairpin queue is a queue that is created using DevX and only used by the HW. Signed-off-by: Ori Kam <orika@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_trigger.c')
-rw-r--r--drivers/net/mlx5/mlx5_trigger.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 50c4df5..3ec86c4 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -51,8 +51,14 @@ mlx5_txq_start(struct rte_eth_dev *dev)
if (!txq_ctrl)
continue;
- txq_alloc_elts(txq_ctrl);
- txq_ctrl->obj = mlx5_txq_obj_new(dev, i);
+ if (txq_ctrl->type == MLX5_TXQ_TYPE_HAIRPIN) {
+ txq_ctrl->obj = mlx5_txq_obj_new
+ (dev, i, MLX5_TXQ_OBJ_TYPE_DEVX_HAIRPIN);
+ } else {
+ txq_alloc_elts(txq_ctrl);
+ txq_ctrl->obj = mlx5_txq_obj_new
+ (dev, i, MLX5_TXQ_OBJ_TYPE_IBV);
+ }
if (!txq_ctrl->obj) {
rte_errno = ENOMEM;
goto error;