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 4B9FD45B04; Thu, 10 Oct 2024 16:16:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E6A540BA2; Thu, 10 Oct 2024 16:14:52 +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 7DDE240A6D for ; Thu, 10 Oct 2024 16:14:42 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2113.outbound.protection.outlook.com [104.47.17.113]) by mx-outbound20-48.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 10 Oct 2024 14:14:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZjlTZFp1p8aP05CEVPOBytXBw/y7pcXZyonKlwuRVa3pWX0oRtZBO5x2Ybx2pc76/TObgTHPjy2rrf8AquWJqrG41KA5WMFNqpkoVIioiBKUrb6H1RmL+z0kjc0E1AbESj99NLV9zc4sRf96VZRy/aSHaDPxrtMyCyQ/Qp9clxAm2nojJRtrvDbsxw8iP59NtxwGzP5I6mqK6VKfPNbvBEJEjLk3H9whdRzuzJQL3dax/U8snoMHHXTn+JAieX7GYNaVP5wPNu3qNTE/DeduotAeJDnbZ57rnlOnDwRfFBDjGhk5uzpFRh4UMjQ3uSG8a1mamj20gvgroqP5NLPLTA== 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=Bdv5BhMkuCv3MyCM3lTypi+FSSuC6edXpev4joFn1L0=; b=bLcQ8uAMPXBGStcBGFdtG4QuAq/VBdtpnKCjnzxJ9p1VTIZErculZewRs0xVRD0POxK4V/q8u3e5OkYeM5zcO4AJZLOAZHdklIfZJZ0xE0tNnEOGMJeZuch4AAnlLt3XVQTZ+4L10UQoSRXwX4UKVptFQ4ScephT0nbn7RLYtN+8vSNtoMCVRoQYF0RMTZ2qyytfPowlds7kjv/w9xb9fpHApqA37UCGl+YIPEcxqiE/dXgtXcQE9/ZiOC5cVAsWix8hf3KYIDLb+73pt+z1c9hENnrM+mD5zg9GxgnjaM+afHNIKGeUPTpFpXPt/OH71wBSZTum0D/PrzGAlca9iA== 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=Bdv5BhMkuCv3MyCM3lTypi+FSSuC6edXpev4joFn1L0=; b=KBQZVNmkzJ2rT0SZRo0s27ttljKtFBzK6X//qoVKFeXSVu+1U6c/MAd5e4QGNV74txB1H1ccoDK+izNBL6jwaWCHwkOoxPNxLzrq+KIPYZ0Ja1XLSzXmF41tcSrktC41R2zvxYFHD/LbsUhNxBVAvbLOr3FUzSsjeSICbi63R24= Received: from DU2PR04CA0088.eurprd04.prod.outlook.com (2603:10a6:10:232::33) by PAWP190MB2191.EURP190.PROD.OUTLOOK.COM (2603:10a6:102:46e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16; Thu, 10 Oct 2024 14:14:37 +0000 Received: from DU6PEPF0000B61B.eurprd02.prod.outlook.com (2603:10a6:10:232:cafe::60) by DU2PR04CA0088.outlook.office365.com (2603:10a6:10:232::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.17 via Frontend Transport; Thu, 10 Oct 2024 14:14:37 +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 DU6PEPF0000B61B.mail.protection.outlook.com (10.167.8.132) with Microsoft SMTP Server id 15.20.8048.13 via Frontend Transport; Thu, 10 Oct 2024 14:14:36 +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, Oleksandr Kolomeiets Subject: [PATCH v3 14/50] net/ntnic: add IP fragmenter (IFR) flow module Date: Thu, 10 Oct 2024 16:13:29 +0200 Message-ID: <20241010141416.4063591-15-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241010141416.4063591-1-sil-plv@napatech.com> References: <20241006203728.330792-2-sil-plv@napatech.com> <20241010141416.4063591-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU6PEPF0000B61B:EE_|PAWP190MB2191:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 812890bd-55b3-4681-b9b3-08dce935df71 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?HfcDw2QCXmabBn0i5UlnPxq0RwTNsOHxYGUUAAfD6fEoqs2g5T06ydpcy7F1?= =?us-ascii?Q?W39XoNPHDNo46ymTSD6oe6fEA0HaxlCxDnMQiRu1nXZ73ClVF/APF1t/VW/7?= =?us-ascii?Q?ECuFeR4HlRqe0UnhvyytgAUe9tTCcYeMjMLYskXYXn7Pa7z+QefSHSpIYsuD?= =?us-ascii?Q?e3nzw8I0RTdFCuzy36XnyQ1r60rmoQbCZH4ajaY6S7H6H1NW77dBpJnIZdXl?= =?us-ascii?Q?Ra8Rud4S4TgZIgXeWigGyDpgt9oHOkIFf0rZhFWwWDcGHMyR1IZxB94aEs95?= =?us-ascii?Q?xGHmjVsez3MK5fOB88jDuiDjACUzXYkPLbyLDkDG6HANXDF3v3SxL6gNKh9J?= =?us-ascii?Q?BUJ+8h/szzdn7DKD/KdY01tt1wLKy3kySQCOHtxlEz6A7RuMCyDgMAR5zUGY?= =?us-ascii?Q?u33mnzdtkvPs3pz1GCvDkNNZx2aJZjbDEIUthXV1sGWNfOOvQTyD6vIJNQir?= =?us-ascii?Q?mc3M+Al3CGf6J9AZ3Z5BJ5h3BdHa49GPkihIWQLDE9anuL4wVLcQ9QgDQk1W?= =?us-ascii?Q?TIoZFjsVuGxd01XieCzpGkNTuUCfCMQPbKA0E/MsdeqhBYUSs9F5q8YN0rhu?= =?us-ascii?Q?Wo/aEL+CSuMQo3DPhvOFuViEw7vp3W0sZ3JXFEP63MySKqEZNUghz/bpOPMZ?= =?us-ascii?Q?GMbUJE0SRqjQELUQJz7L7mH7JHm+4lhG6EDGIVAbZ0IzibtfCEJKQHDgaH+v?= =?us-ascii?Q?Xse0eoCFRv+7mcTdmg0B2rIScowuBH1pBrouWp7IcClwrLTutjACsDp0mAUO?= =?us-ascii?Q?OzW8ztS4fEqU9hwDxV4nLY2vdGbyf/cV+3HD/lLxCfaojS+e5etQCkfis5TW?= =?us-ascii?Q?bTfU04+qIdT5EHE0u5GSbauCTL7xqA7MMsVkSvSLAT+pz+8fxCgIOt7+4io8?= =?us-ascii?Q?VqD+dmkefoSxUQOsN9/xMhH3WcKhQatmwKy1AP7QUwKdl9J1deI6ao2NJYb9?= =?us-ascii?Q?1EEUrGRb0GeqTGXpIQ2W8C4lK9yXQgbiqS4x0A0Oq8MVx4QeOM6pAUuj/lBz?= =?us-ascii?Q?lI5tAr5mbetuDKkFva2WeXwN7TbyvprqAK3HBATAVEraATVZwJeTMxSq22BQ?= =?us-ascii?Q?hi4jPfZLhaTYxpm0hh4qUS+eSo4mSr4QTrj6IKsoFBtIrZe5URi3hvtROoKh?= =?us-ascii?Q?Wg51nYRMg3FOVlT8B9HoX5/XNF2gio5NiscwpLvh7kaQiEhIzJAbNCskbULj?= =?us-ascii?Q?KqdmKG0inz4iP3M6y0PQCkz/xrtpPiTNLN7tNuzhZhirmDNostoePmNn5UiL?= =?us-ascii?Q?IRNqJcd2fJvfIfZdJF1oDcZxhsJGrKi2G6NvIxeHoeCKBgE0PT9S2hoS4OvW?= =?us-ascii?Q?DMHEU+JuXWw77Xc2S1qtSdJ9tJggBQpK09wrCDjyUMMW0V8BkUlNzu8UU3O9?= =?us-ascii?Q?wvoAsyZOSNNDcKjZTRLVRYxn4oQ0?= 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)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: x6pSEj9vVVjyBfyuv8pysLJDdiMud4l3e7H2/Lr6tuKpzYAmEeyBgjLdzftIVviS5z4XJx5WF6EEMNDyGZ0kOozrd27oZq6+QXxFzCoqqnapoJ/cTB1SlGiW13R05VPqCUVy4JoQ21vUBIDo1v2ZrhsuIGvDZqYzZj8QzPldmISx94kMmjlRl6vaozbG/Y7A0WWHYIEp3CquaJkH8hnEO5k/sEsK4UXbOwTVEW7GeJzIoPKnGpKl3WIUdyYRtKusV6mRU3L9dQt0YXUZ1AAkr2qE7T/oCrWrOcGsWnNo+mTzGtEdM4pVMptBVo1na8FuvawgiyoqIglugn19Yhki7Fq/fzj3pwQa4gdpIHS213BFwBAvzpylpkSowvMtu8PBrKgVGiMuJE+4tXPuLMFykrwdkjcMVSQktPt+VkxPO6yhEOY9wdXZ6Gxhe4chKsUVYKkEOgsF3WZJQ4qQkVcdcE0jqGfVKatPkhTYuTu1Vebhsl0JHZdfSELGfJNlcX9r0rXdNLKyb8t8DXySnGCd8XdLMFNJ2Emy5sSA+mZ+NRrHgjYOwPeb0IWZUyh6pMKM3p/DnuTVcpi5wHNWXvggprx9pQ0mw+KRgIJNnB2x+IluZmKCWZ8NeHDz7Ajh/c+3p/Cgz/etsUIMvJQgCzuPqtzr3aOYjcCVx5ueZ9P2n/E= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2024 14:14:36.8266 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 812890bd-55b3-4681-b9b3-08dce935df71 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: DU6PEPF0000B61B.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWP190MB2191 X-BESS-ID: 1728569680-305168-12632-25864-1 X-BESS-VER: 2019.1_20241004.2057 X-BESS-Apparent-Source-IP: 104.47.17.113 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVpZGZoZAVgZQ0Cwx0dTAMMXEzM zcIsXYyDzJyCA1JdUszdLAMjHJJNlSqTYWAIP6C4VBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259630 [from cloudscan15-228.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 From: Oleksandr Kolomeiets The IP Fragmenter module can fragment outgoing packets based on a programmable MTU. Signed-off-by: Oleksandr Kolomeiets --- v3 * Remove newline characters from logs. --- drivers/net/ntnic/meson.build | 1 + .../nthw/flow_api/flow_backend/flow_backend.c | 12 ++++ .../ntnic/nthw/flow_filter/flow_nthw_ifr.c | 68 +++++++++++++++++++ .../ntnic/nthw/flow_filter/flow_nthw_ifr.h | 43 ++++++++++++ .../ntnic/nthw/supported/nthw_fpga_mod_defs.h | 1 + .../ntnic/nthw/supported/nthw_fpga_reg_defs.h | 1 + .../nthw/supported/nthw_fpga_reg_defs_ifr.h | 42 ++++++++++++ 7 files changed, 168 insertions(+) create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_ifr.h diff --git a/drivers/net/ntnic/meson.build b/drivers/net/ntnic/meson.build index 317b696d5f..1ca34d8b47 100644 --- a/drivers/net/ntnic/meson.build +++ b/drivers/net/ntnic/meson.build @@ -48,6 +48,7 @@ sources = files( 'nthw/flow_api/flow_filter.c', 'nthw/flow_filter/flow_nthw_cat.c', 'nthw/flow_filter/flow_nthw_flm.c', + 'nthw/flow_filter/flow_nthw_ifr.c', 'nthw/flow_filter/flow_nthw_info.c', 'nthw/flow_filter/flow_nthw_km.c', 'nthw/model/nthw_fpga_model.c', diff --git a/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c b/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c index e7ef050a9d..2cf60ab11a 100644 --- a/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c +++ b/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c @@ -6,6 +6,7 @@ #include #include "flow_nthw_info.h" +#include "flow_nthw_ifr.h" #include "flow_nthw_cat.h" #include "flow_nthw_km.h" #include "flow_nthw_flm.h" @@ -27,6 +28,7 @@ static struct backend_dev_s { struct cat_nthw *p_cat_nthw; struct km_nthw *p_km_nthw; struct flm_nthw *p_flm_nthw; + struct ifr_nthw *p_ifr_nthw; /* TPE module */ } be_devs[MAX_PHYS_ADAPTERS]; #define CHECK_DEBUG_ON(be, mod, inst) \ @@ -1407,6 +1409,16 @@ const struct flow_api_backend_ops *bin_flow_backend_init(nthw_fpga_t *p_fpga, vo be_devs[physical_adapter_no].p_flm_nthw = NULL; } + /* Init nthw IFR */ + if (ifr_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) { + struct ifr_nthw *ifrnthw = ifr_nthw_new(); + ifr_nthw_init(ifrnthw, p_fpga, physical_adapter_no); + be_devs[physical_adapter_no].p_ifr_nthw = ifrnthw; + + } else { + be_devs[physical_adapter_no].p_ifr_nthw = NULL; + } + be_devs[physical_adapter_no].adapter_no = physical_adapter_no; *dev = (void *)&be_devs[physical_adapter_no]; diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c new file mode 100644 index 0000000000..93ede89b44 --- /dev/null +++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c @@ -0,0 +1,68 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2023 Napatech A/S + */ + +#include +#include + +#include "ntlog.h" +#include "nthw_drv.h" +#include "nthw_register.h" + +#include "flow_nthw_ifr.h" + +struct ifr_nthw *ifr_nthw_new(void) +{ + struct ifr_nthw *p = malloc(sizeof(struct ifr_nthw)); + + if (p) + (void)memset(p, 0, sizeof(*p)); + + return p; +} + +int ifr_nthw_init(struct ifr_nthw *p, nthw_fpga_t *p_fpga, int n_instance) +{ + const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str; + nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_IFR, n_instance); + + assert(n_instance >= 0 && n_instance < 256); + + if (p == NULL) + return p_mod == NULL ? -1 : 0; + + if (p_mod == NULL) { + NT_LOG(ERR, NTHW, "%s: Ifr %d: no such instance", p_adapter_id_str, n_instance); + return -1; + } + + p->mp_fpga = p_fpga; + p->m_physical_adapter_no = (uint8_t)n_instance; + p->m_ifr = nthw_fpga_query_module(p_fpga, MOD_IFR, n_instance); + + p->mp_rcp_ctrl = nthw_module_get_register(p->m_ifr, IFR_RCP_CTRL); + p->mp_rcp_addr = nthw_register_get_field(p->mp_rcp_ctrl, IFR_RCP_CTRL_ADR); + p->mp_rcp_cnt = nthw_register_get_field(p->mp_rcp_ctrl, IFR_RCP_CTRL_CNT); + + p->mp_rcp_data = nthw_module_get_register(p->m_ifr, IFR_RCP_DATA); + p->mp_rcp_data_ipv4_en = nthw_register_query_field(p->mp_rcp_data, IFR_RCP_DATA_IPV4_EN); + p->mp_rcp_data_ipv6_en = nthw_register_query_field(p->mp_rcp_data, IFR_RCP_DATA_IPV6_EN); + p->mp_rcp_data_mtu = nthw_register_get_field(p->mp_rcp_data, IFR_RCP_DATA_MTU); + p->mp_rcp_data_ipv4_df_drop = + nthw_register_query_field(p->mp_rcp_data, IFR_RCP_DATA_IPV4_DF_DROP); + p->mp_rcp_data_ipv6_drop = + nthw_register_query_field(p->mp_rcp_data, IFR_RCP_DATA_IPV6_DROP); + + p->mp_df_buf_ctrl = nthw_module_get_register(p->m_ifr, IFR_DF_BUF_CTRL); + p->mp_df_buf_ctrl_available = + nthw_register_get_field(p->mp_df_buf_ctrl, IFR_DF_BUF_CTRL_AVAILABLE); + p->mp_df_buf_ctrl_mtu_profile = + nthw_register_get_field(p->mp_df_buf_ctrl, IFR_DF_BUF_CTRL_MTU_PROFILE); + + p->mp_df_buf_data = nthw_module_get_register(p->m_ifr, IFR_DF_BUF_DATA); + p->mp_df_buf_data_fifo_dat = + nthw_register_get_field(p->mp_df_buf_data, IFR_DF_BUF_DATA_FIFO_DAT); + + return 0; +} diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h new file mode 100644 index 0000000000..439aafbfbc --- /dev/null +++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h @@ -0,0 +1,43 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2023 Napatech A/S + */ + +#ifndef __FLOW_NTHW_IFR_H__ +#define __FLOW_NTHW_IFR_H__ + +#include + +#include "nthw_fpga_model.h" + +struct ifr_nthw { + uint8_t m_physical_adapter_no; + nthw_fpga_t *mp_fpga; + + nthw_module_t *m_ifr; + + nthw_register_t *mp_rcp_ctrl; + nthw_field_t *mp_rcp_addr; + nthw_field_t *mp_rcp_cnt; + + nthw_register_t *mp_rcp_data; + nthw_field_t *mp_rcp_data_ipv4_en; + nthw_field_t *mp_rcp_data_ipv6_en; + nthw_field_t *mp_rcp_data_mtu; + nthw_field_t *mp_rcp_data_ipv4_df_drop; + nthw_field_t *mp_rcp_data_ipv6_drop; + + nthw_register_t *mp_df_buf_ctrl; + nthw_field_t *mp_df_buf_ctrl_available; + nthw_field_t *mp_df_buf_ctrl_mtu_profile; + + nthw_register_t *mp_df_buf_data; + nthw_field_t *mp_df_buf_data_fifo_dat; +}; + +struct ifr_nthw *ifr_nthw_new(void); +int ifr_nthw_init(struct ifr_nthw *p, nthw_fpga_t *p_fpga, int n_instance); + +int ifr_nthw_setup(struct ifr_nthw *p, int n_idx, int n_idx_cnt); + +#endif /* __FLOW_NTHW_IFR_H__ */ diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_defs.h b/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_defs.h index 01254f7f5d..6b2b5334da 100644 --- a/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_defs.h +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_defs.h @@ -21,6 +21,7 @@ #define MOD_GPIO_PHY (0xbbe81659UL) #define MOD_HIF (0x7815363UL) #define MOD_I2CM (0x93bc7780UL) +#define MOD_IFR (0x9b01f1e6UL) #define MOD_IIC (0x7629cddbUL) #define MOD_KM (0xcfbd9dbeUL) #define MOD_MAC_PCS (0x7abe24c7UL) diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs.h b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs.h index 0c153e21ed..38b222363e 100644 --- a/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs.h +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs.h @@ -20,6 +20,7 @@ #include "nthw_fpga_reg_defs_gpio_phy.h" #include "nthw_fpga_reg_defs_hif.h" #include "nthw_fpga_reg_defs_i2cm.h" +#include "nthw_fpga_reg_defs_ifr.h" #include "nthw_fpga_reg_defs_iic.h" #include "nthw_fpga_reg_defs_km.h" #include "nthw_fpga_reg_defs_mac_pcs.h" diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_ifr.h b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_ifr.h new file mode 100644 index 0000000000..5636e94e07 --- /dev/null +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_ifr.h @@ -0,0 +1,42 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2024 Napatech A/S + */ + +/* + * nthw_fpga_reg_defs_ifr.h + * + * Auto-generated file - do *NOT* edit + * + */ + +#ifndef _NTHW_FPGA_REG_DEFS_IFR_ +#define _NTHW_FPGA_REG_DEFS_IFR_ + +/* IFR */ +#define NTHW_MOD_IFR (0x9b01f1e6UL) +#define IFR_COUNTERS_CTRL (0x92ba13e6UL) +#define IFR_COUNTERS_CTRL_ADR (0xecdeeda8UL) +#define IFR_COUNTERS_CTRL_CNT (0xfcd67479UL) +#define IFR_COUNTERS_DATA (0x3d6b91ffUL) +#define IFR_COUNTERS_DATA_DROP (0x3ee57cc0UL) +#define IFR_DF_BUF_CTRL (0xf60805e4UL) +#define IFR_DF_BUF_CTRL_AVAILABLE (0x158f09c3UL) +#define IFR_DF_BUF_CTRL_MTU_PROFILE (0x7cb4bc5aUL) +#define IFR_DF_BUF_DATA (0x59d987fdUL) +#define IFR_DF_BUF_DATA_FIFO_DAT (0xdbfdf650UL) +#define IFR_RCP_CTRL (0xc6dfc47eUL) +#define IFR_RCP_CTRL_ADR (0x68600d59UL) +#define IFR_RCP_CTRL_CNT (0x78689488UL) +#define IFR_RCP_DATA (0x690e4667UL) +#define IFR_RCP_DATA_IPV4_DF_DROP (0xbfd1ca18UL) +#define IFR_RCP_DATA_IPV4_EN (0xb48ee13aUL) +#define IFR_RCP_DATA_IPV6_DROP (0x4fbf34a2UL) +#define IFR_RCP_DATA_IPV6_EN (0x1e8729b1UL) +#define IFR_RCP_DATA_MTU (0xa436ee13UL) + +#endif /* _NTHW_FPGA_REG_DEFS_IFR_ */ + +/* + * Auto-generated file - do *NOT* edit + */ -- 2.45.0