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 232AE45AD8; Mon, 7 Oct 2024 21:35:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C8B3A40666; Mon, 7 Oct 2024 21:35:15 +0200 (CEST) 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 14FB4402E0 for ; Mon, 7 Oct 2024 21:35:11 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2170.outbound.protection.outlook.com [104.47.17.170]) by mx-outbound43-193.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 07 Oct 2024 19:35:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OvOFiCbw3bNYkFYTXI+A4SMTF2y7utQyTfIor4ieLvTN9JlGpeB1yaCj1920HtsrGbtPXQIzfcGoyyg/wrhTkDqT1rqvdXsWLRdrNPcZBCN4z/6qVqOsquaEFlqUnu0jaKDyyuOekvq/ghDenU0r0T7pZaasYagRT/WJXWPxHt7Mj5SmJsxsq4gLZMVE7fMRFBI5HG2Q5s8fU4hHKUg01SY2yZlLE4UfKSanDCO5wwNyXYQT4NrC9Uq5aGPyMAYbRXJV+eu5sLwbnMyvKXeumoclnWc/PBn0I5sqpXKV5C0BweyAGD9MM2IHj/724uOCAOAXVuZppWXbM/QOQsNK4w== 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=MTEi7ikfOTRuLOdIQdIew2I8fyMCtcMS4R8fGu/QZqY=; b=jDTAZUvdrKx8JjeHf9ABO3r83yvUgndLPW/ge9+JKxXZFNTCGxL99ffywJOH4iPDBA1ILaQXQAW5y0fqm2avN6TiW/38YKDq9oWgIJNHDQkOa/FcKV6hM9KHIMA3xIUnXvOEry9txDBi15uehHcz1Pb2bvsIhcrh66AvGHuLdvSyUlItKGDzeMd/wP94CZFC29Vmti+TjKGmGopkPuRyH/P7x6B2s4NYovzGPHfFRJ9KDEcpedJaeej9WO3TibIfq1W6O1J23QXFcon17zfbdPsFujAclBVLc2yKxPvoxxZJw5OGD1DpwRGAQUPvkNcGhHLPli41AelDyZu3BbR6XQ== 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=MTEi7ikfOTRuLOdIQdIew2I8fyMCtcMS4R8fGu/QZqY=; b=k90FKRL1weTWgtjWQH/YoQARXk0keo5iF9+42cXLr4vHo/p3x+RQllPqKYOjWa/k1sMhxzoC9zhjMKohteAbqdGrgPGHRVVU/6kI6DJin8E05x5KUMd2HzBcMdKWeo4zPNQnN3FdiL7CL7U8cuPNpbtCDLg8Y1zoZBR3l90wf+Y= Received: from DB9PR05CA0023.eurprd05.prod.outlook.com (2603:10a6:10:1da::28) by PA4P190MB1117.EURP190.PROD.OUTLOOK.COM (2603:10a6:102:105::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23; Mon, 7 Oct 2024 19:35:08 +0000 Received: from DB1PEPF000509EC.eurprd03.prod.outlook.com (2603:10a6:10:1da:cafe::ab) by DB9PR05CA0023.outlook.office365.com (2603:10a6:10:1da::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.34 via Frontend Transport; Mon, 7 Oct 2024 19:35:08 +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 DB1PEPF000509EC.mail.protection.outlook.com (10.167.242.70) with Microsoft SMTP Server id 15.20.8048.13 via Frontend Transport; Mon, 7 Oct 2024 19:35:08 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com, Oleksandr Kolomeiets Subject: [PATCH v2 07/50] net/ntnic: add flow filter deinitialization API Date: Mon, 7 Oct 2024 21:33:43 +0200 Message-ID: <20241007193436.675785-8-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241007193436.675785-1-sil-plv@napatech.com> References: <20241006203728.330792-2-sil-plv@napatech.com> <20241007193436.675785-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF000509EC:EE_|PA4P190MB1117:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 043ccbae-4935-4dc9-67e9-08dce70726e6 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?qr1O58jcbOYRHpq4E0GxeBq5E8pfO0MH3OYsB++e9kY20B1nBflmvNNcUpvP?= =?us-ascii?Q?sjgT2a1ZCxNRUe/enHxbpO848JBobRIKKJl5X4UjoTttXlsbsA+UVuX+edFg?= =?us-ascii?Q?eyJglSPO5dddXXNDIt8wXG0knlt2HWWZjRKzSbZIXYJvTOfPaFClAGn/xotE?= =?us-ascii?Q?YieHDw5qWrFkGA99VIdHKCR5MW5qy2i2cB/cUD5+TTTXSxqONzd1PzRQ/Wro?= =?us-ascii?Q?METm9b4DV7VqIcs16noP55thyUjIKqY1HCDqP4UQ2dsAB4ABGyHIBrc7Y6nP?= =?us-ascii?Q?6F+OiiJCIV+w0+pmwzRw768xx45gsqctOLORlMHwUWcfsmcHiS+HlItWa2Oi?= =?us-ascii?Q?pb1Ll23BKYxnAjGRdccSriABN8G2s9buAHBeBTMdSnXd7ro55xCleeFbsTXu?= =?us-ascii?Q?BtLTl8NhHcIRD5wsR2Pznk080uY/WXKAC6h229V1E5TnwWVKv3gpWD22RaAP?= =?us-ascii?Q?eAPQ+YN9NjO+w2Rvl86DmCT7VHabfVI8ePeRRkKOZVqZ5+/KTMHvBWUHZ7XU?= =?us-ascii?Q?Gfqk3Sfrtz7tN7vJGzarN8pWhepmpXHcGKC11uZS2843laDjE8Ccb4FheTH5?= =?us-ascii?Q?gmZYE0kmT+vHg2dNPHBA+NOck87UBOP6H8Et70WxNAXxIG7m94hhP6EOg6W3?= =?us-ascii?Q?ky2snZWet8PBkixt9AB4xbxGvAeb/1yzDC0/RZKlhJODVUQGrw/23QmaDYPg?= =?us-ascii?Q?vNyoW2B4bH29foAT2w9NlSiZR2DgQjDIUTkht5q4OAg52RTY3Lq/5vM0QKZE?= =?us-ascii?Q?DGfQgT29JGPPiSmDT+TsBv6MGPwI2DVUTSFU6Hbp454uUNnZQRgHbbZZGriN?= =?us-ascii?Q?AjmhgHEEPWNDd83+MZBeFTG1frqXG6zzohlYoxsFcN3jVQyAWCCa9uKETpnu?= =?us-ascii?Q?wYBiTv3bokxXUGtWfFM/09uHuI7zt2eX6SZUMsPt0JBc8n/E/Xr/ssbj+abG?= =?us-ascii?Q?ZwwvD77jwZteIuTYDzYMLNCYS8DasErcR+DERYXAFN0ujLstYGztLCdjBfXP?= =?us-ascii?Q?RcNHV7l6zjGNXcsTPJtSNG5JVtUTn8VLp3KAjzVWGOSQSsHFXO0HqpPKs2Y+?= =?us-ascii?Q?vyb3vKKUZaT/VM43rWGaSGzYvstR3Loyvil8TTbgaeOSKTaoIaMsaLk92EgV?= =?us-ascii?Q?ixGGMOhPMcJngrchHqlISHpNHmCxJdtFHo7K2pwKFezSdZHbivHjUyuqOcwT?= =?us-ascii?Q?GNexrsvMYC2DEUz8o46dpO+uxyA3U9wN0c71jXZA427vU61h0KjRnLJ0c2wo?= =?us-ascii?Q?8nF5Xq1iQz/Kp0f0oYWdSKO5DjrT2xZLSXM7O58KW7smoLD+SdjfqnOmAmjq?= =?us-ascii?Q?UgRcvnPoiMgKEA8ATtja0PjOQPI5+x5o1hlYv0shCpcaMlyHoXmShcqtXcS3?= =?us-ascii?Q?f+LfblAZETpBS9+GXBQ0tKWeljXx?= 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: hhoh5Ubjr7j6fipxca4y3HErau/lEcnMYLdAMtwTXuIkA5F+1Qg2DgjTKzPmHLUy3ZKn0oS8kH4xg+v+Gi5u93uhltYlTBMwQacY0sO3+Rt2WV2Ldly676IQOLJHP1t1PRTLRy5ElKVjUJL7cOgctJ50OcFSfb7RiJHjUe8NVVr0oiFD+Yu/SnuTSTByYu7WOoPqBUsjxnTCYJkXVwZxk/dtBlyUCChic0/0lJa5CTkQABrt/N3yk50Jluq5/iq78JgJ8F7ThA8Xb46n0lnoP17nv4YSzi3X9NHumWC4Jvas1LVDyW7JtpOFwATOXQOuMg80bWRT3BqHfDfpb/0kn9CTfKIeZoosTF8BzBlQ0ul4cUpSGNdi/+7UN5giPbNdJBfUKOxH7jcx+cXl2Jjp0K3JNsqt+uWkMj9Mw4/pvMd4QBu9MNy3gIo0VnSyrJxqhVKxSMykXSeGNWrAahadrYqAe1o8AnB/M9QWnUHRzCEWfoUXYMaHxDrTPSCshXAW1EUJg9zkGZjCJOMAkeWHBQNUPJzg2dwQCD8o0xQrSSNJY7qvd/RdIRdbsfIt6A/0Nrnn3JR7GKWQG6Sj0cJyhzaA94aLbV+WP2lThPkWQybxvMeqKXHKDz+k0bufcuNj7lEjnO5XJ77DRu42Tz9hWg== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 19:35:08.0376 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 043ccbae-4935-4dc9-67e9-08dce70726e6 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: DB1PEPF000509EC.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4P190MB1117 X-BESS-ID: 1728329710-311201-2748-3501-1 X-BESS-VER: 2019.1_20241004.2057 X-BESS-Apparent-Source-IP: 104.47.17.170 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoaWhhZAVgZQ0CTJxNQkydDM3N jAwMg8Ldk80cgkzdzEKCXVKMXc0jhFqTYWADL3d31BAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259566 [from cloudscan12-161.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 Add high-level interfaces for the deinitialization of the flow filter. Signed-off-by: Oleksandr Kolomeiets --- drivers/net/ntnic/adapter/nt4ga_adapter.c | 17 +++++++++++++++++ drivers/net/ntnic/ntnic_mod_reg.h | 1 + 2 files changed, 18 insertions(+) diff --git a/drivers/net/ntnic/adapter/nt4ga_adapter.c b/drivers/net/ntnic/adapter/nt4ga_adapter.c index 4105a6eb5a..fd90f31abd 100644 --- a/drivers/net/ntnic/adapter/nt4ga_adapter.c +++ b/drivers/net/ntnic/adapter/nt4ga_adapter.c @@ -217,12 +217,29 @@ static int nt4ga_adapter_init(struct adapter_info_s *p_adapter_info) static int nt4ga_adapter_deinit(struct adapter_info_s *p_adapter_info) { + const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops(); + + if (flow_filter_ops == NULL) + NT_LOG(ERR, NTNIC, "%s: flow_filter module uninitialized\n", __func__); + fpga_info_t *fpga_info = &p_adapter_info->fpga_info; int i; int res = -1; stop_monitor_tasks(-1); + /* Nt4ga Deinit Filter */ + nt4ga_filter_t *p_filter = &p_adapter_info->nt4ga_filter; + + if (flow_filter_ops != NULL) { + res = flow_filter_ops->flow_filter_done(p_filter->mp_flow_device); + + if (res != 0) { + NT_LOG(ERR, NTNIC, "Cannot deinitialize filter\n"); + return res; + } + } + nthw_fpga_shutdown(&p_adapter_info->fpga_info); /* Rac rab reset flip flop */ diff --git a/drivers/net/ntnic/ntnic_mod_reg.h b/drivers/net/ntnic/ntnic_mod_reg.h index 6dd6240c6f..fd9e595f50 100644 --- a/drivers/net/ntnic/ntnic_mod_reg.h +++ b/drivers/net/ntnic/ntnic_mod_reg.h @@ -121,6 +121,7 @@ void rst9563_ops_init(void); struct flow_filter_ops { int (*flow_filter_init)(nthw_fpga_t *p_fpga, struct flow_nic_dev **p_flow_device, int adapter_no); + int (*flow_filter_done)(struct flow_nic_dev *dev); }; const struct flow_filter_ops *get_flow_filter_ops(void); -- 2.45.0