Skip to contentSkip to conversation

net/mlx5: fix Multi-Packet RQ mempool name

PATCH Applied Yongseok Koh 2 participants 2 messages May 6, 2019 – May 8, 2019 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix Multi-Packet RQ mempool name

Currently, the name of MPRQ mempool is set by

	snprintf(name, sizeof(name), "%s-mprq", dev->device->name);

For port representor, the name is duplicate of its master and failed to create such a mempool having the same name. Port ID is used in the name instead.

Fixes 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
---
 drivers/net/mlx5/mlx5_rxq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/mlx5_rxq.c +1 -1
index 0a4c02e71e..85e6f29188 100644
@@ -1272,7 +1272,7 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev)
 				return -rte_errno;
 		}
 	}
-	snprintf(name, sizeof(name), "%s-mprq", dev->device->name);
+	snprintf(name, sizeof(name), "port-%u-mprq", dev->data->port_id);
 	mp = rte_mempool_create(name, obj_num, obj_size, MLX5_MPRQ_MP_CACHE_SZ,
 				0, NULL, NULL, mlx5_mprq_buf_init, NULL,
 				dev->device->numa_node, 0);
Signature · 1 line
2.11.0
#1 lore raw

Tuesday, May 7, 2019 2:22 AM, Yongseok Koh:

Quoted 11 lines

Subject: [PATCH] net/mlx5: fix Multi-Packet RQ mempool name

Currently, the name of MPRQ mempool is set by

	snprintf(name, sizeof(name), "%s-mprq", dev->device->name); For

port representor, the name is duplicate of its master and failed to create such a mempool having the same name. Port ID is used in the name instead.

Fixes 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")

Applied to next-net-mlx, thanks.