summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_trigger.c
diff options
context:
space:
mode:
authorDekel Peled <dekelp@mellanox.com>2019-07-22 14:52:19 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-07-23 14:31:36 +0200
commit940f0a1d072d05b7894db4fd4efff5eea08246ba (patch)
tree153e3e488fd4d217eb568a247f6c355e7ad4cc4a /drivers/net/mlx5/mlx5_trigger.c
parentdc9ceff73c99a1600a3eb2487d076a29de2f8294 (diff)
downloaddpdk-940f0a1d072d05b7894db4fd4efff5eea08246ba.zip
dpdk-940f0a1d072d05b7894db4fd4efff5eea08246ba.tar.gz
dpdk-940f0a1d072d05b7894db4fd4efff5eea08246ba.tar.xz
net/mlx5: support LRO with single RxQ object
Implement LRO support using a single RQ object per DPDK RxQ. Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Matan Azrad <matan@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.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index acd2902..8bc2174 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -99,6 +99,9 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
struct mlx5_priv *priv = dev->data->dev_private;
unsigned int i;
int ret = 0;
+ unsigned int lro_on = mlx5_lro_on(dev);
+ enum mlx5_rxq_obj_type obj_type = lro_on ? MLX5_RXQ_OBJ_TYPE_DEVX_RQ :
+ MLX5_RXQ_OBJ_TYPE_IBV;
/* Allocate/reuse/resize mempool for Multi-Packet RQ. */
if (mlx5_mprq_alloc_mp(dev)) {
@@ -123,11 +126,13 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
ret = rxq_alloc_elts(rxq_ctrl);
if (ret)
goto error;
- rxq_ctrl->obj = mlx5_rxq_obj_new(dev, i,
- MLX5_RXQ_OBJ_TYPE_DEVX_RQ);
+ rxq_ctrl->obj = mlx5_rxq_obj_new(dev, i, obj_type);
if (!rxq_ctrl->obj)
goto error;
- rxq_ctrl->wqn = rxq_ctrl->obj->wq->wq_num;
+ if (obj_type == MLX5_RXQ_OBJ_TYPE_IBV)
+ rxq_ctrl->wqn = rxq_ctrl->obj->wq->wq_num;
+ else if (obj_type == MLX5_RXQ_OBJ_TYPE_DEVX_RQ)
+ rxq_ctrl->wqn = rxq_ctrl->obj->rq->id;
}
return 0;
error: