From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 570F0A04DD for ; Tue, 10 Nov 2020 17:04:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4E3DD5B3C; Tue, 10 Nov 2020 17:04:38 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 780F85928 for ; Tue, 10 Nov 2020 17:04:28 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from viacheslavo@nvidia.com) with SMTP; 10 Nov 2020 18:04:24 +0200 Received: from nvidia.com (pegasus12.mtr.labs.mlnx [10.210.17.40]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0AAG4L95012156; Tue, 10 Nov 2020 18:04:24 +0200 From: Viacheslav Ovsiienko To: dev@dpdk.org Cc: rasland@nvidia.com, matan@nvidia.com, stable@dpdk.org Date: Tue, 10 Nov 2020 16:04:18 +0000 Message-Id: <1605024259-18318-3-git-send-email-viacheslavo@nvidia.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1605024259-18318-1-git-send-email-viacheslavo@nvidia.com> References: <1605024259-18318-1-git-send-email-viacheslavo@nvidia.com> Subject: [dpdk-stable] [PATCH 3/4] vdpa/mlx5: fix UAR allocation X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" This patch provides the UAR allocation workaround for the hosts where UAR allocation with Write-Combining memory mapping type fails. Fixes: 8395927cdfaf ("vdpa/mlx5: prepare HW queues") Cc: stable@dpdk.org Signed-off-by: Viacheslav Ovsiienko Acked-by: Matan Azrad --- drivers/vdpa/mlx5/mlx5_vdpa_event.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c index 010543c..3aeaeb8 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c @@ -77,7 +77,12 @@ DRV_LOG(ERR, "Failed to change event channel FD."); goto error; } - priv->uar = mlx5_glue->devx_alloc_uar(priv->ctx, 0); + /* + * This PMD always claims the write memory barrier on UAR + * registers writings, it is safe to allocate UAR with any + * memory mapping type. + */ + priv->uar = mlx5_devx_alloc_uar(priv->ctx, -1); if (!priv->uar) { rte_errno = errno; DRV_LOG(ERR, "Failed to allocate UAR."); -- 1.8.3.1