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 77FCA45BB4; Wed, 23 Oct 2024 19:01:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C7EE42EED; Wed, 23 Oct 2024 19:00:57 +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 B156342EDF for ; Wed, 23 Oct 2024 19:00:50 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2109.outbound.protection.outlook.com [104.47.18.109]) by mx-outbound21-18.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 Oct 2024 17:00:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XV8LIPtDnEknUnSe0UH14Esn2FX9dTG1fAyARO4/QyymA3N7ANO1HOZRdV/8gBrQoZDU6IhtySEuOuLsZSNUbEkAwfnLHNQLetwZNjjAwoR6ESAeOs9JStudTEPqHnsf1ewP1xHxb9fxcx49jnKNg8AUUvngwk/9hH6Vl9NjV0SYw9s6oLENOpObcdnXOKhZCiDeJAjRjWK6Tx7EaOX+iryXrfoETf/cVXpMhUVS4VJos63oR9N95FVs1ANWSew5WZFE4ZflXICTTg8KjgVc4nlzM4Rwr5VIz0KMHbV89k9L3/88RLlNjp6Oi6/OS2ExuXKK0u2/+/EDXHHCaLjjVg== 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=oYsRCOa9TJaYSgyJRDSoVAdftH5Gl0cMko3uw18xDWtJd1Y7LIXEEmMEi1e6Ty9wYYJOrIbf1aKtRYL8lWGxseNCTKRilfSO2o2/ENf3MUyMHnb6NLMu2PZsK9zI5rFJJ1cMX1PF6r5k0i2+ZuQTYr/vGDuFNl99YgIw+wDS26gMtwsrxxQsTIkf+ulhoCzB2BG3xxSCCf4ywOhUQgYJ0xlVeBGdmlV2A8mGhcfK55DTU35hCm6xcKyQ+JgH0o8WJe/K1Gnhtu56WibuiADEWfLw4ur3F0YsjtkScF/gFT5y7jk1sB5SQJLBo9cH9tDowsdLnt5L+fzmySG39zIPGA== 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=L7q0lfqi5lpFEVt+Wc2xzjaxWlZmuy823O2BSdZiusvbTiS+WWSWl8Ah+d9ZLOIZT/sF53WfYtqZO2cIPh29RQ1Y//G8Zk/EdqAcZVvgM2PzED6jcw0t6m7SayziFwWTGMDf1Jh30/hVZx/HEJIUZxNUhI/0kAHJyAkOZjTtyTU= Received: from DU7PR01CA0016.eurprd01.prod.exchangelabs.com (2603:10a6:10:50f::11) by FRZP190MB2166.EURP190.PROD.OUTLOOK.COM (2603:10a6:d10:137::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.17; Wed, 23 Oct 2024 17:00:45 +0000 Received: from DB5PEPF00014B9E.eurprd02.prod.outlook.com (2603:10a6:10:50f:cafe::24) by DU7PR01CA0016.outlook.office365.com (2603:10a6:10:50f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16 via Frontend Transport; Wed, 23 Oct 2024 17:00:45 +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 DB5PEPF00014B9E.mail.protection.outlook.com (10.167.8.171) with Microsoft SMTP Server id 15.20.8093.14 via Frontend Transport; Wed, 23 Oct 2024 17:00:45 +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 Subject: [PATCH v3 05/73] net/ntnic: add minimal NT flow inline profile Date: Wed, 23 Oct 2024 18:59:13 +0200 Message-ID: <20241023170032.314155-6-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241023170032.314155-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241023170032.314155-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B9E:EE_|FRZP190MB2166:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 089492eb-a6c5-4441-8df4-08dcf3843c5e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?2wh9ertTzdG4JZMfN/d87Yin1O3vTEZ6afPZ65yZmgUmEOROCTm1eXk16AlC?= =?us-ascii?Q?SVfoqeLuPMhDTYpqFuD19huIjT4ubBiox1NzjzISnMpW1Aq083Za5ohGO1Bp?= =?us-ascii?Q?R3oh8bXc6BK9jwmd3N6SfiJ918xhrnsVU/ShTNYt3+24IMI1E7yGfe3yrzUk?= =?us-ascii?Q?QFBuSWJ9ZPNTtCMLX2a/Hj5oTGYHgRLBR9pri9Mi/2Z75Lm315ffwxPTfOYW?= =?us-ascii?Q?8CFhQ7YcwGUiSQFIvET/HieJxl0AClYWMgcDUpKHPtewCDJzLCM/pH96tOXe?= =?us-ascii?Q?4TYESmvd38SMH0RwRE1PAY1XinpM3agJVAEnPjqOuRjH1lCYOtTDnUGMDS1+?= =?us-ascii?Q?RBMwp+ujNWs0/JFLCU70l9oomlRLYNLddwWaxIVlxySJvgv6IsgnGHf3xElL?= =?us-ascii?Q?W9/lUEkddi7miKTvndWrZMFu93+73Zs/h7OIRjcVrIiiHPOsX/ofbQJvDpQl?= =?us-ascii?Q?xnzU0DPSElxPTmgr+pq1SZcnlpyiq6DV7r2aM6b1KUDoKeO9566L5EbPwfor?= =?us-ascii?Q?vCVMegrAnHTfBM4WZOMdv1X4YD/ND1en0j0/6nLLs0FJuKfYvblUb2p4SDf2?= =?us-ascii?Q?JlPeKWRzTErtCFT4hyQpQP73OGqmixlA6dvurgXxWB5AcjRnG5nCfy/ks/z+?= =?us-ascii?Q?AAfkx7fsXzGELDTXxUhBGr+siboJs5BXO4R8J4pnO99BCbx6Xu7oyjlOgW7G?= =?us-ascii?Q?2ndkain1yhDANWaIOXmX39zElFde1dF03T4/VWHcFmClYTo99PbtyNwFaZUG?= =?us-ascii?Q?gIqeAk0BeKc+Scy6Yy4twsWxp3GHHilu7Wws9JV15SZaIGbcxWmCyeDAsr0/?= =?us-ascii?Q?DN9NWp3X4T3WHBG6SucpDyOWET4Le/Wb07kmUG0Uh/bVT87v1Y3tzboI9FfU?= =?us-ascii?Q?FHtZRCyrjMWKW1fm/HhB8Cn/6wZ8iUM3hxeAasxfyA1C5QZyB5uEHdmn53xO?= =?us-ascii?Q?vaYPD2icIO2Pr6qFeJgTz5VhdxhXIJiIBa14ViUW251019pZOtqKTlRt73Hy?= =?us-ascii?Q?DtotadQdklsf413eQO1XHNovczQVddZmQnoMjBKAygD5u/9aHspsbEjlVmLz?= =?us-ascii?Q?Nw5KwfzA7PdxlwcIkxESmgiSSpVvmGucMIiAxZXjh2QZPsmGv6PFAmxRaBQU?= =?us-ascii?Q?QR+XuiphPBQsXqzMZ18jA54aZDMBx3VSbj2GcbY0DWOMwpBxy4RhpeRsceRT?= =?us-ascii?Q?OYdcXP7keRVa9Y/znJwpLT50SZJG5WY4fgdwyfEcF7TdeVwOAlc6/Mc6/VsW?= =?us-ascii?Q?A+ieCFF44LQyjpLcCmdpOgQeuWV6QvhtqyDJm60thfkIp6+AvQLOCsBaI2p1?= =?us-ascii?Q?W04Fa3LYVfbEMfaBi4FMRIcSy9hiuVXkHpai15IzQnbCCsJtMQxUypP5Hi0u?= =?us-ascii?Q?8SiVgSUiqaDl47aQ+tSoRXDM7LMFa8yaYyrNEepBxXyrALAtSw=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)(82310400026)(376014)(1800799024)(36860700013); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: GA2v0Crdei8xMvhLPKYBnSLEMKXCSOFYIWZCG085jxPFRMIWuUe4ruomjb0eXbVH1GQCYsv4lP/EpzMYUbL4gbZE4msMqG80+5MHuJ2m5QxHlzP5zDRlBPQbzL9018VIjXkseF4cbI0zH59I4AOP9DJ5ZPFTkPFX3BQJewP5T/WOUmLiqF1f0QU1XjP2FvFwt3huaCtLN06mFUJ7aJAlYW879w90meFn6OhH7BltXmCTp+OSZXrrQ3NMUeX/4+HP/eEvqEZiDJ2vS/I+6SmctPvr7YdG0LXj7bxguVgxNJ7dWhHcw+yoi1dHLe+JJvjuUKLuHciVGY8DEFETHujRnWOUWAL8GE2Z5yKoVn4jaE+wkoW1Cjx47QqyskZ6f/tClRS9in8CmrgolDV1LUBKWXUQkk3KEIH3F9s71YsZO/0Ffj0R9jtSQQKXHvgboxPUXvvERYh7aBbHqpt0uVB0lzn4uI2Gznx2H/L0fU4JylJwKUhubIu2PTA3wPuUZFTx2VTduboTluYtvZF596ufsmK/tV6Qfu8GKH+LvdHYpRdNGIuTFVC9AUwtaNaT4OM6ERZL4qZRnh55GsyZ0rhtgLWxcDjvd8IbTF12JBt139h5mQRJgZByQC9AjuK42TUzPSCq7pdA1tPqNLUg5Aq0hg0InQxRHRh6GbQl4xiqYBs= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2024 17:00:45.1486 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 089492eb-a6c5-4441-8df4-08dcf3843c5e 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: DB5PEPF00014B9E.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: FRZP190MB2166 X-BESS-ID: 1729702848-305394-16205-13456-2 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.18.109 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.259925 [from cloudscan9-18.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