[dpdk-stable] [PATCH v1 1/2] vdpa/mlx5: workaround FW first completion in start

Maxime Coquelin maxime.coquelin at redhat.com
Fri Oct 15 15:57:38 CEST 2021



On 10/15/21 15:43, Xueming Li wrote:
> 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.
> 

As I mentionned on my reply to the v1, I would expect a Fixes tag,
it would make downstream maintainers life easier.

Maybe pointing to the commit introducing the function would help.
this is not ideal, but otherwise the risk is that your patch get
missed by the stable maintainers.

Thanks!
Maxime

> Cc: stable at dpdk.org
> 
> Signed-off-by: Xueming Li <xuemingl at nvidia.com>
> Reviewed-by: Matan Azrad <matan at 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 f530646058f..71470d23d9e 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;
> 



More information about the stable mailing list