DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vdpa/mlx5: use master core Id for vhost thread
@ 2020-07-28  6:11 Xueming Li
  2020-07-28  6:22 ` [dpdk-dev] [v1] vdpa/mlx5: use control " Xueming Li
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Xueming Li @ 2020-07-28  6:11 UTC (permalink / raw)
  Cc: dev, Asaf Penso

With latest rte api, vdpa example failed on vq setup, the api to get
event queue of specified core failed.

The api to get event queue needs core id as input, but after
commit 67ae5936c4fc36 ("eal: fix lcore accessors for non-EAL threads"),
code of "vhost-event" thread to get current core returns -1, an invalid
core id.

As vhost thread created on same core of eal master core, this patch uses
master core ID as a workaround.

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
index 13ad43611e..ff6db8e345 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
@@ -55,7 +55,7 @@ mlx5_vdpa_event_qp_global_prepare(struct mlx5_vdpa_priv *priv)
 
 	if (priv->eventc)
 		return 0;
-	lcore = (uint32_t)rte_lcore_to_cpu_id(-1);
+	lcore = (uint32_t)rte_get_master_lcore();
 	if (mlx5_glue->devx_query_eqn(priv->ctx, lcore, &priv->eqn)) {
 		rte_errno = errno;
 		DRV_LOG(ERR, "Failed to query EQ number %d.", rte_errno);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-07-28 15:55 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28  6:11 [dpdk-dev] [PATCH] vdpa/mlx5: use master core Id for vhost thread Xueming Li
2020-07-28  6:22 ` [dpdk-dev] [v1] vdpa/mlx5: use control " Xueming Li
2020-07-28  7:08 ` [dpdk-dev] [PATCH] vdpa/mlx5: use master " David Marchand
2020-07-28  7:19   ` Matan Azrad
2020-07-28  7:25     ` David Marchand
2020-07-28  7:30       ` Matan Azrad
2020-07-28  7:53         ` David Marchand
2020-07-28  8:06           ` Xueming(Steven) Li
2020-07-28  8:27             ` Matan Azrad
2020-07-28  8:30               ` David Marchand
2020-07-28  8:24 ` Xueming(Steven) Li
2020-07-28  9:22 ` [dpdk-dev] [v2] vdpa/mlx5: fix event queue number query Xueming Li
2020-07-28 12:05   ` David Marchand
2020-07-28 12:26     ` Xueming(Steven) Li
2020-07-28 12:32 ` [dpdk-dev] [v3] " Xueming Li
2020-07-28 14:04   ` Maxime Coquelin
2020-07-28 15:55   ` Maxime Coquelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).