patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 3/4] net/mlx5: fix event queue number query
       [not found] <>
@ 2020-10-15  6:38 ` Matan Azrad
  0 siblings, 0 replies; only message in thread
From: Matan Azrad @ 2020-10-15  6:38 UTC (permalink / raw)
  To: dev; +Cc: Viacheslav Ovsiienko, stable

When a Rx\Tx queue is created by DevX, its CQ configuration should
include the EQ number of the interrupts.
The EQ is managed by the kernel and there is a glue API in order to
query the EQ number from the kernel.
The EQ query API gets a vector number specifies the kernel vector of
the interrupt handling.

The vector number was wrongly detected according to the configuration
CPU instead of using the device attributes of the supported vectors.
The CPU was wrongly detected by the rte_lcore_to_cpu_id API without any
check, and in case of non-EAL thread context the value was 0xFFFFFFFF
which caused a failure in the EQ number query API.

Use vector 0 for each EQ number query which must be supported by the

Fixes: 08d1838f645a ("net/mlx5: implement CQ for Rx using DevX API")
Fixes: d133f4cdb706 ("net/mlx5: create clock queue for packet pacing")

Signed-off-by: Matan Azrad <>
Acked-by: Viacheslav Ovsiienko <>
 drivers/net/mlx5/mlx5.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 44822ad..f1e3579 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -947,10 +947,8 @@ struct mlx5_dev_ctx_shared *
 		goto error;
 	if (sh->devx) {
-		uint32_t lcore = (uint32_t)rte_lcore_to_cpu_id(-1);
 		/* Query the EQN for this core. */
-		err = mlx5_glue->devx_query_eqn(sh->ctx, lcore, &sh->eqn);
+		err = mlx5_glue->devx_query_eqn(sh->ctx, 0, &sh->eqn);
 		if (err) {
 			rte_errno = errno;
 			DRV_LOG(ERR, "Failed to query event queue number %d.",

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-15  6:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <>
2020-10-15  6:38 ` [dpdk-stable] [PATCH 3/4] net/mlx5: fix event queue number query Matan Azrad

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ \
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone