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 45B8C45B04; Thu, 10 Oct 2024 16:15:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 49E2340687; Thu, 10 Oct 2024 16:14:38 +0200 (CEST) Received: from egress-ip42b.ess.de.barracuda.com (egress-ip42b.ess.de.barracuda.com [18.185.115.246]) by mails.dpdk.org (Postfix) with ESMTP id 38B504064F for ; Thu, 10 Oct 2024 16:14:33 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2104.outbound.protection.outlook.com [104.47.18.104]) by mx-outbound20-48.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 10 Oct 2024 14:14:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=STe3+u8fco0Nvna1ArWHYmT3EjaJakRdbfuobyPAovJ3JdzqE0fVcg7p42anNaZ455q1kBqe0OOIJA5k23FcUrMA8zUIPjDJ+MgAwe8J8aZ0akxHcNsVfdx8Oi8LmroS1wlvsdYGTsadbuQ9wX8WUduzW8Zas8SDLzEsAQYna5y3qiUV1wmpTzi8q1yH1vzE1lBNTlmnpcE/Li4f6Bg+Q7Lu9H4MGnN5CgtH3F28c/DsUWzk3fizxID00TP1RzHMiZsrGGO/7++m5S2hinVXjYfRzQRPtJKdXQIIYZNAN1X5IykM0g7fH5yGT5SPOxEgkcyjzL74JNkP8fql/FIwWg== 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=/ULMjyXbf/4A2dFVUAI3uN/0YqNaL3YtwoWWMC9YJS4=; b=aDKDLE64H0ZQTi+8J9e97ydNmfCsmTZcWtmoY+0bQPNLNuQ14CbShkvE3nzDhYMtZPaOje+8O8VP9W58KPbNGhLvrJrLWUwB/JTYPdfAeA4KY0c8eLdBoxkqF0V0jLDuyfSMUVlDQNV27vk7csaovYopWLxlR50nTOUJy5dbJbewhQ1KCoAybf5AmYuSWG6UaES8OlevZtllIgDoMwEMBV5TSLGOman1Y4Z2aKCdFYGxCtVITAflvlNETZkMDtjcqne96BZbLbEQ3rU6iBTzLhn3fj/g5f5lV9vnpnmwjpa1Bf62dVVuNR93PXy8JCCYTzYsopb9T/w9YfbgCUCvwA== 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=/ULMjyXbf/4A2dFVUAI3uN/0YqNaL3YtwoWWMC9YJS4=; b=MXvP6djg2FiU0uA1iNgk91mndASDuXOrZ+26NcQeJ/q51lmfb0VmGzNWo7tB0Hu90m3S/GSb7qd1HsFOpaWOdJDDlF1wzDKB805odG6Yi9heQNHzKs76+pqMO8a490JUbiflQfe09dVbGNjA6zrvADof2RnZTLjOye3wxQaj0zQ= Received: from DU2PR04CA0063.eurprd04.prod.outlook.com (2603:10a6:10:232::8) by AM8P190MB0963.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:1c6::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16; Thu, 10 Oct 2024 14:14:30 +0000 Received: from DU6PEPF0000B61B.eurprd02.prod.outlook.com (2603:10a6:10:232:cafe::68) by DU2PR04CA0063.outlook.office365.com (2603:10a6:10:232::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.17 via Frontend Transport; Thu, 10 Oct 2024 14:14:30 +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 DU6PEPF0000B61B.mail.protection.outlook.com (10.167.8.132) with Microsoft SMTP Server id 15.20.8048.13 via Frontend Transport; Thu, 10 Oct 2024 14:14:30 +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 v3 07/50] net/ntnic: add flow filter deinitialization API Date: Thu, 10 Oct 2024 16:13:22 +0200 Message-ID: <20241010141416.4063591-8-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241010141416.4063591-1-sil-plv@napatech.com> References: <20241006203728.330792-2-sil-plv@napatech.com> <20241010141416.4063591-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU6PEPF0000B61B:EE_|AM8P190MB0963:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: caf2ed99-72a3-4373-1f0c-08dce935dbac 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?aTNJJn39WnLFKacgQanYV1b7osdQ670O0oLlzh8UGvyVQtilII+Q/I2H8+Sh?= =?us-ascii?Q?4ezzXDfcbNM67EGJlpfV5sC4NA948L5ooGTWdagd7jHwqkvtbdCn442RLAW7?= =?us-ascii?Q?ZJLfVWgDA6QvBM6YlYW0aWAYMqg6BCRnHfsJum4Axz2HlYcRUpIf4z98aOzJ?= =?us-ascii?Q?U+SkY1Fx0nfON0DyqTJdWWhvaEYTUlpTJ7OpNU11QXl5t7qA8wueAk0v+HYn?= =?us-ascii?Q?rEe4zLVuND6MP94/zfBftP1ORn2tL68g7WzEoryD8kIlog5tYKQZutBZBxDZ?= =?us-ascii?Q?4RLneqVHq9P1DwY9aYUIQupwgQY1C2cjz/v783Si+lxBfv56AdERe9bqkdn+?= =?us-ascii?Q?tkIiBBTs6J1dxllDzH1RMbziikEW6kkhhCZjCofeiGT4JB8EggDUcPCe6CcR?= =?us-ascii?Q?6IYjtS4YeLy7zFcpCCMDKI1uwb8oghpP0EJHqjyVJ3jeRdsPR2teV6pvXuo3?= =?us-ascii?Q?qTXXi3wYA8g4A8LwDM0S2m2D6H3dlgvN2CAk09Req/DllYmvcVbVeJAbRP7a?= =?us-ascii?Q?DOW5Lo9x7/kl+XqmviHYMY7ulAgq03+v2r8w/7agPCKHAMe/DESjs8Dd0jIS?= =?us-ascii?Q?kQSI5kaAkpQXLL9yIbVdS2GYJOCqhVBQ/S6xtjC0psYNabGr5G2MF/vU2VK0?= =?us-ascii?Q?4XylrBOXSoInm9RwKo/in/VumL8fDc8HbiYPkR9bHQ31A6A4C7Mv9qfToTvs?= =?us-ascii?Q?aMwAO2T47zPYDhUx4zEmxcvAjwVArxd65Uq2QVHuz8M7s7Dt2OnNEaRuNbPA?= =?us-ascii?Q?j+53yP23Su/15oYqIr4l9YzLSELCUP0/rk/6c2OubgHujLa4mVUuId79tBL2?= =?us-ascii?Q?iY4CVy6S+w1gH/9iWGvqFjzC/tqojX4Pk/fuBjH+PgfqxxRGxfAJ2xm1k4sG?= =?us-ascii?Q?hghYNptBTor6srSvF4CCxiWZ/OCmLl78pa98br+u6bMugHJTBz33jcdynK4o?= =?us-ascii?Q?WCPhlF6644xurwtX0buJPKvl4uuIx0Oi+v3kTwdTV5fgcjw8hE2i7VoeVWtj?= =?us-ascii?Q?iT/Er+uPDjtLYkDTzPw+7dFnJQ91CYgQJDnl89cU/aDvz0ZgHVCtLAsxxzvd?= =?us-ascii?Q?5D7vfPlUdl9Uv2sewIXlWxSZ3i8uLgOhsuYtjaYl4mzEgHUpI4xNRrX/B8U8?= =?us-ascii?Q?2AUF6tPnlQeF0pBFGJHN1r/hmKW1orvgYfE6qk62v3YPnoX3edOR44C5czye?= =?us-ascii?Q?LYcLPhjy2G8M6PbMPGMXNavKi8tGkDIcuBF+SH26ph40leo+1FtUW0ZmcbQ9?= =?us-ascii?Q?D3uDEBOtk3aYcXfNzEFmkqxad2E7vjY2Y89J9RuRFZQxriIhkLD3oYj5atFD?= =?us-ascii?Q?Ub6qM8JCivn/Ks5jaWmgt2TDyRquTmlerWmXegA355QNOrD8W5LFRdPf/ygK?= =?us-ascii?Q?KVanBRis4WyLDJwJar7RxfX7PbIo?= 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: wUnuZV6MrPKCn5W25upRYT7eBUx7YcLnsW0a/qQ8TKRqln9hX9pDMCxAP/p3sPZHzv8esBgoy1k5uKmCv8BesU+Ufea+gGnix4FSqnxvi2aIUx2vy6f8ZD0EcHBwJTjhC7fiSl+No8lecGcrllPms+IeJgGxWGF5icnAMLD1ZUkT/FC1pDJ156BCfQcIRpROjf4W8pNU6WvjDdNOsVVdBu/kj9OWlh7ET9JPu00x7YCWmzBpMvyXTTp7FrPkc9i0gfNvMM2/h9lKnOVmBvSPDh2pY+ZHmhnXvxO27seCrVGriYtzkjMeB3Gsp4XlT7mKEw1SfQd2NZKWvwSarw5HnkRiMOc7k1HqjQ0wv6tP5eVsAG3j1B5Jj3PWAVqFSf2tkxGx/aNdb097nnFPrWudlx876rJSfbQG3kBUTFzPBgrCJgz3Wavb+NIfn2/Hdk95apeUqhgGrpKjXbg+HXXAt8L5Sa/D6v+H/FIrkvZIZN4yNhYhMDtFzX5O/Xt0atFCPz92o9w17hd5D1L4HiT5ZX6BRQ3YYRc18D63UVPRSU4z2r5alQg1oph4meEFCYeIOCRtgfCBh+nmM6diS67rkMX2HjhN+zcW/qpP0A6q21OQ1M98/fBEfWbiAvWNRqRAQIuSVM33zjFMR30Mr72RDy9jE2hkZsoOYBc3pRGhz2U= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2024 14:14:30.4515 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: caf2ed99-72a3-4373-1f0c-08dce935dbac 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: DU6PEPF0000B61B.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8P190MB0963 X-BESS-ID: 1728569672-305168-12632-25854-1 X-BESS-VER: 2019.1_20241004.2057 X-BESS-Apparent-Source-IP: 104.47.18.104 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoaWZgZAVgZQ0CLRJNnI2MjAwN TUKMkoJcnc0sjIxMjEPNnMIs0k1cJSqTYWAF/3RcRBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259630 [from cloudscan12-202.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 --- v3 * Remove newline characters from logs. --- 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 53c4d41a35..b710e6ae13 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", __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"); + 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