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 CBFC245BA3; Tue, 22 Oct 2024 18:56:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BADD640A71; Tue, 22 Oct 2024 18:56: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 82BB14068A for ; Tue, 22 Oct 2024 18:56:09 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2176.outbound.protection.outlook.com [104.47.17.176]) by mx-outbound19-119.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 22 Oct 2024 16:56:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sXWXEQqqMIB9MvholrL5u5HamswpmL1aLZoVGiqNtJcSHtTbPeaPM95nJI3ziT3GU/fjIDHpfdocds8L+JGKPdIKKT1O/AYIxc8eJ1ZYd/8hbr8VFXxhMwQWz+MZ07dNtZ7DViRDP5uMFFLaCZXztgKIP83pX+Q9MhmvdIami4QpMDjT1cGD2rzg/3lgnbpBtHEn26ZjuKA3nAcTSfRXujRyJQYFe39nIhjmLruFATHZJ4BErtG0Ei2oOVAR0FHz60cE5rlXjzL2KgXkmT297mSdzC2t7tbnZURm5sgKUf+4NcHk8lldVdKPf5jGUkymsiI20qY1gT6B9g94hX53pw== 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=r6YBcNkQluz8OWGiWS9ZZl9vMUqCyDgiWFZQJ7PHLwQ=; b=nCAzzGrx2ct8RchuRyciLKAqLJ5LEONsJCTvMtpcgULZj8M3vicWQHh4VU4Y/CxSgSVrT1RmUuy4kjz99kNu8Hs5JLBHUu8VQ4m0EW0AQ26kTPqI7zM8WljreU/wspSYW2SJXTpSo7Mhm69S7+t3ogAH9uKxdvSrgkcTikZLSGKQxxIcMU0Xj1LfGlfpPNxSFKQV4w3nvKal9stnVnNpsl50kMR9GM117DrN5/PZw7lfjfWAjFC+AhW3bcE+SA/7lQ2vQ/g4DTh4VR6TMVGHySKkXkOJ3lF1dICXsqoxGhb3LMy7OKq7w87Bq/U5dYCSS83/8Kxco1A3d1ll1Ahw2w== 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=r6YBcNkQluz8OWGiWS9ZZl9vMUqCyDgiWFZQJ7PHLwQ=; b=hYxdEnpwdhFZ+5fex/wF2pyvP1crmVa6hYfX0yGzTh2+xa6UEgwG6QQ/dyL+U+dcsVyggndTJS0xAUD/lH6pPjK9Us+5kBZf17wZx6ewi0bgAxZOaoAcbTVXAyKO7wo0h5ogdC8mdINLv0jKAwkU7hN0J1okHxBSjvy3hwFzIc0= Received: from DB9PR06CA0026.eurprd06.prod.outlook.com (2603:10a6:10:1db::31) by AS8P190MB1160.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:2ed::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Tue, 22 Oct 2024 16:56:02 +0000 Received: from DU2PEPF0001E9C2.eurprd03.prod.outlook.com (2603:10a6:10:1db:cafe::90) by DB9PR06CA0026.outlook.office365.com (2603:10a6:10:1db::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Tue, 22 Oct 2024 16:56:02 +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 DU2PEPF0001E9C2.mail.protection.outlook.com (10.167.8.71) with Microsoft SMTP Server id 15.20.8093.14 via Frontend Transport; Tue, 22 Oct 2024 16:56:02 +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, stephen@networkplumber.org Subject: [PATCH v2 05/73] net/ntnic: add minimal NT flow inline profile Date: Tue, 22 Oct 2024 18:54:22 +0200 Message-ID: <20241022165541.3186140-6-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241022165541.3186140-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241022165541.3186140-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF0001E9C2:EE_|AS8P190MB1160:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 8eda1687-df05-4c20-9059-08dcf2ba695c 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?uLCvrcBXl4jiroWZaCDTzkllVVSGA5+IaN2sHx4mKxzLr0CglM3CjQn4ojGQ?= =?us-ascii?Q?AB1k91i60KsZI4Aj77DWNHME6oGBCQJdDssy0ji9JIgemS98ZzcKxtjkHq83?= =?us-ascii?Q?6YMKWOY+FoY16DE6P3McVYko9spXuVALBjDTURLLWSkBM76kSd4BtOzFJXfK?= =?us-ascii?Q?0gAMq8gyfNO/DJxS5yUPqyYeWeYOO1CHjxmMBtJ8BT3KsIPq+kJk600Fph0J?= =?us-ascii?Q?rVN3wM1wsdLn0rK4AqGNieVQU+2u0+l6lKr5OE2WAPrDzHvRVx5acZGunmLf?= =?us-ascii?Q?cAsdxmwH7PSw/DGmbHTk9HwZ0zNl4tLuZKWZNcB+RZKLyexfMS3JB/DjrPY1?= =?us-ascii?Q?vvIHoyAS0LuxM1oxAU4hbKYzEIDIcI0Ssbf3YYgW3TCwssXVI2aSl5hktS98?= =?us-ascii?Q?3c8HUYKWEyxgo8qYkWkC5ZzsbnFVIkwmMQcGnhNARFle7vxNG5kwziPvea9b?= =?us-ascii?Q?aLQZElCEyBnJc90NqP8f64qL5UgFYcchKrgtuFW61l1dwZi0JUPwNwe4syRv?= =?us-ascii?Q?fI8HAW7DObk3UyePKwFuK/LI9LSPmCzUlQk3kYvQfRSOtcZ9K1ANulatz28s?= =?us-ascii?Q?1fOkfZteKRXpKobD3PPFevZLb6FYAwMpMjFJ/jwCvfqW7XhEt4rOO5OM54xw?= =?us-ascii?Q?J/0fNFcC+uMJ+xUdEenOoWVYwRT24CfG1fpaxosAmP+aukz/jKZNqqRwLFIe?= =?us-ascii?Q?326ogTUMKl8EzTSMpD6BzwpN1sSSSOzZJlc7BKe3ipoED6w0wcMNofDlilO+?= =?us-ascii?Q?1++AbvPPXddNiaH4oYNqkdmSEsYUQDpzgeOjjUIrLyxdn19hBDDYxltmDqAH?= =?us-ascii?Q?o7jkpA3TEI+BSC7N9j6WEyk6vHa7gxnBAC/8HU0Io+zO8OlsP9LJMT80BcYV?= =?us-ascii?Q?kCNZTzwaJLgO618OwDD5dgC7T8hm34JpslgkanvCBYVNCl5chDHXjQ6pXE1a?= =?us-ascii?Q?lkrRWcxI4vr5+4Rw3ZhCiCqsmNNMfgFzMnmWdr6FxuEFuMylRgtH6dn3unwl?= =?us-ascii?Q?ADEfQtFkdfSP0kNqv9YJ841+0Y+4Qk7sU81mJ82sNiuVpwXRyDUDG2xji9ji?= =?us-ascii?Q?eEjKRpfYevMZBYepxCtpQDJTPFkKxtFnyIZ3i5qJhgEc5+DBOlhfeP6BEfms?= =?us-ascii?Q?AkTHbtJUZuqmZ59aou5XDYr/Tv8uNHQuw7tmD5ysThKLf8uTqy3qMwY6a5/n?= =?us-ascii?Q?n4EWpjYyLjBsDDFnIALkhL1X/Jye/F16Uhc8iTNpijVZLAFfSX20yTpwUx79?= =?us-ascii?Q?gM1q8D9MLYlIODAVMLi0PWNr+yvve3vMCChMV20Al61QPbgY4zb/07LQJUMK?= =?us-ascii?Q?kgGj63wtj79OVR49jlUqSol54affYNC5ZV0eZkVpnLqrZs+xMetRZsoUVrpD?= =?us-ascii?Q?/WRanYyuhUVKCquTSFQFJbDRihlXv47sXAtCrrfWOWnJHkrRIg=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)(376014)(36860700013)(1800799024)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: lhH20MyxbdMSrn/vB8QaqglthjikPY0Xg42k1+V5UJV2eH295Izf2AY8q1RCvOq8QF4F5jSahSetUfl8ja0dhOB3xkDbGF6YPhggSu/jqf2oQDo0sOP+R0P1SBhyGyJYJSAGbSHyTyB3FdXfIpx05g1ywI7pN2IU9YrWhI178w/20dYA6/gczKFgCZjREVfXX5t+gHfqA2bz5wOxVqZAqpuK0gBzgM8imorQ0wQyVLNtP0GvXhHytTLtU313pviw5tpuS90FOYR4UTGl959YG9nq52HHDW2LiyUPjZgVvCvRxjdBd3SguzWa6/KV7YROPnJpqJ788ezC5/7is9j65GhM90PmYobHkqTCg6ROmrSpE2/7vnK9vhgRmtq71/IsrJ1aqEFD99qoTLy+Kd/4vMbwSNL7e523dIT93OWRPH/YCVfByT2bry0UyLiu9QuL4XZMMgFZ6gyC0ip1axQs8ff/WFNtC2nHVNKLPpb2RATJuGJm8kvc799tgagDJLD9mhzOYcUSpjnq0JX01I2ZSt62VMu2ZAv0bVij3Mij4tz1KffpCrGTV720z2TNauQ1fmjsiSWnMU6x/mMJlEFzPcLi55HVX3ISrElcnzXMd/1vMNYOPjfaopQxIijF06YYA/aHM5IL9xF/yM0dDS4hzUhZVFBSo7Vs9SwO5UEJNaM= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 16:56:02.1843 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8eda1687-df05-4c20-9059-08dcf2ba695c 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: DU2PEPF0001E9C2.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8P190MB1160 X-BESS-ID: 1729616164-304983-12653-14349-2 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.176 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVhYmxuZAVgZQMMU40cTSONnQwt w82cwsMc3U0MgyxdjQxCjN0MDUMiVZqTYWAKhLjAxBAAAA X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259902 [from cloudscan15-77.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.50 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, 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 The flow profile implements a all flow related operations Signed-off-by: Serhii Iliushyk --- drivers/net/ntnic/include/flow_api.h | 15 +++++ drivers/net/ntnic/meson.build | 1 + drivers/net/ntnic/nthw/flow_api/flow_api.c | 28 +++++++- .../profile_inline/flow_api_profile_inline.c | 65 +++++++++++++++++++ .../profile_inline/flow_api_profile_inline.h | 33 ++++++++++ drivers/net/ntnic/ntnic_mod_reg.c | 12 +++- drivers/net/ntnic/ntnic_mod_reg.h | 23 +++++++ 7 files changed, 174 insertions(+), 3 deletions(-) create mode 100644 drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c create mode 100644 drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h diff --git a/drivers/net/ntnic/include/flow_api.h b/drivers/net/ntnic/include/flow_api.h index c80906ec50..3bdfdd4f94 100644 --- a/drivers/net/ntnic/include/flow_api.h +++ b/drivers/net/ntnic/include/flow_api.h @@ -74,6 +74,21 @@ struct flow_nic_dev { struct flow_nic_dev *next; }; +enum flow_nic_err_msg_e { + ERR_SUCCESS = 0, + ERR_FAILED = 1, + ERR_OUTPUT_TOO_MANY = 3, + ERR_MATCH_INVALID_OR_UNSUPPORTED_ELEM = 12, + ERR_MATCH_RESOURCE_EXHAUSTION = 14, + ERR_ACTION_UNSUPPORTED = 28, + ERR_REMOVE_FLOW_FAILED = 29, + ERR_OUTPUT_INVALID = 33, + ERR_ACTION_MULTIPLE_PORT_ID_UNSUPPORTED = 40, + ERR_MSG_NO_MSG +}; + +void flow_nic_set_error(enum flow_nic_err_msg_e msg, struct rte_flow_error *error); + /* * Resources */ diff --git a/drivers/net/ntnic/meson.build b/drivers/net/ntnic/meson.build index d272c73c62..f5605e81cb 100644 --- a/drivers/net/ntnic/meson.build +++ b/drivers/net/ntnic/meson.build @@ -47,6 +47,7 @@ sources = files( 'nthw/core/nthw_sdc.c', 'nthw/core/nthw_si5340.c', 'nthw/flow_api/flow_api.c', + 'nthw/flow_api/profile_inline/flow_api_profile_inline.c', 'nthw/flow_api/flow_backend/flow_backend.c', 'nthw/flow_api/flow_filter.c', 'nthw/flow_api/flow_kcc.c', diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c b/drivers/net/ntnic/nthw/flow_api/flow_api.c index d779dc481f..d0dad8e8f8 100644 --- a/drivers/net/ntnic/nthw/flow_api/flow_api.c +++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c @@ -36,6 +36,29 @@ const char *dbg_res_descr[] = { static struct flow_nic_dev *dev_base; static pthread_mutex_t base_mtx = PTHREAD_MUTEX_INITIALIZER; +/* + * Error handling + */ + +static const struct { + const char *message; +} err_msg[] = { + /* 00 */ { "Operation successfully completed" }, + /* 01 */ { "Operation failed" }, + /* 29 */ { "Removing flow failed" }, +}; + +void flow_nic_set_error(enum flow_nic_err_msg_e msg, struct rte_flow_error *error) +{ + assert(msg < ERR_MSG_NO_MSG); + + if (error) { + error->message = err_msg[msg].message; + error->type = (msg == ERR_SUCCESS) ? RTE_FLOW_ERROR_TYPE_NONE : + RTE_FLOW_ERROR_TYPE_UNSPECIFIED; + } +} + /* * Resources */ @@ -136,7 +159,8 @@ static struct flow_handle *flow_create(struct flow_eth_dev *dev __rte_unused, return NULL; } - return NULL; + return profile_inline_ops->flow_create_profile_inline(dev, attr, + forced_vlan_vid, caller_id, item, action, error); } static int flow_destroy(struct flow_eth_dev *dev __rte_unused, @@ -149,7 +173,7 @@ static int flow_destroy(struct flow_eth_dev *dev __rte_unused, return -1; } - return -1; + return profile_inline_ops->flow_destroy_profile_inline(dev, flow, error); } /* diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c new file mode 100644 index 0000000000..a6293f5f82 --- /dev/null +++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c @@ -0,0 +1,65 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2023 Napatech A/S + */ + +#include "ntlog.h" + +#include "flow_api_profile_inline.h" +#include "ntnic_mod_reg.h" + +struct flow_handle *flow_create_profile_inline(struct flow_eth_dev *dev, + const struct rte_flow_attr *attr, + uint16_t forced_vlan_vid, + uint16_t caller_id, + const struct rte_flow_item elem[], + const struct rte_flow_action action[], + struct rte_flow_error *error) +{ + return NULL; +} + +int flow_destroy_locked_profile_inline(struct flow_eth_dev *dev, + struct flow_handle *fh, + struct rte_flow_error *error) +{ + assert(dev); + assert(fh); + + int err = 0; + + flow_nic_set_error(ERR_SUCCESS, error); + + return err; +} + +int flow_destroy_profile_inline(struct flow_eth_dev *dev, struct flow_handle *flow, + struct rte_flow_error *error) +{ + int err = 0; + + flow_nic_set_error(ERR_SUCCESS, error); + + if (flow) { + /* Delete this flow */ + pthread_mutex_lock(&dev->ndev->mtx); + err = flow_destroy_locked_profile_inline(dev, flow, error); + pthread_mutex_unlock(&dev->ndev->mtx); + } + + return err; +} + +static const struct profile_inline_ops ops = { + /* + * Flow functionality + */ + .flow_destroy_locked_profile_inline = flow_destroy_locked_profile_inline, + .flow_create_profile_inline = flow_create_profile_inline, + .flow_destroy_profile_inline = flow_destroy_profile_inline, +}; + +void profile_inline_init(void) +{ + register_profile_inline_ops(&ops); +} diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h new file mode 100644 index 0000000000..a83cc299b4 --- /dev/null +++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h @@ -0,0 +1,33 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2023 Napatech A/S + */ + +#ifndef _FLOW_API_PROFILE_INLINE_H_ +#define _FLOW_API_PROFILE_INLINE_H_ + +#include + +#include "flow_api.h" +#include "stream_binary_flow_api.h" + +/* + * Flow functionality + */ +int flow_destroy_locked_profile_inline(struct flow_eth_dev *dev, + struct flow_handle *fh, + struct rte_flow_error *error); + +struct flow_handle *flow_create_profile_inline(struct flow_eth_dev *dev, + const struct rte_flow_attr *attr, + uint16_t forced_vlan_vid, + uint16_t caller_id, + const struct rte_flow_item elem[], + const struct rte_flow_action action[], + struct rte_flow_error *error); + +int flow_destroy_profile_inline(struct flow_eth_dev *dev, + struct flow_handle *flow, + struct rte_flow_error *error); + +#endif /* _FLOW_API_PROFILE_INLINE_H_ */ diff --git a/drivers/net/ntnic/ntnic_mod_reg.c b/drivers/net/ntnic/ntnic_mod_reg.c index ad2266116f..593b56bf5b 100644 --- a/drivers/net/ntnic/ntnic_mod_reg.c +++ b/drivers/net/ntnic/ntnic_mod_reg.c @@ -118,9 +118,19 @@ const struct flow_backend_ops *get_flow_backend_ops(void) return flow_backend_ops; } +static const struct profile_inline_ops *profile_inline_ops; + +void register_profile_inline_ops(const struct profile_inline_ops *ops) +{ + profile_inline_ops = ops; +} + const struct profile_inline_ops *get_profile_inline_ops(void) { - return NULL; + if (profile_inline_ops == NULL) + profile_inline_init(); + + return profile_inline_ops; } static const struct flow_filter_ops *flow_filter_ops; diff --git a/drivers/net/ntnic/ntnic_mod_reg.h b/drivers/net/ntnic/ntnic_mod_reg.h index ec8c1612d1..d133336fad 100644 --- a/drivers/net/ntnic/ntnic_mod_reg.h +++ b/drivers/net/ntnic/ntnic_mod_reg.h @@ -225,7 +225,30 @@ void register_flow_backend_ops(const struct flow_backend_ops *ops); const struct flow_backend_ops *get_flow_backend_ops(void); void flow_backend_init(void); +struct profile_inline_ops { + /* + * Flow functionality + */ + int (*flow_destroy_locked_profile_inline)(struct flow_eth_dev *dev, + struct flow_handle *fh, + struct rte_flow_error *error); + + struct flow_handle *(*flow_create_profile_inline)(struct flow_eth_dev *dev, + const struct rte_flow_attr *attr, + uint16_t forced_vlan_vid, + uint16_t caller_id, + const struct rte_flow_item elem[], + const struct rte_flow_action action[], + struct rte_flow_error *error); + + int (*flow_destroy_profile_inline)(struct flow_eth_dev *dev, + struct flow_handle *flow, + struct rte_flow_error *error); +}; + +void register_profile_inline_ops(const struct profile_inline_ops *ops); const struct profile_inline_ops *get_profile_inline_ops(void); +void profile_inline_init(void); struct flow_filter_ops { int (*flow_filter_init)(nthw_fpga_t *p_fpga, struct flow_nic_dev **p_flow_device, -- 2.45.0