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 4BF7F460D6; Tue, 21 Jan 2025 18:10:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5216540B9D; Tue, 21 Jan 2025 18:08:57 +0100 (CET) Received: from egress-ip11b.ess.de.barracuda.com (egress-ip11b.ess.de.barracuda.com [18.185.115.215]) by mails.dpdk.org (Postfix) with ESMTP id 797504066F for ; Tue, 21 Jan 2025 18:08:41 +0100 (CET) Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03lp2113.outbound.protection.outlook.com [104.47.30.113]) by mx-outbound22-172.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Jan 2025 17:08:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ew12dg42EsF1hKDeYQT899hYU9v2cAl8Y3hjd1Nwr4xQ9qcZaACk+/cuUDsG9vUCcMCf7gjhweiRVcSwzsuluO8Lw2hRlTbYEEQWe3nMaunsd+O/7m3l5/TEDmryNAIqulJooE01APqOvKmEz+gsz6CzIeutGnEnZ5MokpO+QENZI03pG0CgKk0Smsgs/rCsjY0SNfj0rk4fcFNkcGmwgEShnB1WVkfTO4j0VQDO9PWglMPlNYI2zY+yj5peNS+Zcxs+RYe0ujMW2x8pda2k0FUNoX2ql5ulBWK8iflA5AXAXIvS25lQ/oa/IZm6I5L6ydCmcMxv7EGEbMwRAVKyAg== 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=MwuI1bQtyF/7O/nBCp0wG38zG+1DpmYgaws0c15isKk=; b=XS8sJx+7rWfS/FVjHQu+cZ+v9PVI9w00UtU1zKZIDwBB/CVxC1ru8ujha82IV94GFQvhDP21i8plnaQt2SgCNwePb+DU0ZwxPdj85PGFmxz9n0mNgGMvQJnUPRwXRqdoYNFUZnLhsQtlQo2FI4+UoNMQrAZ+MBakL4HxRUEnjivjdQrGuCrVYLS3QPNhLZvdnXs2c8HY2lkCyA8BTjUyPi2nJVAAy+zMKWQIXgkO1UJkcSFZWpKrilpXN0T8x3m1kPnsxR+0mIUGslA96AIlZ9Zm2BOdlrJSpphzlHEwdo+HfnKhI76djKtqpx/Sq6F1wQTqOXOAGUammQbLEzCQAQ== 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=MwuI1bQtyF/7O/nBCp0wG38zG+1DpmYgaws0c15isKk=; b=BnHDInVDGGLnp+dL8lV9T7h4xeFVfPzY/lQQcF0vUq2lW3fs+W/g8PghWYEhSGNRO6pqbsMkBaBMufuJgtMQCDKsobT1UIWbgqzY7sxj3WoakrgMvG/5/UQFBZCLQoZhMI86w329xYYee7Efkr3W4VpwkqlS3HxN/+rn4AnPKkM= Received: from AS4P251CA0018.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::10) by DB8P190MB0713.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:122::14) 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:39 +0000 Received: from AM2PEPF0001C70A.eurprd05.prod.outlook.com (2603:10a6:20b:5d3:cafe::f0) by AS4P251CA0018.outlook.office365.com (2603:10a6:20b:5d3::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.21 via Frontend Transport; Tue, 21 Jan 2025 17:08:38 +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:38 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, stephen@networkplumber.org, Oleksandr Kolomeiets , Danylo Vodopianov Subject: [PATCH v1 23/31] net/ntnic: remove extra check for null Date: Tue, 21 Jan 2025 18:08:01 +0100 Message-ID: <20250121170814.3252171-24-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_|DB8P190MB0713:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 2accf737-b2a6-4c9e-b656-08dd3a3e3fc2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|82310400026|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?CLMOfrmOF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t5yd8x8tUy0?= =?us-ascii?Q?pTaT7sZgRQ8U1yLrCejA1k2DXsUSYUpO8YYg4+sVkjkZiDD/VCSNkdwjBIYV?= =?us-ascii?Q?EHUGUS1FqeP8U2ToszlhKNZjsimo5J3/+Ow5nmUPcnAcLTcEiViadM9SgSA6?= =?us-ascii?Q?TTas9W9gFhIfL4dd4M3dAjURywrZrcIswKQFXP5zdAXZOz49z1Ten0astvh5?= =?us-ascii?Q?1juuPTbhitok/FA4utFQlmNoa3/hO6IgS4nnjuqk5GHwMgMwaBTN1JSvDerx?= =?us-ascii?Q?UMNlIM0RFd2gavr1WRwr87CxM5Sqhtkav13Dx2q+4EFB8KVBKEAWJ2zECEdj?= =?us-ascii?Q?99BUe9BAusekwB3Dkjm8i0ZWuKAqqU4All6E3hzX9evk6gKuUSFY+CQ7NfQa?= =?us-ascii?Q?FYsBilMmGRPPYzTJq8I08GGyl5SDehmO7TRjzMfDiQmvr6OmsfK71gyeJRO0?= =?us-ascii?Q?WaERRYLmggfymgxuL6J2hsa8wxhn33E7bhAWJCjyJ8k26lGompJT868azgCB?= =?us-ascii?Q?zmep1ENFSBwtvi2tqBBY4LNXkQXp6byYi47fTObvtCKdkoM2rfcGjZlcQPMV?= =?us-ascii?Q?jQD/VtNrNzII5LN/B5RFNgDmfto9/tRVBIRp6ZDUMDBRHhniypzRNg=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)(36860700013)(82310400026)(1800799024)(376014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: s+EkRpKv7MPgnMqI+880eS1Wmb+N9qrrQHbR4jjMLjv7mQKdE7XLHO5tNVlI3Q6r4aRVBq5PtBvDpDW4XFqHCc/mzmKUGEAY1ZG4tI2joWihj9HDboE9yrlPxrj4rlv8Olb9Eua3ZzFoktZ4KYUHizW+9XwOKmERm1Ada8f4GGt8nuKEEFKTSFYNXDE7+f8MryAsktxrMXBbjSgEYTlLo7GkUxmIelSN0TpcJ5h3SujdJDgLlaUYO0nQLmIR0kNU4VDIUu85L0QsHaASEyWE3/7rsRnQ1yS+6On7bTvzth6YKR6DGhp98o35G03hRcjMV5pwm1KG0Rb2Ys3dINwJHr46k9No9TPfKdOKj8kgiD3sJ6EFK/qKGjqV+tzW2HW3AvK95fT3a0hAKbZ0aWpxgS2b/BVhda3YWtyByhOidv2nR/7RVcYPeqgYvKKcuKfs5Ehly6meW1PR/OQieIjSD2tQIOPcNQvmdfR9MSzHvWLK09DDIqAqw/6OjiaSdeRSv2fawSCogeyURFqoUdqD3lw0PbwMG+mZ2r2MomODHz56/TsMuFWHXzlyHTzpWJnmEYLQN4r/l1b8Km+uQh6iBsmAAU7jZ8KD9b02hU5AQlRmtHBeT1FTok+v96AqtXFsr01DgrrBlVj27Al7pR+4gA== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2025 17:08:38.7180 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2accf737-b2a6-4c9e-b656-08dd3a3e3fc2 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: DB8P190MB0713 X-BESS-ID: 1737479320-305804-13349-8297-1 X-BESS-VER: 2019.1_20250117.1903 X-BESS-Apparent-Source-IP: 104.47.30.113 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoYGZpZAVgZQ0CjFMs3E3NzU0t zS3Mzc1DzRKMXIxMgozczM1Mw4xThRqTYWAKKAYK1BAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261957 [from cloudscan10-237.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=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: Oleksandr Kolomeiets pld_ptr points to mp_port_load's element, which is initialized during driver's probe, otherwise probe fails and xstats_get_by_id is not called. Coverity issue: 448945 Fixes: cf6007eac498 ("net/ntnic: add xstats") Signed-off-by: Oleksandr Kolomeiets --- drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c b/drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c index 7604afe6a0..cf3271d5de 100644 --- a/drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c +++ b/drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c @@ -645,16 +645,8 @@ static int nthw_xstats_get_by_id(nt4ga_stat_t *p_nt4ga_stat, break; case 4: - /* Port Load stat */ - if (pld_ptr) { - /* No reset */ - values[i] = *((uint64_t *)&pld_ptr[names[i].offset]); - - } else { - values[i] = 0; - } - + values[i] = *((uint64_t *)&pld_ptr[names[i].offset]); break; default: -- 2.45.0