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 84D1F460D6; Tue, 21 Jan 2025 18:08:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65C5D4060F; Tue, 21 Jan 2025 18:08:29 +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 40FAC402E1 for ; Tue, 21 Jan 2025 18:08:27 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2173.outbound.protection.outlook.com [104.47.17.173]) 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:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=E40hPw3PNzKxIkvz0NtKmt3GjphF8pzERKFTvIldYbPmHsdQlGuq1zcWCH1RnoNjqM5kbUgHS5o9TcNDK0fDAbgJuUfOFYCvJ5VTEjTvhVP+0uOqS1u7xZ/XyBKUUI9/uqtgkzfjSjqIDeqCzHTB09b50wrIrJ/akBKcZZd5pmWuSHU1tN6F3luG+AaGCq5d+VSLV1/ctpuc0bzUxBJytoQ6sVN9kbrOKjAQT4kBb4smlV2pwhsxBLDS52332ZD2dfs/TIzfF/cRUNpAD+1vWspugPn5XrbeB80y/vBB3Nlbk/fqVGn5e3mZgj9Ftu2VLSEWWpAFYMKoarr/GB+R0A== 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=PPyTV6IeTgV2gWOw+FvXAf/MnVF9HhqPSGhy3tL4xU0=; b=KzmklUtpOHczmfCnAKf3hLu8z3yTBMvozDFhOBIXmIS5WrQ5BfVKaIMePO4QoPGkjia/JDcrDus51EqQYh2RMohhXWkmUb//67fLtbgDM4/TJfD5xsTxNh3Ms58UNWvbfs+IdoiYWCiC/iableUuUaS0X2zd/Z+UqsxNlFdAIjvW0biR52/kaNxCsOQZx+/sHeNb66Dn/Py44fVA2f0Sc5IJl0YZRXwYoJEJ0TSHBzUPBm52RBrM0s/Zd/ZXQNv9ZcVQvskL11E9NBOjjRNrTzZRLRQdHVZ0UHIbfxHSolezHt/J3Gfo6NpeN+s8JxEhpq8ybqHSP6uyCSDE9nvBQA== 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=PPyTV6IeTgV2gWOw+FvXAf/MnVF9HhqPSGhy3tL4xU0=; b=fBLqQiDjMtH3dFHy/4QL0G2aqnLtHjikpcGfZVBnKOUQCEdK04Pi3ang5UhV/U/yi/FrpBoc1bMdgfWRC2ZQyG6CQARUG3K/Ev4MGXEljP0iKiuHpx1WjI6quvc69mEgroTb/3kP8DtObkFqhfqqsvtnkhXhOjVr+XV2GkANjFM= Received: from AS4P251CA0029.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::19) by AS8P190MB1350.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:2eb::12) 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:24 +0000 Received: from AM2PEPF0001C70A.eurprd05.prod.outlook.com (2603:10a6:20b:5d3:cafe::99) by AS4P251CA0029.outlook.office365.com (2603:10a6:20b:5d3::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.22 via Frontend Transport; Tue, 21 Jan 2025 17:08:24 +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:24 +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 , Oleksandr Kolomeiets Subject: [PATCH v1 03/31] net/ntnic: add return code handling Date: Tue, 21 Jan 2025 18:07:41 +0100 Message-ID: <20250121170814.3252171-4-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_|AS8P190MB1350:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: b35ad57f-4380-458c-8f6c-08dd3a3e375e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-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yByUmVyMzIM2f4+I?= =?us-ascii?Q?JE6honubKo3COyB5Sif8ZemTthsOodpqFlXFFgTWNdvOUnyU/ryi1CqJrMdU?= =?us-ascii?Q?wyQMBsCnsQkZdetpQ6A4tVGUammxYq1jGjYJj08/Pmr5l1YaxdQjVP2auRgJ?= =?us-ascii?Q?88b5U4V78CEkojzajpTCwREtSdboprtloHJCZwQ1q7flcb2u8IrhP5BneEqq?= =?us-ascii?Q?uw52zjRN23GogsNXieEiP2Qq1WsriRyd2iVHSUNXBY5r5rstlRtzIj4+jNWc?= =?us-ascii?Q?ezAeMeIrwM3u6RPSxFzbXTd4FWXrqhYhC1dgGy7Cvl2/Cktv7qcNE+cKHX7/?= =?us-ascii?Q?0xXZCFTBJCOu6OR0PH7nbMz9JiFJy/7G2SFfgX39wmkS6B+Dtq2+C0xn7O/i?= =?us-ascii?Q?vhQDoDfVN779O3zmDc+tHzx4jvddfm33hNu3lpT6YWZiWySrkZhfV/3JlPUX?= =?us-ascii?Q?tTC2+Sefc+kChC1zMQV99heH3yUOPMEj0AiuU+D0YCIwhG5xXC2E8xmzEaSF?= =?us-ascii?Q?BhO7nb1KJRw6eLLranM2SP0H10X3IS5IJPhgRUyo28fMj9lirraFKVQ5gco2?= =?us-ascii?Q?dYxrKTYYU00xmhDv9qyPsRPWfN0zFxyYI7P9VHiHBLD3/VKzglABMaT6srTT?= =?us-ascii?Q?XWPYbwDM8F07xcc=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)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: WlnxhHFzMGHfEVdIY2JEcRI3Wff6s46dj1l6yeZLtYKHRO/j6Hin3NUUQTYAIjL4O1qpPp9kEovqc/TF7Vr7OJIsAld9s9uRW7KblkCXehFzK5sO57cQlrIKSoUmKOah0bezxv3tOuzOqQva3fBPMFm9xm8XGIfIJVBwMz67od1tN75okqCjgYtov5/EidS1z2JaGtRGH8fKVYvo3E7wZYEe2UPqFWpETjaKngXAxIMIMKqFae55JTO+QyRbrVocF54mQY4mOVWEwd30aY9P50h9TX/pYUhcwuh6FMD30rnRbMzTzLPEENw1q0yZrs+Di7HIW1Jh2UVtJL1LJacP673uJnBaR1nPvZYBbUZi+HAcWv4OgMtuaDRgkz4raDbgm0e6j8lL+U/kCPpfB7yrSgWscRpEENE47w+TKeIqS2gCaN6Lby/FIgkXz6MCECMm2F7FUfv4D7uu++hrumir8KGQCH6DtpRkaGbBwiOWS8JzT/kEx+mbitQDLv+fbCDhZNCwJ00ThfVanIqM5xZDr2urZIgLffL5Q+QirHhtw6rEk2IBUfvzr8NHgPqOaqGfLk0aF+lwnjLUHQVub/UFZjK2ureY44gH3/vKRfNT0roSfjHL9CMyJEYgIcDQO1LSf9TeRPCkrMSknE5kspKDfg== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2025 17:08:24.6399 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b35ad57f-4380-458c-8f6c-08dd3a3e375e 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: AS8P190MB1350 X-BESS-ID: 1737479306-302816-13355-7953-1 X-BESS-VER: 2019.1_20250117.1903 X-BESS-Apparent-Source-IP: 104.47.17.173 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoZm5oZAVgZQ0DQ5LS0txSTNKN XIIMUgydA8MSk11cAyzdLcyNAi2dRSqTYWAAIq7NpBAAAA X-BESS-Outbound-Spam-Score: 0.00 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.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: Danylo Vodopianov CI found couple coverity problems which were fixed in this commit. CID: 448984, 448982, 448975, 448969, 448968, 448967 API usage errors (BAD_COMPARE). Add memcmp return value checking. Coverity issue: 448984 Fixes: 6e8b7f11205f ("net/ntnic: add categorizer (CAT) FPGA module") Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/include/hw_mod_backend.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ntnic/include/hw_mod_backend.h b/drivers/net/ntnic/include/hw_mod_backend.h index f91a3ed058..40002f3343 100644 --- a/drivers/net/ntnic/include/hw_mod_backend.h +++ b/drivers/net/ntnic/include/hw_mod_backend.h @@ -114,10 +114,10 @@ enum { typeof(be_module_reg) *temp_be_module = &(be_module_reg); \ typeof(idx) tmp_idx = (idx); \ typeof(cmp_idx) tmp_cmp_idx = (cmp_idx); \ - if ((unsigned int)(tmp_idx) != (unsigned int)(tmp_cmp_idx)) { \ - (void)memcmp(temp_be_module + tmp_idx, &temp_be_module[tmp_cmp_idx], \ - sizeof(type)); \ - } \ + if ((unsigned int)(tmp_idx) != (unsigned int)(tmp_cmp_idx)) \ + if (memcmp(temp_be_module + tmp_idx, &temp_be_module[tmp_cmp_idx], \ + sizeof(type)) == 0) \ + return 1; \ } while (0) static inline int is_non_zero(const void *addr, size_t n) -- 2.45.0