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 3F70345BC0; Tue, 29 Oct 2024 17:43:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9FE242ECE; Tue, 29 Oct 2024 17:43:05 +0100 (CET) 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 A117942EBD for ; Tue, 29 Oct 2024 17:42:57 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2169.outbound.protection.outlook.com [104.47.17.169]) by mx-outbound17-86.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 29 Oct 2024 16:42:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Eq6soOwfJNuSUzQFOjTyG35L/oaGt4oU0o+Kkgc54GIioVGaauDB9l3C4Aiopz+9K5AhqNIqr8XdxNhNzQgeiK9mMTHTr8QCIAbtySxi/mqGP6KQK88dirphfdFevu/eFmsUJOP+I8tW2QIkoOjr3b/pm0TTCniIltd6iDOlwwPWXMoh28T5LdpGfjTVu75gwerAMAPErnQARaIHcjc332B0N5wQDMOYtQfWlgfG62/CMhDkTak1R1KJ1Dfi6K//ZFPxqiAAb0qTySBlpcd3HXHr2RNQrl5w1QMcwmPSubUaHFQGCK2Px579FptyJZjcKW+MO9RKexCcBqw0x7lYNA== 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=jebhcaxxXKCl3trHCnbWvDgfB+KhZDBgDVbERSUByT8zCwKIN0Dr/9M0gQcv52s0YMoRzwx3AQBWOxD0N1TVzwgxR0e9NDIr18toQnBdycG+cuWdgAmbcsPfL9xAxI1s2YJv22RVjv1/7wXOlDS+0PQLTVcb78biPNacMj6YVaKqquvCKgeTl6Tz6CCRGuCA9oFzDngcpcgB8I1Y6YnZgdqHUChSbYQC+1RjD6/N4Wo9Z9uqNrLCx+sLOdt2vwT9NZ6j5Ntl36ZT9jq06p8FRRDCVNdAMZ1denZnzFw64MnEePG9U3+2X7gdAukncQ/RU0vV62Vq+aoXc7kRLzRKAQ== 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=osDqNHMeJB1f5gBiqAt//iyvTV0uyfz2dzdraP3/R1iUQl/oYssny6r6NaEKtWFw/JlabSxgYFQq5e+1Cc6JosuHyhk3sgcmXXDu8l8aNZVv+ibcVIzb0u3qAdQ1mlB2mXZRu8jeiy6sVBgX+BRRmVexdTwrMMdsXuDvVvrbwJQ= Received: from DUZPR01CA0197.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::11) by FRZP190MB2168.EURP190.PROD.OUTLOOK.COM (2603:10a6:d10:136::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Tue, 29 Oct 2024 16:42:52 +0000 Received: from DU2PEPF00028D06.eurprd03.prod.outlook.com (2603:10a6:10:4b6:cafe::60) by DUZPR01CA0197.outlook.office365.com (2603:10a6:10:4b6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.29 via Frontend Transport; Tue, 29 Oct 2024 16:42:52 +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 DU2PEPF00028D06.mail.protection.outlook.com (10.167.242.166) with Microsoft SMTP Server id 15.20.8114.16 via Frontend Transport; Tue, 29 Oct 2024 16:42:51 +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 v4 05/86] net/ntnic: add minimal NT flow inline profile Date: Tue, 29 Oct 2024 17:41:09 +0100 Message-ID: <20241029164243.1648775-6-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241029164243.1648775-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241029164243.1648775-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D06:EE_|FRZP190MB2168:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: dded94a0-cf2c-4a35-b5ad-08dcf838bb18 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?+Ac9YrtqNcDkSovoxehWWVxka/8bPvx5fsoGl/sewlkMHjiC+EainWcPpRl+?= =?us-ascii?Q?D6LQQRfV2lR0nZLJLhVRYVeb15E/W3MyYF4/YuKiWZxNlH0xy2z+D6VaBVrF?= =?us-ascii?Q?qPiwr/krM86t9KX0BL60N6xUxS4UhmppzMCiYXUXOOHjTmRbinIq3QwAE3hU?= =?us-ascii?Q?odG2AYjI1u46qKWFLXOcYIlsi82L/Oh7/KhPWyny6hB0fbh6CKxCys1sh8kK?= =?us-ascii?Q?ez1ioCG3RrNnFFI76ujR7Ck8R0of/xEOlAqPJdG1kL/LJERvTDfmE10h0640?= =?us-ascii?Q?ucMArXIlT4SD4h1cGudjzPTG/wnPBZ43uUxckwcRae7bp/JtM+3YXPCojKrb?= =?us-ascii?Q?sY9mjPzH9L7Omu/DQKR12mJ1ecNvBlcuNoAUVKXr+ae7s356Dlct8vlayLmE?= =?us-ascii?Q?bKthyLTXhZ5vL7qlveCMDVN2i6sxbzNCDzk2Xe75tKncRQCA8U7w52pu7oCu?= =?us-ascii?Q?X7nn0/0ea/5lmNAn4ke+5Jheq3Qnv5QAptiUomZhh18VAl2IPpzvMUg78tnU?= =?us-ascii?Q?wGPyXra7PwBSn07AqWDOuEvUZ66rB9y0nnEtYMK57PFkDmMlThbQSx/68uJ/?= =?us-ascii?Q?2TTapbdPwVZtWCctlUruZD4Fukb/BJTVYWWpWZzoyGcSK8epsXs52vS6Fmbo?= =?us-ascii?Q?kGPyWrZJAJuj29fS/OrpHHVsB6++nJUkVjAwO3utNqsDJxYoIT//qkDTczfQ?= =?us-ascii?Q?HLFXX9l+W4usR8DTPQcOH1WQ2kGnahTAa4X3mYXb5Rt8M7+Fr22u4e2A96c+?= =?us-ascii?Q?WJh5i7nRL6Ux1z3WzO42mZVbffoezykSLXH2Br4OtWurrjJWAst0rs10dFzm?= =?us-ascii?Q?UpzuZubZt2Zuro/JabXje+oBj/iDgicmRh0UHXCGVoOPDz4tGHIeLRIqi2k1?= =?us-ascii?Q?r6dfUOtJnvJTEpHNfDrAf7zHMw0F021aBmi6v8stE+WtKjW41Bqn+8SFLfPA?= =?us-ascii?Q?a8BDvqKTy9Zuv8IMzbkG/+nuGEb+ia2rrD3JF2qgK+2q8TLyUohQ9Hq8RnuM?= =?us-ascii?Q?Err9hFRbSLI0HKpgOxLAUYtb8ghWm6UpNDA+q2e9/pb94/j28M0B0uodZaPn?= =?us-ascii?Q?4M36oSyZ4V4dlLEKmGiSHihLyY2+Jm3cUTiBVxjVye5I12xDYa+1sOtFqS15?= =?us-ascii?Q?0I2AXxrC1EhqEMeeNYxrxBGN+J3VdzsDWNRrTRwwaIhxxUh9fXPrZ10Hzm3a?= =?us-ascii?Q?AP1hQtbv5CCaL67q3aKAy+wgCmaOXTdVtTtisOen7ktgKDnexjFJmN+r3e4K?= =?us-ascii?Q?T253PUW8IXeeI+vXBSA3DgDoit6ome40NA5ZFJs7g5mSxmDu4maOfP5tPSPq?= =?us-ascii?Q?yPCEPYdDPlZ10OuzLUzLti2cqZDdk6/3pxEi8e0FzPzu5zI3JgbqTWuzQwC9?= =?us-ascii?Q?Y43UgMZ0KOs+VX1IWmahGOo3HgCRH4WncUusc9CvGwXhsBfl+w=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)(82310400026)(1800799024); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: DaCjSqQnHfN9W++dLEoWtkv4JHbtiyIr4mRWTdAsTpY1TXTIOo/Z7YDdad7z7QsEVN5TVEcF8/pnWYgjGBMGsaZ/w+ngt9KSNOWymT2ENLzG20JIDOIQZSUCsKExetAlWSqB8IsmxM2qySyHE+kSFUFfDVchnr1xs5jrKAPH1YnE9rTh8KSAcbMrD6mSNQE2jxB9hZyTXUaWE08erzGMdbjvuz1ZJUpxDJUXz8ufnJb8pwdu0T/WjsDT8NPBzCS+2PypOBvttAsyWBT6C45MOVTfJTyDR0e26CiVDh7ubYfa2qrRyWFa86mB/5MSpg/G4y+VwzCNO3NZLK85OHlk9wcqiUXJAs8GSbLfKXVnoCztvimAE0hmyWJTowCD6dGdd/B5/E0hnfvCQVOm/R8R6r0RY2aEjDkwfsCJnhr+7uGeslDwLu+ws/HgsCf5N9AO4ESMvIrbceGUB1aD4Lnz9eShajdxJjpt/1shey70iOBwaM0zenjIdQPG+YA/dkeXQch0mO000LuXL++qT1lam2TKjWHHSI9kYL/Dq2CwBnFqGjSvalsDSV5/jXBJn40P/3bwQ3DwMTgk873c2BvIwBoWz2PMojgAMRyDeFFxYFxn/mELs+keH4Nide+ho1l/TFiafscTwMGuEpPK2IbQEpCVA2UcE3lIu7W6UV2OlLE= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:42:51.7927 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dded94a0-cf2c-4a35-b5ad-08dcf838bb18 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: DU2PEPF00028D06.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: FRZP190MB2168 X-BESS-ID: 1730220174-304438-12709-29883-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.169 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.260063 [from cloudscan14-53.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