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 1821FA034F; Fri, 12 Nov 2021 15:43:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CFEBD41154; Fri, 12 Nov 2021 15:43:05 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2084.outbound.protection.outlook.com [40.107.244.84]) by mails.dpdk.org (Postfix) with ESMTP id 1A79240692 for ; Fri, 12 Nov 2021 15:43:04 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hc/9Aop9jeqhwUCprt0j0n2f8nWq0C5xAdPkn89B7jbxx4SxkkbLWHkzwIb1K3nGsqZPgg9y8eK464e5eJJD5mV1EsGWt7R+d4Q3KygwWzUkxv1+8EmdCWIQdlHrHvzTagzBKO4YIOFGFSvYsJk3FQMpCFPzBzUca/dWMMaZAevQcaW6xZqmG0/GoVE31j1wGw+KafpRbd4SFs/2AGxAMYRHuUnE1NX76LsH1/Tyxtz1vx4CkNT2JQhIZKU0ilz8CfnRYZd5hspit4B1LrJ01P2nhl0cM+Q97TERBRW4aLBL7PRg1swKPDLf7mvNAZYoIJLVICDibnC4fPoY1qA8MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PCFnsS22mN2U+uOQgIcN+oIxkDxXKcOw10sVpv4GALc=; b=l7bgHDxxJdYcR4QgSRKGxu2OGXo6Q6ThbHwJf+WB7gIgBrTvlEbSMvCnL60EAhGkNGan6gDdscIZDQn5CdBCmnXOoz2AMgLQ/cZYLKPFrhlgv5OckDlAgRjVnLRHdq/amhh/o9tzla7oyf09vy9QQ0nMxxA+6aO3kSgjVAVuKcyVntt+N4o+lWzWxlBNV5gyh1mDVgL2ZfO9y3YW3qy2A6knKWwvuDm3dmwQDQ1S5JePxLFSpUDZgpqOpdBd7u/tjaqB0CO96HdKIr8kMuiE7vrzvhU1llbIZhYX5IFnx6j3RpijJjN2kHIwH/cpNXoMchEgmeQ4jE0lvhiEy323Fw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PCFnsS22mN2U+uOQgIcN+oIxkDxXKcOw10sVpv4GALc=; b=oegHhyrNvVK/x9xgiJ0W6S48KSRnAK7UMxgTu0PPZKKtkTx4YnkmduFXIlUse6EcfwsuE4VIEm9yWgK26E0wf04s+ocDb2jPpE9Ss1eBD/b+OOhKgdNNUk/jVC/CPEHlLk/oG3FSv3Zp8lZ6he0TW4TMe93YEKpLH4FrzOAVog8ucN/A4XtpbiYWWgGwhJdQnx/AdEiykOVkoBdy7hQ7ZdOcUPEjOlr06LZOiihGL0IqKMFc2zweJ9wB/3va5ZJ/i+1F6zgMEioZzbi0sED1psOELijRiLH6dRJLi/3jf04J7aykdZsdFSDTC9fNXSDbCi79PvogF/3aG5ADNJZHBA== Received: from DM5PR18CA0058.namprd18.prod.outlook.com (2603:10b6:3:22::20) by DM5PR1201MB0201.namprd12.prod.outlook.com (2603:10b6:4:5b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Fri, 12 Nov 2021 14:43:02 +0000 Received: from DM6NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:3:22:cafe::e2) by DM5PR18CA0058.outlook.office365.com (2603:10b6:3:22::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.17 via Frontend Transport; Fri, 12 Nov 2021 14:43:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT021.mail.protection.outlook.com (10.13.173.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Fri, 12 Nov 2021 14:43:01 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 12 Nov 2021 14:42:58 +0000 From: Bing Zhao To: , CC: , Subject: [PATCH] vdpa/mlx5: fix return value check of mkey create Date: Fri, 12 Nov 2021 16:42:45 +0200 Message-ID: <20211112144245.9389-1-bingz@nvidia.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2a2c9ccf-3de8-430d-450e-08d9a5eaba78 X-MS-TrafficTypeDiagnostic: DM5PR1201MB0201: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UudaVtgzT5b3y/eF4dt/c5l3RN3zNZtLimfhsPLdIJtR8H4bcJ6lH8iyVfIxXWxpRxQITnGHPD0/75Os/EcHjjypijC/8YRyOVSkyEsLwHqxdsxVnO8iP658zxTgrS2MsSRJlyGTWVN2XBp1AQSAihJZX5i7ILlNUve2bduTsWLKwrb0cz7tEGHW9/wIK3gdaOdobjJtVCG6qAEG5uay+0LCL+H8BP6vmLJExTiPc6KIOa8EH/xV1aZpLxma2s5wmNuxMbKEHIM4rZMTs9nlxNK3vJKiBc7Bvikaa11Tu1lNuyPfLYwtzi1rW+29byRVtpBTQNMqkUasSq3ylqmJ7D8ZdKMwrOejk01qrM4jfJq4yyQH+LNIAOFSgZ4muwbe4Of978BnvD4HcT0FWY/2yX2FocaEpTkA4sxCMljpW1H6X7bZSZj9m/XTcENuABEuLsd9nLf5MZ6vreaB5rppTEfF2RF4dtED/mzQ50hCbYXsNDRjqdlhoSvIfT7ZVq+OL7CiWGH28pCANexey1FiFZD8ag65jYXV7kZBKyLW3VbOh8qlQ/CsKiK+6X2WtGbF4Eod9J8d0wvSFnkNZzuYwvEsa+bYD6XEVwMYoIpLXdtEaii3TVJWvL8MLstqID7bDJuf0Z5fFFXQRP2SzwnCngWN/02J9cFJqmIuw8HDuw1eTtiJ+p8paOIydUf5ackdDQ9WpyMMncZx7lFnVqDNcw== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(86362001)(110136005)(2906002)(4744005)(5660300002)(82310400003)(6666004)(54906003)(4326008)(316002)(70206006)(336012)(1076003)(426003)(36860700001)(6286002)(508600001)(7696005)(107886003)(55016002)(2616005)(186003)(16526019)(8676002)(8936002)(26005)(70586007)(7636003)(83380400001)(47076005)(36756003)(356005)(6636002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Nov 2021 14:43:01.7880 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a2c9ccf-3de8-430d-450e-08d9a5eaba78 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0201 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 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; } -- 2.27.0