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 862A9460D6; Tue, 21 Jan 2025 18:11:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DDDF40DF5; Tue, 21 Jan 2025 18:09:05 +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 1AD2A40A4B for ; Tue, 21 Jan 2025 18:08:47 +0100 (CET) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03lp2240.outbound.protection.outlook.com [104.47.51.240]) by mx-outbound40-251.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Jan 2025 17:08:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X7bBhA+c/dQ0f+Bjy7wqeLzByPc1dumvjzToVeiNUjagpCO6KF8nVwSP23oEHC9yXBOK3uDzVGzeAByeCF4L8jB2CjY+s67oQesh+HBe/cU+vgOTC0bVLgPOaTBMvJzLdv2JGDc8+bMCsjwSJlkxEz1KL/qAdpGitE4q4hQUiwZjEZixVnVV2ruK38Uh8TlqitQyIdrmybkl5sqjVISx9Yw203g163pMsEn51e1g49kkECObgwjWZ29ALHbjkSzQSYid5hRsvXFXV1eAucUxX3U7i5IOlAMWgJlTB8d0ssYhV74xqLsisFhN9sbgB91iRiH7qtoY8NxUqSowUh5TGw== 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=zlBUzR/DMKNvuSvDqFx4bgWM0Sb0DSVMUj+OSjokHCQ=; b=ZGQou+ffID3oaicWFA2R0jnye3KPv7CeX7GZb+tuSNjTtJi9obpgOTA9XPBxa1r7SXinCrIwXa8wrNlJt8yvvWStn6RCtEF2Gl9LJq6l+a5UHK0jYlLHTtdHbsDV5I14UjTOZkGGc7a1Wpm8qt0qwrlt0Bnn8AGSi4xmiu7uKXheTywbcV5Pzz9C5AEaFuGcUiRmUCddRh5EXCZizhDhIP9zd76kHooidP6+xXmLeJC7ub1vvZDijZW7KVDM35gTMIQjELJ3HW8JLruMqwcCmhkwtWkvh6o5Hn+vPC2hdtCK7VuDS6C4mXjP96h6Cda8sY9+ZhGk4HpjGolbrS+5Hw== 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=zlBUzR/DMKNvuSvDqFx4bgWM0Sb0DSVMUj+OSjokHCQ=; b=iSsrWElWFxn3P7POZl4nk5VANzPRAVnfTbIPZwmw2QOiDzZwYzg+L1BM6/RF9AcquB/sbRuR2l9sTQ6+EQZILlKbnTAWaq5/spugOXijUhADhyT7JjwyWGKZ4dvZClbIVSEv67pz3/rlmH9movlV/iIg5rkgmHdheDi8xSfxndk= Received: from AS4P251CA0022.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::14) by DB8P190MB0779.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:123::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.21; Tue, 21 Jan 2025 17:08:45 +0000 Received: from AM2PEPF0001C70A.eurprd05.prod.outlook.com (2603:10a6:20b:5d3:cafe::29) by AS4P251CA0022.outlook.office365.com (2603:10a6:20b:5d3::14) 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:44 +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:44 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, stephen@networkplumber.org Subject: [PATCH v1 30/31] net/ntnic: refactoring of the FPGA initialization Date: Tue, 21 Jan 2025 18:08:08 +0100 Message-ID: <20250121170814.3252171-31-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_|DB8P190MB0779:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 74496b12-5a42-48d0-3d7b-08dd3a3e4356 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?6n4KUyiyTgtT/B0eW3JcXhZodasrIT2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p4ziUk0BS3NOXdYfPjTAwGdOIekHkCm+8Sv3nOQOmL/+siNqKKH?= =?us-ascii?Q?6l8PUDw1klJXqJgyXmxy3CQlBhCD43O4EfZp+GMnNE0njI/LKoi3/caBzvCD?= =?us-ascii?Q?yM0qSsbHpnGQrHDpxxARymAPletDmwpjDCzdUWUuA33lUIAczRY3dPPIkenU?= =?us-ascii?Q?bwiJNfs0+XdsozflQkHr+KhJC4b4lmI0AvUa2zXIJHC6qbQuS2T1Poyo1MQd?= =?us-ascii?Q?td4/CsUptg9eWihp2oeZzpGkmyEzbTrlIgoXXtHZfN2tOW0SFnU0js5dfkKi?= =?us-ascii?Q?DjCXyEl8KEmJiS1UADJiSHMvPhdr583q5d56pCd95FBA33UbxPn5f6tDZTeO?= =?us-ascii?Q?vyqa46xqs/yFLIUsweauIIz91bcoUA/KTz2laNiE9aNKieJR+zUH9DcyVvDN?= =?us-ascii?Q?loNjz4OYrOSp5Zoe4x8mYKJn/2TmjEN2fs3PQRE3jjP+oko9PidbLdyrjUzr?= =?us-ascii?Q?se0oT5o34w5XFKHvuz6Yi7tsUEYOo79CF7rWAFI2G2i6eqyIIn+qlVyXm3+A?= =?us-ascii?Q?7ufguQXb8VkT84b4Nu58NnZImx12TohZpN7TOyW5BVEhY+Q+WmVOWg=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)(376014)(1800799024)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 0YexiR7gRC/u6GX/vpNvdX9INRULj0IlwnMytljGUbRS5ywSir+yF/9C/9xU2uNasqWToL/QRaUegLZQS0VmIjEoEgAHUHaOXdHJVO7PLPu/ZIUxLYCxbNxfSz5ju1Z8WkWPWp9grLXsFxR66LzxEWK9aXZ9391xn9F85OEqxRnel9qtFsDUh2x7CKmFsooWEB+qslppCM3wV1yMmjauZcofR2TD3FyfYdPF8wxsaVR4lkHR3JlLDlhfpgpxX1KeIvZ1tYO2SHApoqKSmOp1djo1xBkgkaSr+olSWoMtjGqWMPnKfJ4ivbVGznHEb7DZ3g9ob01xdKiVHAe0CRtztH+PbvpPazNuzqsoU7ifz7KAv8n2d00ezgon6jfRNme77EBwubc5wh2IC0XkgQYoPwTRShUWc9PnWv4y+LDI5eXcQm61ZXMAkZF2GK1g/bntszWnmHiOrGTICS+MG6hYei9iTIsr25Z+jLvdD4zj3r9ZSLoHz9HXN2SiGcG0OoWrJDb17Wp7/PHMAOc4dIMBQnuW7/6fRjvgqtVc9ESOnL4exNKSCeFBpRziA2HG6M0nYiH1PnZYoJ402GZ/RDwdq5E2P9KZyIeo3iSlrmp820YdACYqUFMI17Hm+U8VADRw0n8tfT4O9mD7N44WqS3k1w== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2025 17:08:44.7493 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 74496b12-5a42-48d0-3d7b-08dd3a3e4356 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: DB8P190MB0779 X-BESS-ID: 1737479326-310491-13356-7766-1 X-BESS-VER: 2019.1_20250117.1903 X-BESS-Apparent-Source-IP: 104.47.51.240 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVobGJmZAVgZQMC0xxdAizSw52c jQyCAxLdU4Oc3S1NTYMtEwJdXSxNJCqTYWAHxAtF1BAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261957 [from cloudscan21-172.eu-central-1b.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 Remove unnecessary checks and logs. Signed-off-by: Serhii Iliushyk --- drivers/net/ntnic/nthw/core/nthw_fpga.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/net/ntnic/nthw/core/nthw_fpga.c b/drivers/net/ntnic/nthw/core/nthw_fpga.c index 88641145ec..5ca186209a 100644 --- a/drivers/net/ntnic/nthw/core/nthw_fpga.c +++ b/drivers/net/ntnic/nthw/core/nthw_fpga.c @@ -265,18 +265,14 @@ int nthw_fpga_init(struct fpga_info_s *p_fpga_info) nthw_rac_rab_flush(p_nthw_rac); p_fpga_info->mp_nthw_rac = p_nthw_rac; - bool included = true; struct nt200a0x_ops *nt200a0x_ops = get_nt200a0x_ops(); switch (p_fpga_info->n_nthw_adapter_id) { case NT_HW_ADAPTER_ID_NT200A02: if (nt200a0x_ops != NULL) res = nt200a0x_ops->nthw_fpga_nt200a0x_init(p_fpga_info); - - else - included = false; - break; + default: NT_LOG(ERR, NTHW, "%s: Unsupported HW product id: %d", p_adapter_id_str, p_fpga_info->n_nthw_adapter_id); @@ -284,12 +280,6 @@ int nthw_fpga_init(struct fpga_info_s *p_fpga_info) break; } - if (!included) { - NT_LOG(ERR, NTHW, "%s: NOT INCLUDED HW product: %d", p_adapter_id_str, - p_fpga_info->n_nthw_adapter_id); - res = -1; - } - if (res) { NT_LOG(ERR, NTHW, "%s: status: 0x%08X", p_adapter_id_str, res); return res; -- 2.45.0