summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_trigger.c
diff options
context:
space:
mode:
authorOri Kam <orika@mellanox.com>2019-10-30 23:53:13 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-08 23:15:04 +0100
commite79c9be9151529b9e7cff77c2a12fb849f0793d0 (patch)
tree2d14470e145d2e58f2d87f98c2ae23837cc564af /drivers/net/mlx5/mlx5_trigger.c
parent52dfbded04746016fca500fc0b1b008624d6eeb8 (diff)
downloaddpdk-e79c9be9151529b9e7cff77c2a12fb849f0793d0.zip
dpdk-e79c9be9151529b9e7cff77c2a12fb849f0793d0.tar.gz
dpdk-e79c9be9151529b9e7cff77c2a12fb849f0793d0.tar.xz
net/mlx5: support Rx hairpin queues
This commit adds the support for creating Rx hairpin queues. Hairpin queue is a queue that is created using DevX and only used by the HW. This results in that all the data part of the RQ is not being used. 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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 122f31c..cb31ae2 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -118,6 +118,13 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
if (!rxq_ctrl)
continue;
+ if (rxq_ctrl->type == MLX5_RXQ_TYPE_HAIRPIN) {
+ rxq_ctrl->obj = mlx5_rxq_obj_new
+ (dev, i, MLX5_RXQ_OBJ_TYPE_DEVX_HAIRPIN);
+ if (!rxq_ctrl->obj)
+ goto error;
+ continue;
+ }
/* Pre-register Rx mempool. */
mp = mlx5_rxq_mprq_enabled(&rxq_ctrl->rxq) ?
rxq_ctrl->rxq.mprq_mp : rxq_ctrl->rxq.mp;