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 6B98745AAF; Fri, 4 Oct 2024 17:09:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D01D427C7; Fri, 4 Oct 2024 17:08:17 +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 EB73842794 for ; Fri, 4 Oct 2024 17:08:09 +0200 (CEST) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03lp2233.outbound.protection.outlook.com [104.47.51.233]) by mx-outbound22-159.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 04 Oct 2024 15:08:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=W8uWy0bQI/2w4l3ZVmnxCOTwTZa5vMl03rjchVW5G2pmUQUc7HKVHonWbfsQE6IJOmYrD6JOYYdZW6fF1svNhai3jSbPEokBhImKgMML75orwCJIzH9P1vE9iO/L9MqBeRcIBTO/kgP9fcvxcerYUpZcG0dzcPZKq1A/PETPlSuU9w/m0xVQKpDrQICKGk3cJ+0CQymFp+wnn5NOlHYn1o6LeFmRgY5Ozhw23KybcCgb2pCALLwaajEeQ0cltYUzGLxYDYw0MExS04rH4mvHIpan7Q+BLwUywkWirI46HKM7hbiubYvHbHajSp3zUuJPKVbUB5bVivq7qNjSyefJ9g== 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=q6Z010daN1SpNpR7XB57YXHnMgNhsQxgpswhpZVLrK4j1HZEGtsEAL9e01H5gTo3F6B1ehg1uZXepYTPdnZDOPtgG2hO5kbDiC9LNfri/GG/mXxFssHtEKC0pY2izm2cX4MYI1GXUJwXdTUbXumYIyCgNdTfEC2kztEEiOHb8IIkALGDdbowLj67OAtDc+UY2MjcxwFbE0IteeaNgTkJEpKnqhgxIq6AcOFqza+Kdm0e6k2TniqbGGy6fnvlNDzX22tbZUPcjqOqsLaRoOMVptBIUoq9GPRoH/soKv60YGybAkAf1Dat69edQBeGyPRxF0YyAY2e61jE7CV+Tu1P0Q== 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=jA85Jknh7wxpwtOvUxfyLpGi8wOaC1fhIJovXZZe8RXljCJMHdx3sktiJnu4N7XB8MrEecn+1esZWL8XHTByJxFme0bJDafrTwCT1dWr/+lIGv3TII6aDUZTtbtv3VkZL8lac04G3pziSUPbYx0CepC6Mk9XDuJM6AqXYeZbaCs= Received: from AM0PR02CA0032.eurprd02.prod.outlook.com (2603:10a6:208:3e::45) by DU5P190MB2065.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:517::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.18; Fri, 4 Oct 2024 15:08:05 +0000 Received: from AMS0EPF000001AC.eurprd05.prod.outlook.com (2603:10a6:208:3e:cafe::43) by AM0PR02CA0032.outlook.office365.com (2603:10a6:208:3e::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.18 via Frontend Transport; Fri, 4 Oct 2024 15:08:03 +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 AMS0EPF000001AC.mail.protection.outlook.com (10.167.16.152) with Microsoft SMTP Server id 15.20.7918.13 via Frontend Transport; Fri, 4 Oct 2024 15:08:03 +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 v1 02/31] net/ntnic: add flow filter deinitialization API Date: Fri, 4 Oct 2024 17:06:55 +0200 Message-ID: <20241004150749.261020-9-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241004150749.261020-1-sil-plv@napatech.com> References: <20241004150749.261020-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF000001AC:EE_|DU5P190MB2065:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 3b1779e4-3179-4838-5dfa-08dce486584d 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?H8PNNCwC6PKiE0ISTVLyPayoNNJhRgI2/lS+vVGQIiGfqDLomslBHBAEysWk?= =?us-ascii?Q?1RZGS2aFqk2hRVzeB6TpODzNhEnLpa2DlJbJqMw+EQpuVED6snr3JN8v+bSb?= =?us-ascii?Q?0JbS2gPHnF281cWHT7OTZjgHuFCjbJZt77HYM8ei+BWSxUgREa8fqhLqOidl?= =?us-ascii?Q?qxbGw+xlBJ/xeP8A2XPDjXAkWy/+810aslt279QuJubI8zsrp0DRchV6cEgJ?= =?us-ascii?Q?lcxyZJ+2JWOOj948n23P6kSWNWpC2ZoZhf8KSZi6AOTXeAuw4HQtjOO5+3uh?= =?us-ascii?Q?tjOOoekADx3v9zmPhldHWX32wPXsnT+Ch5j7NzkWgfOv2UKRq5ixRadA/5dV?= =?us-ascii?Q?knXxgtkYFIPtp5DTioM61Epc4B0N1c8aOeggy1mLBjTbu0GqQ38LvEKPoZwc?= =?us-ascii?Q?brQzHfJD/K/8w7b4Zp4iZfjI88iDDvsbYI8n7Mc+NVlANgb35N38fBSOVox6?= =?us-ascii?Q?pfSWxezusUBQySTHbfn9VBquc+TnIdNLfbgb1ryttvjAbey+T1R5BMQRfj+r?= =?us-ascii?Q?Pxj489MGrRs/QON4iRAAxbCv5PuaRKj7Wx8Ahg4kM53qIt3ioQztvwvvkNGS?= =?us-ascii?Q?agncyhly1+mChuKvTK0IG+nDrRb9N2eGmC4heF0TJ75iiUJW2wcT3OLhLNfG?= =?us-ascii?Q?PGZhRXjemqpgzG7T7SO89wDs/C2oqBkiRzclY37mThjDcOxIz2T+ao9AQwL6?= =?us-ascii?Q?tbch+gMzVYQglmlvCQBZvA6dkMZ9U+/l+/wd/J3wIXVmQ7oBeUTl4Ekd9/Uk?= =?us-ascii?Q?/b7qqxdngQ12NjcBp3TKwemtHPTMexf3lbBApkYmgYmod544lCk0Gs3ahjiP?= =?us-ascii?Q?rGLO/blRUxaPxNIuirvnNJP2ohgslSJcKjI62cBsKNLCHdD0M5vQB07ssEkD?= =?us-ascii?Q?RQMA/YR7a8z8+anl81I4RoHOiWcFEYvXb5S/YiPYS0li859HiGddT7P0vBBh?= =?us-ascii?Q?R4VN0aVg5aSg2cfcoeOX7eY0wv3LKPeku3BLF1X40fluoRh+Hv3GsBlxmje4?= =?us-ascii?Q?iJc8uZjqvQCeq4EOVA5x1EhSo8/HaQX0N3yURdFP+L/RW1YTGKeiELCrQMLr?= =?us-ascii?Q?/j5hudc7m4qZF/E64l4ECRFSPuWyF9SzPLCr9hO4l6F9imWLHzt9qVXNXiJi?= =?us-ascii?Q?S9+oCoOrBASswXx9qvjxqf2P/yeUL7b3/EJExLUVCz7Aaumpq8krjakpRuXb?= =?us-ascii?Q?cLgMQOTJbu8mZMyHcR/WNh5jUvqESXoe/CGEyeNaP/avoTvO+c63kV+uSSW1?= =?us-ascii?Q?y1i0hHL9oF/iJ+FlQ/eeuR0Uym1ovLiK+p83N/vQCZLJHiz7ZkD1TUfelwKm?= =?us-ascii?Q?99uIWe4sxUvoQZYTN1LQLeQHuodkg2b6dLk7WQHNlkoYLSxl9zi+frpre349?= =?us-ascii?Q?V7I4CvrjalAFItNFHezxDAw2vmd0?= 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: dVqsHty3WQ7hqux2rGD/SMRAfUlSvge8iP5CPrMGWX9z5Ch9cSP8zk/wghNLXIw3h0UWRdYruoR14suC/jWWV1awlzypo4i+eIjMu+w2DTbddxs2HhAEOPDUrRgbXDrjpkepJpm2ycU1pEHotjqxXm+xG8HIOzP4KoV9k/o/pgIgC6D++KaKkhRsGK2HZMbsegPQSF0q304loOR33pADNA2RRhKd1H3SR0tV03U46tdbslYwF3w/guguEiF+za5Pa3p8Dx4U8hMLwnaUrgjMI9qKJwhguCjZXBVOQWnd2p9+t4MjVX3zkc2ClQOmTLWM7Pz1bn2PALY8HWzikSk6qzpfjQvRDqUqPd25ShOxwLUtvv6DAGa6GsRdAP5kjEyK4ADkHUQBJTjN+vuIfdl77MNGB/3fSrLpR/g18K+YVM+eppIlkuWm0ZXpDmcExFP8krD+vsm2GBxwH+aekToGsuaxr9emZpsDhTb8SzsFLEcKR5EyQP5WPcNdKrb8V3sjKlYNTxa59Y1qW0Dl9691A/oXytY4cLgFYUG9rQ76u7qXV1jmQXj4lSReDgerKHlo7eVW/htdeEjA6q5MhiRHYoW973XILxMWrDekXAp9FVaZ+wWyW3kVflwiy+qK/DHQGgaxh2WxdA1KkX2sYQNYaA== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2024 15:08:03.6264 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b1779e4-3179-4838-5dfa-08dce486584d 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: AMS0EPF000001AC.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU5P190MB2065 X-BESS-ID: 1728054487-305791-12647-33556-2 X-BESS-VER: 2019.1_20240924.1654 X-BESS-Apparent-Source-IP: 104.47.51.233 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.259494 [from cloudscan14-206.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