From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BFDB6A04A8 for ; Wed, 26 Jan 2022 14:20:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF5A042716; Wed, 26 Jan 2022 14:20:55 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id BC99042716 for ; Wed, 26 Jan 2022 14:20:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643203254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zlq1vbPy7g2HIohw5Aq2ibxpAd8O28ObA2VfqDvRaRg=; b=a7FpPfPufwaoxvaFaF4DOq7GeeeLiNQ7mm+caP6Q2mqBt1C3mT/vvbBKNwZVfW0Wsx4hiu zdGswm66YYu9v3krMZ8uJn4pwd+oKEopqeIAV58GEg8xeJuZ+WWf+9/cJ/goY5GP2lUzEd pDNB5/ybTMgYtwoDx3uKGARab1XjrJs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-468-4-ZfvrebNs-_RCcug1dMgw-1; Wed, 26 Jan 2022 08:20:52 -0500 X-MC-Unique: 4-ZfvrebNs-_RCcug1dMgw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B5A2483DEAB; Wed, 26 Jan 2022 13:20:51 +0000 (UTC) Received: from [10.39.208.28] (unknown [10.39.208.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9F5F21F43D; Wed, 26 Jan 2022 13:20:50 +0000 (UTC) Message-ID: <302ccd65-57ac-5b68-2238-8edbb46d882d@redhat.com> Date: Wed, 26 Jan 2022 14:20:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH] vdpa/mlx5: workaround queue stop with traffic To: Matan Azrad Cc: dev@dpdk.org, stable@dpdk.org, Xueming Li References: <20211122131235.3270961-1-matan@nvidia.com> From: Maxime Coquelin In-Reply-To: <20211122131235.3270961-1-matan@nvidia.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 11/22/21 14:12, Matan Azrad wrote: > When the event thread polls traffic and a virtq is stopping, the FW loses > synchronization in the virtq indexes. > > It causes LM failure on synchronization between the HOST indexes to > the GUEST indexes. > > Unset the event thread before the queue stop in the LM process. > > Fixes: 31b9c29c86af ("vdpa/mlx5: support close and config operations") > Cc: stable@dpdk.org > > Signed-off-by: Matan Azrad > Acked-by: Xueming Li > --- > drivers/vdpa/mlx5/mlx5_vdpa.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c > index b9e84dd9bf..8dfaba791d 100644 > --- a/drivers/vdpa/mlx5/mlx5_vdpa.c > +++ b/drivers/vdpa/mlx5/mlx5_vdpa.c > @@ -250,10 +250,10 @@ mlx5_vdpa_dev_close(int vid) > DRV_LOG(ERR, "Invalid vDPA device: %s.", vdev->device->name); > return -1; > } > - if (priv->configured) > - ret |= mlx5_vdpa_lm_log(priv); > mlx5_vdpa_err_event_unset(priv); > mlx5_vdpa_cqe_event_unset(priv); > + if (priv->configured) > + ret |= mlx5_vdpa_lm_log(priv); > mlx5_vdpa_steer_unset(priv); > mlx5_vdpa_virtqs_release(priv); > mlx5_vdpa_event_qp_global_release(priv); Reviewed-by: Maxime Coquelin Thanks, Maxime