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 6506BA0C43; Tue, 16 Nov 2021 11:24:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 43EFE41180; Tue, 16 Nov 2021 11:24:39 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 4D4E34068C for ; Tue, 16 Nov 2021 11:24:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637058276; 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=c86XdO9IyLX3LyUbiKAr1qKpXwR42Z8JOlpyh4DoEHk=; b=TZPBcjzuluYVxKuDwLlZ5LICrNCX1qSLMSStYPnNg8NXJs1rUKBgiJN3/CKdJ88IAbg2G+ Psg+Ow06mabMiKlrdPLPi8XSRf5LPBI8kwI9jqMTM7ySrdBrp/8XEzTilmXEmAtMysy3j1 1/NOPUi6oGzXUvCopRR2bw/WX3PvVwo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-545--1NZtOGbMXWJ8crXldrMhw-1; Tue, 16 Nov 2021 05:24:35 -0500 X-MC-Unique: -1NZtOGbMXWJ8crXldrMhw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5B4D587D541; Tue, 16 Nov 2021 10:24:34 +0000 (UTC) Received: from [10.39.208.9] (unknown [10.39.208.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 34D0860C81; Tue, 16 Nov 2021 10:24:33 +0000 (UTC) Message-ID: <65a4c5ea-d0fb-c1a4-56de-7fdb99b8ac53@redhat.com> Date: Tue, 16 Nov 2021 11:24:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH] vdpa/mlx5: fix return value check of mkey create To: Bing Zhao , viacheslavo@nvidia.com, matan@nvidia.com Cc: dev@dpdk.org, rasland@nvidia.com References: <20211112144245.9389-1-bingz@nvidia.com> From: Maxime Coquelin In-Reply-To: <20211112144245.9389-1-bingz@nvidia.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 11/12/21 15:42, Bing Zhao wrote: > The return value of "mlx5_os_wrapped_mkey_create" is checked in the > caller. A zero means success without any error. > > The typo in the if-condition should be fixed in case there is a > misjudgment. > > Fixes: f26e06d97d57 ("vdpa/mlx5: workaround dirty bitmap MR creation") > > Signed-off-by: Bing Zhao > Acked-by: Matan Azrad > --- > drivers/vdpa/mlx5/mlx5_vdpa_lm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_lm.c b/drivers/vdpa/mlx5/mlx5_vdpa_lm.c > index e65e4faa47..43a2b98255 100644 > --- a/drivers/vdpa/mlx5/mlx5_vdpa_lm.c > +++ b/drivers/vdpa/mlx5/mlx5_vdpa_lm.c > @@ -47,7 +47,7 @@ mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv, uint64_t log_base, > (void *)(uintptr_t)log_base, > log_size, &priv->lm_mr); > > - if (!ret) { > + if (ret) { > DRV_LOG(ERR, "Failed to allocate wrapped MR for lm."); > return -1; > } > Applied to dpdk-next-virtio/main with Fixes tag fixed. Thanks, Maxime