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 2727C45ACC; Sun, 6 Oct 2024 22:38:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C2A6D406A2; Sun, 6 Oct 2024 22:37:47 +0200 (CEST) Received: from egress-ip42a.ess.de.barracuda.com (egress-ip42a.ess.de.barracuda.com [18.185.115.201]) by mails.dpdk.org (Postfix) with ESMTP id 9870540654 for ; Sun, 6 Oct 2024 22:37:40 +0200 (CEST) Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02lp2042.outbound.protection.outlook.com [104.47.11.42]) by mx-outbound44-124.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 06 Oct 2024 20:37:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ux4AKB0PfV7gq69JvypDz3sSNE0Y34pS+dy/Pt0YxNQYQ/3GbNi5brQRf6TU3oN9ySKNSfEqX6W0pf6S/J3+BWej8BwM8pe9WXxa2n65cGI55MuezCaGEd3LkayMxexT7ohLU4QNLSkuPbAUmcgIT7rvax9F8JwhhAKsSkRTtXjntpM53MQBuqqH84YWUy875xEjaCmdPSImLOQItFOVAiPs/zTGTKBR5n6Bd7RPbsiFsV/RlwgnIuKpYsO6yx7Yzb0O0GOiMzJBQtQ58dqGXo+3Ld5jsvSDZiMQfgZU1jJ1PJNCLfYBDFx6BhHOjn4PYItVNKI9Oz84bgmp/jTMwg== 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=oMcf8g1GJbXxEr8PmXEBWCz36IulCZ2JDjvdbXkh2QvlgzCzzgjrRYkpsYbicqvXCH9U2Ki0/vQ1qFcAKg59ayfnLSKhILIxSh4PYzLH9LynruO9VHar3RWet8/4T9hfrNeqWhJXUkaTkr/4BKA5UqUC4dRR4zLoO+A1ubvXA2RnbsevSpwwMEjk9CwMQF3V+S7jFFnik1lNV5LGW+o76hup4NdmT0EnqpzWhWYN7aRZbTuLOkcql2GPAUI6Ru3GfweabQCUXMt3ZnI00b9C1UrToAnWEbMfdnQLqqDiwFzXcAQD6Nb+MKde27SPWOCAvsJFhnlWI44jvI/3fk3fww== 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=eszJ+SsWimyD2tfJcQvZXc31uS7zTmE+DCEtg4ihIVg6nPE7VsME4lqy33Arss9iAdYLQJv0ahqNNC9KJkd9PYg5iuj4VmrOk57n8iaSxdHdfvw8kog78El5190/P33r4h7Mj1SpkolVAxuU8jKfG+kj8moyf4+DeXBGfAW+n0Y= Received: from AM6PR04CA0020.eurprd04.prod.outlook.com (2603:10a6:20b:92::33) by AM0P190MB0577.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:195::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.22; Sun, 6 Oct 2024 20:37:37 +0000 Received: from AMS0EPF00000190.eurprd05.prod.outlook.com (2603:10a6:20b:92:cafe::7) by AM6PR04CA0020.outlook.office365.com (2603:10a6:20b:92::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.20 via Frontend Transport; Sun, 6 Oct 2024 20:37:37 +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 AMS0EPF00000190.mail.protection.outlook.com (10.167.16.213) with Microsoft SMTP Server id 15.20.7918.13 via Frontend Transport; Sun, 6 Oct 2024 20:37:37 +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 07/50] net/ntnic: add flow filter deinitialization API Date: Sun, 6 Oct 2024 22:36:34 +0200 Message-ID: <20241006203728.330792-8-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241006203728.330792-1-sil-plv@napatech.com> References: <20241006203728.330792-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF00000190:EE_|AM0P190MB0577:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 81bfcc9a-33c4-4826-a9da-08dce646b703 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?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+iB9HBf7UaS2kbCLUa6EvFr?= =?us-ascii?Q?Ng3HZxWr5f+SUXsA9KpnSRnSm03i6rK5Q0DjKUtUZWYhJQd+ntri8ieJsYOF?= =?us-ascii?Q?NbaIBxzXkf6sF6B4p2DZkJ34iVtFyfF9yme00K4dHSi3/ZSdxZeWV7NQFVmg?= =?us-ascii?Q?Wm3SaVcFPPG554cm0yOpnhCiirMqt7JfdiYFrzr5kf+JDd/vfa6DaM/QhPEZ?= =?us-ascii?Q?J5ftglY3rm1Sj7UXn5iZG7xjJQDtpXLs4WGDjnVKr0E9H3+HQEwx2SjBep2F?= =?us-ascii?Q?3D5V+NSjHc/1GK/trICRyUfy6TCwDShUrdaUt/LxtbG6eP5LYs7Y08ZOQMki?= =?us-ascii?Q?+aV9bFlDtKFADsYojtRCzsWYaZghWcXOQ5w0Ukf4Ag56inoND3O/dD1RDty/?= =?us-ascii?Q?WzrPfn937nHanIvsbZz7rGg/X/j09hEhG6AugiCGUPIppLoWRUVUtxptsDby?= =?us-ascii?Q?AuIje6HatHbusD6REXf1dq8P4YqASCH5A7Cvnft17kaquEBBfjEYk0ZQdUAg?= =?us-ascii?Q?NKbUq1e5QvC7gnY7dGitD2KmDjBg?= 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)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: yaM9v8/YxkPo263x+BOnnxJz7Y+/ODXZhADRC4wuLqkYdVNtyucetC7WgXA4enb0ez/uk/YRfVJdIGiG2rczs9KLC2U5pmq3VzN34XePEPLZTT5kYRFt5fF4VJVtf7dk0MsHjXVVR1xyYMk/nqLK/GegICSKZoAgCYsZxvjO1kBZE5tbkndSCEEdijvn2anpc1L5Polx5f1t6IuZjBGhVylZbpOyqwRt87gmrUeHfPVuN5sfoQDgX2P2jY76DcrfPR+22FPt+MyWY9s9Dtl9jV2zYIcKiLdlnUwS7ZnG0hLGQbLoXD6wUjKqn7qKaxlpO8pneos11ENVr273NZ10bFnHouVRo6SRmHMn+Le661I/oyAF7ZYCeLJ/en2Vq8vSBc7y70czKJxeVbkXfQz0CmVN1H9MGRfhk66Qp09E1e8prOkGGqMkCKepTKdhNtMYlPqZZt0ckRAarSzbWc1Y0csi1SN41C0mQfQB2aFXei3YQAati+IhL4bUnz3lUgi1jABXwUnMOsWWOdpqiEhQnMI9DO6f6dxLxBtCRvZkAuYKldAw84XuDg3ypt7NhRec2+ef8LfsCPxJ2qNQWijYX0rfEVoi3yzJ3G2Hnl4EcznvDQRIthnAd1dsKHxSzrVZXG26moViCG5CyUgRpFsxtw== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2024 20:37:37.0931 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 81bfcc9a-33c4-4826-a9da-08dce646b703 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: AMS0EPF00000190.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0P190MB0577 X-BESS-ID: 1728247058-311388-12679-123462-2 X-BESS-VER: 2019.1_20240924.1654 X-BESS-Apparent-Source-IP: 104.47.11.42 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.259547 [from cloudscan23-175.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 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