summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_trigger.c
diff options
context:
space:
mode:
authorMatan Azrad <matan@mellanox.com>2019-07-29 11:53:29 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-07-29 16:54:27 +0200
commit17ed314c6c0b269c92941e41aee3622f5726e1fa (patch)
tree0846d8f55408c3f51b90de8be1ccfb8274bf24a0 /drivers/net/mlx5/mlx5_trigger.c
parent5158260917a0588052500af4e011b6cd77143c1c (diff)
downloaddpdk-17ed314c6c0b269c92941e41aee3622f5726e1fa.zip
dpdk-17ed314c6c0b269c92941e41aee3622f5726e1fa.tar.gz
dpdk-17ed314c6c0b269c92941e41aee3622f5726e1fa.tar.xz
net/mlx5: allow LRO per Rx queue
Enabling LRO offload per queue makes sense because the user will probably want to allocate different mempool for LRO queues - the LRO mempool mbuf size may be bigger than non LRO mempool. Change the LRO offload to be per queue instead of per port. If one of the queues is with LRO enabled, all the queues will be configured via DevX. If RSS flows direct TCP packets to queues with different LRO enabling, these flows will not be offloaded with LRO. Signed-off-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.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 8bc2174..aa323ad 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -99,10 +99,14 @@ 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;
+ enum mlx5_rxq_obj_type obj_type = MLX5_RXQ_OBJ_TYPE_IBV;
+ for (i = 0; i < priv->rxqs_n; ++i) {
+ if ((*priv->rxqs)[i]->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. */