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 E6B3845B96; Mon, 21 Oct 2024 23:06:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 86F4E40615; Mon, 21 Oct 2024 23:05:49 +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 46E1A402D9 for ; Mon, 21 Oct 2024 23:05:40 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2106.outbound.protection.outlook.com [104.47.18.106]) by mx-outbound19-70.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 21 Oct 2024 21:05:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=n6FJFsF+jXiWE+jVRO7SY/5Y0M8lMcg+GENuZwNzOLCoOMu9uYDyiUf3rByhypFJQr2gFb7+ntkIRkwASKx/sDRACrr7e0k5kN6sd912hiLwlqmqAE5Z8h/X3/FN809uAhQGPWbgQ5VCrJArPXWw4bfe3dyqB4+DRSzkYmnywhFpABbko7dATpRfALl1GDe1ZC+L2LFUrzt1gv1NZK78+u74m5+68AFKhRU6ABrOOrj8UkNzi/VrMhQZSf60mpLxsYO108LLHa/v1nhIhs3A+OZkg7JuaFkPTv/fTH2h9st3g0id3AcUxNU3WuHFzgWfFdgs5chvN7IEAgidoi9rkg== 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=r2AGe4DC9SA6mR9wWvXoxXEWLD2+3yaLy3y9zgYMSDw=; b=M9n0Pb7xFYMWCXPCWiIaay1mewbGhPUZNhVwguS0MjnBAUgkykXwYG/euB/i5imQgSq3Odix+rAb1pxdeW8cmbvObDn4N9QPmQac63P1v4LNFdWjYnbOe7hJc94KLNTew3P/YAaGaHXIUIN6/v8IAcle+XSh1g6dm0/rvA/fkkGEySzgqKgM5vvVAMoqdNqU5Ju2tICfVKZ0b6r82j1gHc/ztyrJbuyn+F/S+ymwWCXZgT0Bmv7vMb7oTFGrmd/T5g3Aaf4BupuiC/QuJu1kkLaa4Mi6Jr0RIf5m+ByhGs4hb5eYyLJ5O88ofEXwNdSWsZi/M1DALd/SXLBnbzbaSg== 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=r2AGe4DC9SA6mR9wWvXoxXEWLD2+3yaLy3y9zgYMSDw=; b=bhtAGVo5XARjKAz/Gmtmhtxyd7tTYjs4KF7bNcI6NpjnNd2iCTNEIiCTqVNuIJp29q4OWBvhOCGxcmEjJmoLrkdsQMdo2E3/+d2OyG1GhsfAR3Jp0f5TI83OfWKvBWNySEhU88nRDDU5qx9QHWBY7crD+PZtfezgdJhup0VGKXI= Received: from AS9PR04CA0146.eurprd04.prod.outlook.com (2603:10a6:20b:48a::19) by AM9P190MB1107.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:271::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27; Mon, 21 Oct 2024 21:05:35 +0000 Received: from AMS0EPF000001A8.eurprd05.prod.outlook.com (2603:10a6:20b:48a:cafe::eb) by AS9PR04CA0146.outlook.office365.com (2603:10a6:20b:48a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Mon, 21 Oct 2024 21:05:34 +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 AMS0EPF000001A8.mail.protection.outlook.com (10.167.16.148) with Microsoft SMTP Server id 15.20.8093.14 via Frontend Transport; Mon, 21 Oct 2024 21:05:34 +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 v1 05/73] net/ntnic: add minimal NT flow inline profile Date: Mon, 21 Oct 2024 23:04:07 +0200 Message-ID: <20241021210527.2075431-6-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241021210527.2075431-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF000001A8:EE_|AM9P190MB1107:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 60855c52-fed0-479b-f413-08dcf2141b33 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Y+lEasmHg5vfxETD6d7DyeeGHrXxf+iokHRn375NKi1ptxh3/7GoyBB6wqDT?= =?us-ascii?Q?qKm7UR1KbG8DwRuzRzX15P5ZNU1MWNaE+O4HavNRvDWti3xs/6blLGW7rARe?= =?us-ascii?Q?OkqSMCX41Vn83nWRCgx0gWua6dilSGa0QCy5RB3Mx0jAmYOYxG0PiRDfMOxc?= =?us-ascii?Q?TcPEO6xk7kHILWsMhEiRXAsRVT8VK+IpUnByhwVbnDy28m41CW3LTNtcFBuc?= =?us-ascii?Q?XvNVGCfN41MtjfgpSHRGbX7FvdeWEJ0HkFntHpEsnzhvIBG19hduJWzG5Vu+?= =?us-ascii?Q?LF/lhNKCF3Fr/M1mCI0xYwgSRcyKylLf09Q26gCeeorvpN87MF4jA7Sitrxg?= =?us-ascii?Q?OGFVavTFWXyAmNLQTV/40x4IkA2bv5g6YtTAmMes9kWHB7+6lDT4VKnDnFBt?= =?us-ascii?Q?cPNDeiQEygWjQ5+4E09sCEzU1BZVoSHW0jWUQIiI/cmWOEeyB761U+GCsMGj?= =?us-ascii?Q?SRyTBj/PGbNK/3HYCzBzkuEcpIspmavDL/bn7BgsRl0LbHmSIELWCVZHvUhT?= =?us-ascii?Q?FZMf7S5ep2DwdcaYM9prL4JhqqF9brtvzrsRgShqzT/sOwmKstUAyFYEdVMM?= =?us-ascii?Q?Y4kWKGHqNB7kxnoaZX83+ryNPvV5RJOXFa1/EgdBVVlGaz9BvqL+oBipx5wD?= =?us-ascii?Q?FZrYFq9KM/LLCbnuG+z6XvfDxdYyVV0vhZXgp5tkpzWmi4bu4M49RufoxJRv?= =?us-ascii?Q?7jI1x0pk3jEMvIjDANVrjfLIqx5rJoFvoPpcbLgqTHj7rR54s1yDqVZE88aa?= =?us-ascii?Q?fbeP72WdOJb7aPpCrG9wFky4cqbyL+YDDeJBfLxewydlbgsghsAtOkdd6mo9?= =?us-ascii?Q?d/RjcVVQf0vOrNL/n8e6KHQTv5YSprcH1Kgg+CJgWABUEStm0LUNTHS/Kb9H?= =?us-ascii?Q?mcSr1PKk2Acx3/Uj2H+gPpAJmM8O8OjMaC+SOBcsXolZe51CDovPGmlBMjMO?= =?us-ascii?Q?MWm0Igl7ud+F4KeSLDdUZgo3XYn6JEfGynUoXe4l7zsFAB2QGmzYTWji9/6P?= =?us-ascii?Q?mLycsLR6ghCOG+fzwrHL4jSxpAbekqq5PQ2COTsZti6PEOICUVQlk8ZfVd7i?= =?us-ascii?Q?lAyKGnP58hKZYxpEZVQDOByJWFlFF3OyJRlQ0DGNozYs//JtVB/ccOticUHN?= =?us-ascii?Q?eFbqPizAtVsVkhrgQulxwOEbxAJbrTpu35tTdj/QuDaNDrRpLU/QTTSCcA0d?= =?us-ascii?Q?fZ8P+0F3rCYk42CiwCuWC/Whbs9yLkyHQqXJpICKkvysAEh+cacM2mNbWdkK?= =?us-ascii?Q?pLZ9iEW16y7QdAn/syLc00rhZY//yXKLtEAOq5X7LuO/ROrgngRPSncYIXTk?= =?us-ascii?Q?v/zNpbDDS7Bxpa64aBSeft80H8gLdWz4OCG35ThrhBDjiyADYvX4sdKnZX3d?= =?us-ascii?Q?cEMG3VDLJL2bg2WRQUxT2HXcLDwI1B6bySKOge7PZdcWjLne4w=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)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: SiGa/3KjFIGArrH3Qy4hbxpI3Gg7owx8XIdYY0/6ENX3hSgF2i1wMMXM+myZf2f1vwDiV+LvBmAK3Dnga7hM4DKw6vnN4uKVmhMmFkRlDdlb/kBu2ntnIHQ5Vi3qEG1/XN48ybbsrh+J55p5e01ysdSYlTciisGkgb1DJO8r9moIOsWXNqRvJS6AKhyaOhsap+Wih3xPfrnWCklS58IOkgjqYOsuhQW+kzSTtXOblSS66WvTfJYr25iV14msMACG6G5wEr2lqGjjdYFgoJcQBVBkY1FLQRjK1NNpbLbxYLQ0Zkgm/TgUMTywUEdTJPgobnrGSHyce80mA++HlthrcRB1RITGZEGbwpe3EUBeykPvEmFjJxlfKY0onppR6Xh7jD6TuiabJgxbCUVpVK+nUmD4KfVqSR6pjP5yUPvrUI0nQXHS+nasrmHL+hci2DrMsT+FgWciXrK4HKkn5ddVOHdl0si07XzqRi79sVww9VWm85cFOdymq2++Cv0cTJJffeSvYu5huu+EugPw2+KEQi8iTJcTU+nqaCgjX6XMIeJWIdjg83JN7Wj2pUkZWOgyAcO8cGzK+kNzNpCwMXs/wije1p8J/RFamZsAdU6WIWSuX34t5BJblKTSgxpiAaL2t3BlQ/QWMHm7+aZT7dmaqL5EpAYcCcMAm+3FX046o4I= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 21:05:34.8018 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 60855c52-fed0-479b-f413-08dcf2141b33 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: AMS0EPF000001A8.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9P190MB1107 X-BESS-ID: 1729544736-304934-12654-45442-2 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.18.106 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVhYmpgZAVgZQ0DzZxMIy1cTCNM UkOS3RyCAlzdjA0iQ1yTwx0dTI2MxIqTYWAHOk/lFBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259883 [from cloudscan10-204.eu-central-1a.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 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 776c8e4407..75825eb40c 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 */ @@ -143,7 +166,8 @@ static struct flow_handle *flow_create(struct flow_eth_dev *dev, 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, struct flow_handle *flow, @@ -159,7 +183,7 @@ static int flow_destroy(struct flow_eth_dev *dev, struct flow_handle *flow, 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