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 0E58E460D6; Tue, 21 Jan 2025 18:09:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 51B5040696; Tue, 21 Jan 2025 18:08:44 +0100 (CET) Received: from egress-ip11a.ess.de.barracuda.com (egress-ip11a.ess.de.barracuda.com [18.184.203.234]) by mails.dpdk.org (Postfix) with ESMTP id 8AC1940651 for ; Tue, 21 Jan 2025 18:08:35 +0100 (CET) Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02lp2106.outbound.protection.outlook.com [104.47.11.106]) by mx-outbound11-0.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Jan 2025 17:08:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SCCItkkC0+GiTk7Wa2QtTzBGUK/blFCYmD4LGg/peYufjs/TwKXdHj4Dbo9ceRyYtoxGatpDuv7rhOdE1oKgB7Oa0+uDuK9+0mWymNNlXGM355KErbpFuYWXL98cf1IknWL1B8huYmcfFn13RnAJsir3DNybOX1eXQc7rhZ4SzsCMi5KpBYO77j8NJqnjGBUysvqzEa+Xy3TtXfN11sJ8D41PKKXAt3zxuRdjtkVmW9XWR90i0aIuUzQxqEr83yFYLejvQVhQZl3o3j8OlMHHk019Umz3O0GmhBguPB7xnPmJ0QLIW2kz5O0YVwL0zulgxtu2V/D214OBfpm8WbUCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=rCOQ/aZofygXRXj1lf6UCpmFBmrU3Q0tsgG3PMZVrD0=; b=UnovS1U+9/BmeJ0GrVs88PG6qV6nYyKcxuwOKR6KGEGMhY5rX9j+aCkNdf3wPYh92Un0ywiCCfnSMolQtdsHfRk4TapHU8wxHxPI/WU0dSS20/kRVjQjmfO/eDAKa64903jqTliNuWhfg3i3jtMp2jSB9zncCXwOuTOKjJSNCrN4fa9xcXHms78Km0/bxYq7zikTMG+xSz94dDIx4ZoVuUivbAxGFDAuVZ9PN3kr68r0b+z37/gsJa7yQ1Pcc7xaqzD61+uNrG/gvS7AQ55jiWIcsLQ6jK2qkUk4f4dEAYTDpFJDJh17u/pdG0cz47TiY0q/RXqq6EmMeHPBsuZCHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 178.72.21.4) smtp.rcpttodomain=dpdk.org smtp.mailfrom=napatech.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=napatech.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=napatech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rCOQ/aZofygXRXj1lf6UCpmFBmrU3Q0tsgG3PMZVrD0=; b=YO1jh9GhBF/fYmMcb5NI4pJ67nsazdwoezbS0APbcRiW3uz9o91Jyfl/p1B8bhigo3RWxoEY2enF+XL9Pg5apa07lWThG++0Wk7avpr0JuNy712NMnTnZmPsDqjhiXrl2YiV/VeiqOIm8SrjgwOI2KThGw0YwaLoAwt/qwljJks= Received: from AS4P251CA0021.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::11) by PA4P190MB1358.EURP190.PROD.OUTLOOK.COM (2603:10a6:102:104::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.22; Tue, 21 Jan 2025 17:08:33 +0000 Received: from AM2PEPF0001C70A.eurprd05.prod.outlook.com (2603:10a6:20b:5d3:cafe::11) by AS4P251CA0021.outlook.office365.com (2603:10a6:20b:5d3::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.20 via Frontend Transport; Tue, 21 Jan 2025 17:08:33 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 178.72.21.4) smtp.mailfrom=napatech.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=napatech.com; Received-SPF: Fail (protection.outlook.com: domain of napatech.com does not designate 178.72.21.4 as permitted sender) receiver=protection.outlook.com; client-ip=178.72.21.4; helo=localhost.localdomain; Received: from localhost.localdomain (178.72.21.4) by AM2PEPF0001C70A.mail.protection.outlook.com (10.167.16.198) with Microsoft SMTP Server id 15.20.8377.8 via Frontend Transport; Tue, 21 Jan 2025 17:08:33 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, stephen@networkplumber.org, Danylo Vodopianov Subject: [PATCH v1 15/31] net/ntnic: move null checking Date: Tue, 21 Jan 2025 18:07:53 +0100 Message-ID: <20250121170814.3252171-16-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20250121170814.3252171-1-sil-plv@napatech.com> References: <20250121170814.3252171-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM2PEPF0001C70A:EE_|PA4P190MB1358:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 461d4d4e-5e52-4390-2cac-08dd3a3e3c6d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?fHBxx+2Tq3xOswTC4OSrWIBNvGXmdyAQ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Zx2NmbqTM/gWkI8C4Qh1BUTPbWdbBhJinhKio2o3R4WPp2Ta?= =?us-ascii?Q?WD+lD0tZDFlylrYHZsgeVnau31jBtgBmpQQrlCpyNhHFbZXalT1I/IGRPhS+?= =?us-ascii?Q?Znhar/UJrI6lFYHYZ2a4IhZ/jgjOlVccl9NjX2BdeKNC1GXRhfmJxURYr/ZD?= =?us-ascii?Q?dDqut3IwsArkgQWMBAmDNMNY8fOJKeg0MZclUntTTdQETGqd6pVU/y1flyYG?= =?us-ascii?Q?QzBJAdHhQtzS3y7khMX7NJeF/CkoyfO9KiTf01TK2k61+18mmbicGZIkbTf4?= =?us-ascii?Q?v0T8/ETWqwAsFxD8ZBLxj4vbV3AbNnxDtFxiGdwiWuXLswxv0r9b6ItzqCt8?= =?us-ascii?Q?fE0Yfu9P47T2f5Nhfmj0/+2aX34pNozci9T7JWwt4e5wdmnDJNpdGPJKAnzW?= =?us-ascii?Q?nKhXXAu7Do32TpFlkK9pP22cBYZNFO/IQlD0ueRHldKWgeG/TojY1XkJwTXn?= =?us-ascii?Q?oP66gDTMNuGMMNT3pO8Ppyl1mcDqYc7XmvliA6YLqi2MJugdVHYLpR9kNSyF?= =?us-ascii?Q?5/xBgtTsqfGRnD3JqcKho+CSmWvdDcefN8T5U2oXBsha4F5c0pg3nA=3D=3D?= X-Forefront-Antispam-Report: CIP:178.72.21.4; CTRY:DK; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:localhost.localdomain; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: jkpR8O33j2aZ00B30Mp4498whn/TZpWo5M5yRBsuXpg/WBghA2GCQzIIojkn0z5YY5QJPaNuhABLy3iU6e/XpzF5wkDqVZ+FvhJ8MrZNpNvnz/WbO9Gfa3gSmgdoE1Sa/jdzO4ebWnQnBKwvagndF1QdFwzysmvAqc0QGxIynklHP/d77IKsSVNpGidD68LxPzANMSIfRYgwOPp++//0ldVMLqlthmqp5dMEBFIchsjoPIfiF/DaMryQzwsEBtBd7zhHZDMucNcCXIj6vTed04UsLG11O9qaOR2bQdRDtotkoLiM+6UUJgMH9gib1jitFiu2MFID0dumq/I3/HLXAR4UqPRO5Ls3IML3FR4L53jP4tQ05WQ93oCzTmY0H4shrkVIakJCDxfmIfdjMmHcNXSz6tfYlaMEGVymoqxtVmtB+XsgkXtuDUInCFQ64zFcLFIqlR180KLxKyYz5LCBOIhwgJPw/vn4hHYkb24VGp4Er4TeBUxeEhFUk46eEKBzXfPfMuzMF2P5bP0Eg3Ro6IkYMkZQyqaPTj6nnvTnPw2fvO08MerJkRs20FE6S9iuk5BFSIq7rvbkuK/MR0PiN3l71X9Al65rRuqax2U6MQxMbW/FELH+8+mgcnMhE96XSfFAtmf8+kP9tFpAL/aQJg== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2025 17:08:33.1399 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 461d4d4e-5e52-4390-2cac-08dd3a3e3c6d X-MS-Exchange-CrossTenant-Id: c4540d0b-728a-4233-9da5-9ea30c7ec3ed X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c4540d0b-728a-4233-9da5-9ea30c7ec3ed; Ip=[178.72.21.4]; Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: AM2PEPF0001C70A.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4P190MB1358 X-BESS-ID: 1737479314-302816-13355-7965-1 X-BESS-VER: 2019.1_20250117.1903 X-BESS-Apparent-Source-IP: 104.47.11.106 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVpam5kBGBlDMwMAoxTAp0TjVzC DJ0DIpycDAJMk8zSAt1STJ0MAo0USpNhYAzKBjOEAAAAA= X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261957 [from cloudscan12-119.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.50 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 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 From: Danylo Vodopianov Move null checking before using Coverity issue: 446759 Fixes: f0fe222ea9cf ("net/ntnic: add releasing virtqueues") Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c b/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c index c178144d42..279a852a1c 100644 --- a/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c +++ b/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c @@ -510,11 +510,11 @@ static int dbs_wait_hw_queue_shutdown(struct nthw_virt_queue *vq, int rx) static int dbs_internal_release_rx_virt_queue(struct nthw_virt_queue *rxvq) { - nthw_dbs_t *p_nthw_dbs = rxvq->mp_nthw_dbs; - if (rxvq == NULL) return -1; + nthw_dbs_t *p_nthw_dbs = rxvq->mp_nthw_dbs; + /* Clear UW */ rxvq->used_struct_phys_addr = NULL; -- 2.45.0