[v3] vdpa/mlx5: fix event queue number query
Checks
Commit Message
Vdpa example failed on vq setup, the api to get event queue of specified
core failed.
Internal api devx_query_eqn expects index of event queue vectors, no
need to use cpu id. As the doorbell handling thread is per device, it's
sufficient to use default event queue.
This patch uses the default id(0) as event queue index.
Fixes: 8395927cdfaf ("vdpa/mlx5: prepare HW queues")
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/vdpa/mlx5/mlx5_vdpa_event.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
Comments
On 7/28/20 2:32 PM, Xueming Li wrote:
> Vdpa example failed on vq setup, the api to get event queue of specified
> core failed.
>
> Internal api devx_query_eqn expects index of event queue vectors, no
> need to use cpu id. As the doorbell handling thread is per device, it's
> sufficient to use default event queue.
>
> This patch uses the default id(0) as event queue index.
>
> Fixes: 8395927cdfaf ("vdpa/mlx5: prepare HW queues")
>
> Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> Acked-by: Matan Azrad <matan@mellanox.com>
> ---
> drivers/vdpa/mlx5/mlx5_vdpa_event.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
On 7/28/20 2:32 PM, Xueming Li wrote:
> Vdpa example failed on vq setup, the api to get event queue of specified
> core failed.
>
> Internal api devx_query_eqn expects index of event queue vectors, no
> need to use cpu id. As the doorbell handling thread is per device, it's
> sufficient to use default event queue.
>
> This patch uses the default id(0) as event queue index.
>
> Fixes: 8395927cdfaf ("vdpa/mlx5: prepare HW queues")
>
> Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> Acked-by: Matan Azrad <matan@mellanox.com>
> ---
> drivers/vdpa/mlx5/mlx5_vdpa_event.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
Applied to dpdk-next-virtio/master
Thanks,
Maxime
@@ -51,12 +51,9 @@ mlx5_vdpa_event_qp_global_release(struct mlx5_vdpa_priv *priv)
static int
mlx5_vdpa_event_qp_global_prepare(struct mlx5_vdpa_priv *priv)
{
- uint32_t lcore;
-
if (priv->eventc)
return 0;
- lcore = (uint32_t)rte_lcore_to_cpu_id(-1);
- if (mlx5_glue->devx_query_eqn(priv->ctx, lcore, &priv->eqn)) {
+ if (mlx5_glue->devx_query_eqn(priv->ctx, 0, &priv->eqn)) {
rte_errno = errno;
DRV_LOG(ERR, "Failed to query EQ number %d.", rte_errno);
return -1;