All of lore.kernel.org
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] vdpa/mlx5: workaround FW first completion in start
@ 2021-09-23  8:17 Xueming Li
  2021-09-23  8:17 ` [dpdk-dev] [PATCH 2/2] vdpa/mlx5: retry VAR allocation during vDPA restart Xueming Li
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Xueming Li @ 2021-09-23  8:17 UTC (permalink / raw)
  To: dev; +Cc: Matan Azrad, Viacheslav Ovsiienko

After a vDPA application restart, qemu restores VQ with used and
available index, new incoming packet triggers virtio driver to
handle buffers. Under heavy traffic, no available buffer for
firmware to receive new packets, no Rx interrupts generated,
driver is stuck on endless interrupt waiting.

As a firmware workaround, this patch sends a notification after
VQ setup to ask driver handling buffers and filling new buffers.

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Matan Azrad <matan@nvidia.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index f530646058..71470d23d9 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -4,6 +4,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <sys/mman.h>
+#include <sys/eventfd.h>
 
 #include <rte_malloc.h>
 #include <rte_errno.h>
@@ -367,6 +368,9 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)
 		goto error;
 	}
 	virtq->stopped = false;
+	/* Initial notification to ask qemu handling completed buffers. */
+	if (virtq->eqp.cq.callfd != -1)
+		eventfd_write(virtq->eqp.cq.callfd, (eventfd_t)1);
 	DRV_LOG(DEBUG, "vid %u virtq %u was created successfully.", priv->vid,
 		index);
 	return 0;
-- 
2.33.0


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

end of thread, other threads:[~2021-10-21 12:36 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23  8:17 [dpdk-dev] [PATCH 1/2] vdpa/mlx5: workaround FW first completion in start Xueming Li
2021-09-23  8:17 ` [dpdk-dev] [PATCH 2/2] vdpa/mlx5: retry VAR allocation during vDPA restart Xueming Li
2021-10-13 10:06   ` Maxime Coquelin
2021-10-13 10:14     ` Xueming(Steven) Li
2021-10-13  9:55 ` [dpdk-dev] [PATCH 1/2] vdpa/mlx5: workaround FW first completion in start Maxime Coquelin
2021-10-15 13:43 ` [dpdk-dev] [PATCH v1 " Xueming Li
2021-10-15 13:43   ` [dpdk-dev] [PATCH v1 2/2] vdpa/mlx5: retry VAR allocation during vDPA restart Xueming Li
2021-10-15 13:57   ` [dpdk-dev] [PATCH v1 1/2] vdpa/mlx5: workaround FW first completion in start Maxime Coquelin
2021-10-15 14:51     ` Xueming(Steven) Li
2021-10-15 15:05 ` [dpdk-dev] [PATCH v2 " Xueming Li
2021-10-15 15:05   ` [dpdk-dev] [PATCH v2 2/2] vdpa/mlx5: retry VAR allocation during vDPA restart Xueming Li
2021-10-21  9:40     ` Maxime Coquelin
2021-10-21 12:27     ` Maxime Coquelin
2021-10-21  9:40   ` [dpdk-dev] [PATCH v2 1/2] vdpa/mlx5: workaround FW first completion in start Maxime Coquelin
2021-10-21 12:27   ` Maxime Coquelin
2021-10-21 12:36     ` Xueming(Steven) Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.