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 9444645BCC; Wed, 30 Oct 2024 22:40:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4353F433E4; Wed, 30 Oct 2024 22:40:13 +0100 (CET) Received: from egress-ip11a.ess.de.barracuda.com (egress-ip11a.ess.de.barracuda.com [18.184.203.234]) by mails.dpdk.org (Postfix) with ESMTP id 58E874339E for ; Wed, 30 Oct 2024 22:40:02 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2177.outbound.protection.outlook.com [104.47.17.177]) by mx-outbound47-144.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 30 Oct 2024 21:39:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HrPCRIOEvOZi2JkO6D09SDpINcjhu69i4KARDCSZGEeu3LRT5CcJAJ3/ZuXjxWXHXInp/lBITdDTRJynku+7QudeMy0J7NGRMQ1FR7fpDcedem36Gl+XS5BMMopIFddszwNeN/KpSO9Jgbw7HFXf81jZVvTRsADVtVn/WF7hW2R6oyzpdhCx+1GmIxSN2W6qTxdKnRVQ/W3e0v4TcDah8Vyy/1j99Wv1uNK6iY+HmkwS/QSwCuLbduktjpUma/pm8AAbNVcG78Ib1tl2rAqARvFBRwaSBcsqFvpBGbARtm1yyWIl12A3sTUqI4BwrCpuwvYHdsoz2O48KzKaFHx4Gg== 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=3TPDQdz4v8xPMoPJUkKtoldCxZWgwM3s9N8JxfVg/uc=; b=oenI/LATi7+4XdSIRAMMG1l7SelnQBS+k1nA6W54yKwXs8ixUXrgBfr+z+uRAecFiQfzi7uYYuzA/T3nGVCBY/RRpvMyxFR3RqJKm/T4D0obIrgdm9EyZuiPEVJXpX0KJB/j3cxD5GOYO56f2CyKQ8PsR/6z7rsJixrGDVje9AkEAV3PzzW7FpjkYEyUsQxM02soB7FTHo7Dm53tXO0R7iq4wWIMGJyo315fPDaXwWTwiORcyguzMqYBYLG1g9ugmW+Up5UD5bTf3WrriW97y5LJA4HrvmyVuSiumsLN6OIt5LM3jLP/9/30Pyg+3H6DZRKUYm2/uwTFQBvbDyfSfg== 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=3TPDQdz4v8xPMoPJUkKtoldCxZWgwM3s9N8JxfVg/uc=; b=bAT7EeAlK6bhx/tGhsh9QelQYnuqJL+ZWlGqJPrz6hJf2h00zrnzHffoGACLf4Xd6ooI6FL8hApGjfNcVdBq7v+6cdDDS/j6/ZpchMK1trF9lK/Mwdsp9XcHSRn9ovOpFi3KvS8h10opWVQYeHdzRxjO9fMBOSNQ6xeuBSGKq7A= Received: from DUZPR01CA0015.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c3::18) by AM9P190MB1219.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:26a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29; Wed, 30 Oct 2024 21:39:57 +0000 Received: from DU2PEPF00028D13.eurprd03.prod.outlook.com (2603:10a6:10:3c3:cafe::e2) by DUZPR01CA0015.outlook.office365.com (2603:10a6:10:3c3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20 via Frontend Transport; Wed, 30 Oct 2024 21:39:57 +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 DU2PEPF00028D13.mail.protection.outlook.com (10.167.242.27) with Microsoft SMTP Server id 15.20.8114.16 via Frontend Transport; Wed, 30 Oct 2024 21:39:57 +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 v5 05/80] net/ntnic: add minimal NT flow inline profile Date: Wed, 30 Oct 2024 22:38:12 +0100 Message-ID: <20241030213940.3470062-6-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241030213940.3470062-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241030213940.3470062-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D13:EE_|AM9P190MB1219:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 2be7f0ac-7cf0-4caf-102c-08dcf92b663d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?tcGaEi6xibbuftwoSsl9V80o8Dk5SE35dhkbR1rKtT642sojnQQiDc00LPIT?= =?us-ascii?Q?cukHUX6n4sQr2MBwf35J9GTkcUi5yPUYFaonKGJ+Zjwlp06kX+o+H/nxBUdg?= =?us-ascii?Q?ggOau1LRzFpHXLnkULnr3joOG68l+15HCv/z4W/sIUILkX2eUfpwhNLGYFnV?= =?us-ascii?Q?u01+ST+OlHp4I3UyV8GsfLD1monHSJZYuv8zdbl/LQ7WHwDUND6ZYN1rZjlx?= =?us-ascii?Q?v9XrZ6tWzRs6ENadCWEnJWJyQKN6EadNijJrmPiajPlbPkduWZ4pVUkzycEz?= =?us-ascii?Q?NO30Q6sv8z6fIvgwkeZLMW6MQLfXuzemPMpc6icmmKqWTOT5F97Ue/WuyDme?= =?us-ascii?Q?4hW/Q12SpA7y4jDh+4lEYP9L6t/S+iO0ZqfseBfNazJ1+Gvlwf42B+NbWm5Q?= =?us-ascii?Q?jEIqzCtxqZRgAHxRonWut6zBiUK+XgUsMykYOiGU321jM/RssOXkgTtQ8McF?= =?us-ascii?Q?l38cbTADIc9M3K0VvafXvXE+DXqTToKwrMXLDbXHOVWVx54gMVTsu4BNQEFQ?= =?us-ascii?Q?hG/ZNwjGnaY0qQod03pl9zoM+0kTt0rRSZgWkUFweCO3F31lVdR2rOwX8p1P?= =?us-ascii?Q?NUrKhQgvGDkIBe51uUf73AWzBO4QKIHlBclAdvSLIvMw5PLgavNUwMMXKaxc?= =?us-ascii?Q?5MfJDFiYyFBivDway7rroIKfvfA8Vf+YPY04eygiDwIlsIGt3p5neoEe04/E?= =?us-ascii?Q?VO3RrcoErtNKeJTuE05eANuGo22PVDDFcmMC4+AlXqIHwK9icu7t4AMiq569?= =?us-ascii?Q?nzyx62Y2lKSox6kvLmky9h2CkP6Q+GS423jddkS8Fd2WrjIxBxSUu0s49B49?= =?us-ascii?Q?AZEXobPplrae5asMmJu2z4lN5oh/O3snT7eL1ZB32NtF0YItm8Y5POXQuuuL?= =?us-ascii?Q?UXpkDq/uzYWecp6VJhXVxCvul/L2SCXWzU2giKhxc80q4tTUB2yRP/R/5P48?= =?us-ascii?Q?drPlJudTGJsqBcsn1mktXKVXiwLeh2Un3T4orn3SV3XAMzsPgsn/Jir179ue?= =?us-ascii?Q?5JUVRcpJCbKAIskkUtOxysuZoU7fc7M/f5jhFl12xZnuq+wfYdSmtilhcnFD?= =?us-ascii?Q?59yBFSZzrC+X3wDVTShcJHCGlS8GI6Za9WiL2HuFdJlirSITIAeFqHwHIsxU?= =?us-ascii?Q?PQ8pMqXdDFUw6axwVBT/3CFxyUipJtKRmvpdMF5U/tfwbSpl564vkYylRYYM?= =?us-ascii?Q?9o6LtOTGTDO9xi1joAQR8OIKCWFDqsdTNv2J6ryKc0ap2dzxdCMjXHdKThr0?= =?us-ascii?Q?uE0co01lKbZbyM+ttbnSvY8b6Y5InhZImx0jENE+CUDQaALLz1HxvWrBU+7j?= =?us-ascii?Q?t7PCruwxDSt9QLywaoBnMzsi74bad5YF8cGmE10D6b+cNOy+QVVK+Z7aNgRX?= =?us-ascii?Q?mvQh4KUlEkJguFQNNINYCWNKBbRrmeaGoIcUfvK4a4EE241lFA=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)(36860700013)(1800799024)(82310400026)(376014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: Yc0VIeY8vaOnMSGsTutT401JddXGqAq+f4lvHCFkgvi5U1KXGhIesg6bGW6hIAYprLPyJulE7NPMsmuqluSE8b0hX9ake3cfDph4ViJsik8fx/pXcYy28r/MCcJxmQpRUUAndnhATm2Bqns9ohV2w+djoqXj3ysSRi7BrRY3LwxUkJDisDpKc4YeOXR9wkOtVqNFsavpVDJHn98BnXYxQdf0mtcCZdwcX9r9bSWm0cscDUAI1q16uB4Ockd769pkmnXZk2uD4Sqf7HSdYdrcModbYkhqxL6IdjpL8mTSFAuN88aqvfkKfM2XDv+MsM8FKc52ceD2h2vgg/XciWWyV5IyMfWanOX4d3G/hvbsFV0HJHR89zXXSEBCIECjeif8i/9PWQm5dxXIkA+1XF9Mpuopw383ksoAmI0N7q6n2KdgGukNZA1C55T/NPDlP/NUqWMshb2uYefo6B1mPKsrY01NKkTW6a0tMGNe8KqkWywsaHFuGs1lM2kYAgr4TO6UYUNT4V3iwv7e/+sUNiN2WGl41nByhsIcCXrJyKig+Ghhlk2hDBo2QL4hDg5yfo3w8NzO8c9TUEnLukx7o9ISBIpXu9tTZwitBzgSPX9jH0ol4TYmTa6/Fxeuw/KAZlNseDefkE2Gjj6N+yhHVQ8IyDpOzhG+LW1+/b5KlVgL4vI= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2024 21:39:57.1299 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2be7f0ac-7cf0-4caf-102c-08dcf92b663d 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: DU2PEPF00028D13.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9P190MB1219 X-BESS-ID: 1730324399-312176-19304-20341-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.177 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVhamRmZAVgZQ0DjRKCUlNc3QzD jNKM3U1DDRNCUpLTXN0iDJ0jjZ3MRQqTYWAGEQuapBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.260091 [from cloudscan16-249.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 The flow profile implements 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 acfcad2064..5c5bd147d1 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..34e01c5839 --- /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 __rte_unused, + const struct rte_flow_attr *attr __rte_unused, + uint16_t forced_vlan_vid __rte_unused, + uint16_t caller_id __rte_unused, + const struct rte_flow_item elem[] __rte_unused, + const struct rte_flow_action action[] __rte_unused, + struct rte_flow_error *error __rte_unused) +{ + 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