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 7C16745B04; Thu, 10 Oct 2024 16:17:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8202B40E15; Thu, 10 Oct 2024 16:15:04 +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 89A9C40B95 for ; Thu, 10 Oct 2024 16:14:51 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2109.outbound.protection.outlook.com [104.47.18.109]) 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:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LXPouDEVKisEuCGXR2jZYiW3caCMlViiqfBilYICs+IUcBEBcchTQXqtp1j5CY0U2NM7Fe6/52Yf0eUjD1BnhqIHOPAmyXSyNFrjYMgrZfn3JyoxMrgZeUMJZjoxzecQm05IEJNNqMgK28TsbuEXiKagbzOkjVJsDi7LrUHSWsvWbEkaCUK7adklRlfUUacSx/4+jbab6xglSXFSgBscQGE1EJl9BaKT5Izy/mXUL4Y+oVZxz1263zTdE+W5iLvyqNudRDWmeVzjjmpEMwxzxF04J5RsRzUMaHQmaO3cfoxVi6CyDAlz848H6wWX0dVfVQF4VTtuiHtRHT3nz4QOCA== 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=ri5p+YYShH2M+6U4+9ptQQ1P8fkZ8pJzXC04AuGO084=; b=oA/OFvGTKG5OIL+2+40AUwi/6d5O/vOuoYHppwm25MUxaYIGGNdu2qLV7gaJzInjoCJuDb1h9keXPmVgu0XgF63o8GvKQkDUZ1MllYGlubXR8Jq9Zj6cjQBzINr+fDteMzzxtRPmKWfgcDsOl6jBbwVrmlMiH/Gt2ngKt0nycDGAkcu2wbkd/8NBn4f0cC2QdxTiSm0SKU4VFpBekCpJmb3209D5/PMKI1ixIGZZjg6XZqyAQpi2SOgwHIGLEOo5e6TVMZjY0jxGYRGoDrwxYbc0MUlQGFisy6XQ9lf+VPORlUgx6qohk0afNOMdPHu9/BXiKFWFWzRRECXkznpkLg== 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=ri5p+YYShH2M+6U4+9ptQQ1P8fkZ8pJzXC04AuGO084=; b=pnG8Hu6FzkYYEMBhe5qU6lOWizZkP07wVcHpWsF7mDgXFuGJblzV+sfZS1HSy70KXUTQoO63VBbw5YFQp2kKZ78g0f3gG3swHud/M6MuJw7l4TDTOV+++sUNAv617g6zSXRX8BtZOOIpMcGwhMBs7yJqaM+x+E/H2BAkCE04W9w= Received: from DU2PR04CA0063.eurprd04.prod.outlook.com (2603:10a6:10:232::8) by PA4P190MB1040.EURP190.PROD.OUTLOOK.COM (2603:10a6:102:101::11) 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:43 +0000 Received: from DU6PEPF0000B61B.eurprd02.prod.outlook.com (2603:10a6:10:232:cafe::26) by DU2PR04CA0063.outlook.office365.com (2603:10a6:10:232::8) 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:42 +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:41 +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 20/50] net/ntnic: add RPP local retransmit (RPP LR) flow module Date: Thu, 10 Oct 2024 16:13:35 +0200 Message-ID: <20241010141416.4063591-21-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_|PA4P190MB1040:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: b01e3590-fbcb-498e-fa14-08dce935e27a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?aT9cd6fDxHOq1zgNJ/WEotzDwYYXR7zF4rN7zHZJQmKPsXbgV43NVuCpJMYO?= =?us-ascii?Q?LJWo6y8dP2IxnjXmLsyHjNN5dIOI1r6LXUmY8M5ZTQXZ0sb47XNH1eVX5NSK?= =?us-ascii?Q?/7OxzGtp9eCk0OVaQ0CxLKLdSEnSgAyuyW2JP89adoGz7JFGTmZYBTHPCFzh?= =?us-ascii?Q?cFISc/KRB48GB5zU1G8jjq/z0/10YX50caTgN8VaWzZgYXGmSl+eL+YZiCyI?= =?us-ascii?Q?gbbzTE1xua1nOhODVHLKCBzvZSwDG8jPTOvsrnaMC5zTxkDaCZCZTjF77y2s?= =?us-ascii?Q?/RZFEuS56tlR4oLSKBFGUw608RpJ4m1PjzbB5KQJEmhPd3VUYiiIRRJWa52z?= =?us-ascii?Q?KgdW7XDA+Y5ZvpO2qSiqjlTOQySp34rs8S0li6t3ToDW6lWt9AfXZkSC8qOg?= =?us-ascii?Q?Sd06pQtNgzhiFe7qu3Ja6wU0uKlOiGEmQPW2QwXdpwIesPD75JBC9Jf+H3r0?= =?us-ascii?Q?cU42SCiYY9f7QL4c++9sP60EBLIh7prwaDo6LxqWEKgjn/K00coquRJ3YpKE?= =?us-ascii?Q?OHd5xy6gxvyhnfZqFUAYHq9fvhUJ0NZPh8JjxdOIurVeBp1VIeNAQaht7kmE?= =?us-ascii?Q?9wkEGNLKBqylHjobFkrCX9iFgLNDBgzLcYU3DCU+8saWwWorSz8Qg6jLeLRu?= =?us-ascii?Q?AKBjMcfB5Zi0VG1Ed5HEtNL7i8OJ5eNt1O0V7hB0zH0QlBo942bNcpZWUE38?= =?us-ascii?Q?uvCUfWucSY8OS8/+lvmEXPrC9zFeShHRW4Wn7vGSrTqvHhIMan11zKiAX3Tp?= =?us-ascii?Q?K/yd8M3bNKA/AUv7RxGDUW8tRJt1tNny07Ip13s/y/lYehbWuz5kk5eIf2gf?= =?us-ascii?Q?apjoZmPS+pwLP7QDgqMSvxu1Fh80lhs/ZFD8P9/6ccPqsGRRBd0FrWVbCI5b?= =?us-ascii?Q?Wf7qll9UCGMP99uo0UmafXh51YgyfWEURYtdpPvn7+9z8Fw+5DzYZ4W0WIts?= =?us-ascii?Q?tLDTmtelWJrlnYzptgtlee+oUigXAdIAjC5hNwzKXblmwvwRjKZHlQoxA6Xr?= =?us-ascii?Q?XkzgKStmARquTvo5bpvCuHMr/Gx4wqglGr0dzSBYm3TkRiSgmQBelk2RBQPH?= =?us-ascii?Q?7siTZFZKOIrXUIi+qhjmc2VSqKzDYCASqHFjeimKy8OcAgcWJH4xJDHtVZBt?= =?us-ascii?Q?aHgLdw4eZAymg1AZ0+OJxd/IHKAgyy9R5FyM+a1DJHtLNQ2cBVDahq/Silys?= =?us-ascii?Q?IkEIVLS1ULumEpCbQaD1pSU4MOCrtO16sCgsVt9cn0dYD/IgnOq65oezl4Ek?= =?us-ascii?Q?99d6hKNBEsGHv8ab/Dpjmkr30PfTgc77HzvnwjGZQjrpWrumKfytBCFwiWb9?= =?us-ascii?Q?shSob/ykbt4ie2iqBiJQUD5FY1AWfhXo8Ct8ivAH5MuUOjcHjy0SzEAF+SVz?= =?us-ascii?Q?nTNhQQUNRqd6LfgIHbLHLLooThS0?= 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)(82310400026)(36860700013)(1800799024); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: w/4YomXimcYvNRugXY7o7ZZcJfs9FQV3lzc83oPxqzBLEoe1dTvoqehpmRyluhhFWA2XZv8TbCaZ3Tp1hvBxywuFrKxrh1R+j+cgAWOjrs4awzZuF0UDCkAPgciyp7YB7oft7yjObDqtWh0Rn6/7W2OFqFUPR9luYdLHUoXuj40pt7X+cLx9XHbP/3QuRV2Xv7L20Io7QBoGZpFOkaECfiQccXpVcL+w3qtUWbQ/thiUyLk1q7SdQcr/GdV11SYIKhS0el9hEt7VIIrnkPFlrgWm4OXaMb0k24RMf5Lh9pgK9x70cVvDegWY3A306WVl8RqP+fBWD5ciBr66+fPGNJT2sohVGJ6bjm5kuZpbPWNQlaagGALVdODNvPVPS6fwdt96pQminGJWY9owxgEcofUZw9SPABUSf3VKDBaeIeIgR/jPeTR7zC1+CV++RbGOu9yv1RPZi+Asp1iLj23DpTTF2ylGNXafWHRkkMRpZIwEq0WX3fCnYacRaYButch7EFIJAQ6YC6GzaYAwRlvITfjEjoVPy1kbYuCZDTv6D7zSuGbveh8XArJ/XV8Ur02Q0uLfjU5Vi5dxR3CkIVsqxxhyGPb6Z/YtY+6PWukmVZewBJ19FbJrk6nm3hplDzN1CKA5e23dX6uy2IzNoxwHDHOqTM4Q1VCO3kHcFTXYoCs= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2024 14:14:41.9360 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b01e3590-fbcb-498e-fa14-08dce935e27a 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: PA4P190MB1040 X-BESS-ID: 1728569686-305168-12641-25862-2 X-BESS-VER: 2019.1_20241004.2057 X-BESS-Apparent-Source-IP: 104.47.18.109 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVpaWBpZAVgZQ0DzR2CA51dzMMM nSwtLYzNTE2CTZ2CzZ3NDExMI0NdlQqTYWAFMWwJNBAAAA X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259630 [from cloudscan11-19.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 From: Oleksandr Kolomeiets The RX Packet Process for Local Retransmit module can add bytes in the FPGA TX pipeline, which is needed when the packet increases in size. Note, this makes room for packet expansion, but the actual expansion is done by the modules. 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 | 13 ++++ .../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c | 76 +++++++++++++++++++ .../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h | 44 +++++++++++ .../ntnic/nthw/supported/nthw_fpga_mod_defs.h | 1 + .../ntnic/nthw/supported/nthw_fpga_reg_defs.h | 1 + .../supported/nthw_fpga_reg_defs_rpp_lr.h | 37 +++++++++ 7 files changed, 173 insertions(+) create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_rpp_lr.h diff --git a/drivers/net/ntnic/meson.build b/drivers/net/ntnic/meson.build index 552cbc30bf..2dfb0d0627 100644 --- a/drivers/net/ntnic/meson.build +++ b/drivers/net/ntnic/meson.build @@ -55,6 +55,7 @@ sources = files( 'nthw/flow_filter/flow_nthw_km.c', 'nthw/flow_filter/flow_nthw_pdb.c', 'nthw/flow_filter/flow_nthw_qsl.c', + 'nthw/flow_filter/flow_nthw_rpp_lr.c', 'nthw/flow_filter/flow_nthw_slc_lr.c', 'nthw/model/nthw_fpga_model.c', 'nthw/nthw_platform.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 c99f4a81df..20f9799774 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 @@ -15,6 +15,7 @@ #include "flow_nthw_qsl.h" #include "flow_nthw_slc_lr.h" #include "flow_nthw_pdb.h" +#include "flow_nthw_rpp_lr.h" #include "ntnic_mod_reg.h" #include "nthw_fpga_model.h" #include "hw_mod_backend.h" @@ -38,6 +39,7 @@ static struct backend_dev_s { struct slc_lr_nthw *p_slc_lr_nthw; struct pdb_nthw *p_pdb_nthw; struct hfu_nthw *p_hfu_nthw; /* TPE module */ + struct rpp_lr_nthw *p_rpp_lr_nthw; /* TPE module */ struct ifr_nthw *p_ifr_nthw; /* TPE module */ } be_devs[MAX_PHYS_ADAPTERS]; @@ -1795,6 +1797,16 @@ const struct flow_api_backend_ops *bin_flow_backend_init(nthw_fpga_t *p_fpga, vo be_devs[physical_adapter_no].p_hfu_nthw = NULL; } + /* Init nthw RPP_LR */ + if (rpp_lr_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) { + struct rpp_lr_nthw *ptr = rpp_lr_nthw_new(); + rpp_lr_nthw_init(ptr, p_fpga, physical_adapter_no); + be_devs[physical_adapter_no].p_rpp_lr_nthw = ptr; + + } else { + be_devs[physical_adapter_no].p_rpp_lr_nthw = NULL; + } + be_devs[physical_adapter_no].adapter_no = physical_adapter_no; *dev = (void *)&be_devs[physical_adapter_no]; @@ -1813,6 +1825,7 @@ static void bin_flow_backend_done(void *dev) slc_lr_nthw_delete(be_dev->p_slc_lr_nthw); pdb_nthw_delete(be_dev->p_pdb_nthw); hfu_nthw_delete(be_dev->p_hfu_nthw); + rpp_lr_nthw_delete(be_dev->p_rpp_lr_nthw); } static const struct flow_backend_ops ops = { diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c new file mode 100644 index 0000000000..a3a448311f --- /dev/null +++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c @@ -0,0 +1,76 @@ +/* + * 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_rpp_lr.h" + +struct rpp_lr_nthw *rpp_lr_nthw_new(void) +{ + struct rpp_lr_nthw *p = malloc(sizeof(struct rpp_lr_nthw)); + + if (p) + (void)memset(p, 0, sizeof(*p)); + + return p; +} + +void rpp_lr_nthw_delete(struct rpp_lr_nthw *p) +{ + if (p) { + (void)memset(p, 0, sizeof(*p)); + free(p); + } +} + +int rpp_lr_nthw_init(struct rpp_lr_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_RPP_LR, 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: RppLr %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_rpp_lr = nthw_fpga_query_module(p_fpga, MOD_RPP_LR, n_instance); + + p->mp_rcp_ctrl = nthw_module_get_register(p->m_rpp_lr, RPP_LR_RCP_CTRL); + p->mp_rcp_addr = nthw_register_get_field(p->mp_rcp_ctrl, RPP_LR_RCP_CTRL_ADR); + p->mp_rcp_cnt = nthw_register_get_field(p->mp_rcp_ctrl, RPP_LR_RCP_CTRL_CNT); + p->mp_rcp_data = nthw_module_get_register(p->m_rpp_lr, RPP_LR_RCP_DATA); + p->mp_rcp_data_exp = nthw_register_get_field(p->mp_rcp_data, RPP_LR_RCP_DATA_EXP); + + p->mp_ifr_rcp_ctrl = nthw_module_query_register(p->m_rpp_lr, RPP_LR_IFR_RCP_CTRL); + p->mp_ifr_rcp_addr = + nthw_register_query_field(p->mp_ifr_rcp_ctrl, RPP_LR_IFR_RCP_CTRL_ADR); + p->mp_ifr_rcp_cnt = nthw_register_query_field(p->mp_ifr_rcp_ctrl, RPP_LR_IFR_RCP_CTRL_CNT); + p->mp_ifr_rcp_data = nthw_module_query_register(p->m_rpp_lr, RPP_LR_IFR_RCP_DATA); + p->mp_ifr_rcp_data_ipv4_en = + nthw_register_query_field(p->mp_ifr_rcp_data, RPP_LR_IFR_RCP_DATA_IPV4_EN); + p->mp_ifr_rcp_data_ipv6_en = + nthw_register_query_field(p->mp_ifr_rcp_data, RPP_LR_IFR_RCP_DATA_IPV6_EN); + p->mp_ifr_rcp_data_mtu = + nthw_register_query_field(p->mp_ifr_rcp_data, RPP_LR_IFR_RCP_DATA_MTU); + p->mp_ifr_rcp_data_ipv4_df_drop = + nthw_register_query_field(p->mp_ifr_rcp_data, RPP_LR_IFR_RCP_DATA_IPV4_DF_DROP); + p->mp_ifr_rcp_data_ipv6_drop = + nthw_register_query_field(p->mp_ifr_rcp_data, RPP_LR_IFR_RCP_DATA_IPV6_DROP); + + return 0; +} diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h new file mode 100644 index 0000000000..509e46fc48 --- /dev/null +++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h @@ -0,0 +1,44 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2023 Napatech A/S + */ + +#ifndef __FLOW_NTHW_RPP_LR_H__ +#define __FLOW_NTHW_RPP_LR_H__ + +#include + +#include "nthw_fpga_model.h" + +struct rpp_lr_nthw { + uint8_t m_physical_adapter_no; + nthw_fpga_t *mp_fpga; + + nthw_module_t *m_rpp_lr; + + 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_exp; + + nthw_register_t *mp_ifr_rcp_ctrl; + nthw_field_t *mp_ifr_rcp_addr; + nthw_field_t *mp_ifr_rcp_cnt; + + nthw_register_t *mp_ifr_rcp_data; + nthw_field_t *mp_ifr_rcp_data_ipv4_en; + nthw_field_t *mp_ifr_rcp_data_ipv6_en; + nthw_field_t *mp_ifr_rcp_data_mtu; + nthw_field_t *mp_ifr_rcp_data_ipv4_df_drop; + nthw_field_t *mp_ifr_rcp_data_ipv6_drop; +}; + +struct rpp_lr_nthw *rpp_lr_nthw_new(void); +void rpp_lr_nthw_delete(struct rpp_lr_nthw *p); +int rpp_lr_nthw_init(struct rpp_lr_nthw *p, nthw_fpga_t *p_fpga, int n_instance); + +int rpp_lr_nthw_setup(struct rpp_lr_nthw *p, int n_idx, int n_idx_cnt); + +#endif /* __FLOW_NTHW_RPP_LR_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 2d53dfdf98..f1d055a36e 100644 --- a/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_defs.h +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_defs.h @@ -33,6 +33,7 @@ #define MOD_PDB (0xa7771bffUL) #define MOD_QSL (0x448ed859UL) #define MOD_RAC (0xae830b42UL) +#define MOD_RPP_LR (0xba7f945cUL) #define MOD_RST9563 (0x385d6d1dUL) #define MOD_SDC (0xd2369530UL) #define MOD_SLC_LR (0x969fc50bUL) 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 c49913036e..c39901ce39 100644 --- a/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs.h +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs.h @@ -32,6 +32,7 @@ #include "nthw_fpga_reg_defs_pdb.h" #include "nthw_fpga_reg_defs_qsl.h" #include "nthw_fpga_reg_defs_rac.h" +#include "nthw_fpga_reg_defs_rpp_lr.h" #include "nthw_fpga_reg_defs_rst9563.h" #include "nthw_fpga_reg_defs_sdc.h" #include "nthw_fpga_reg_defs_slc.h" diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_rpp_lr.h b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_rpp_lr.h new file mode 100644 index 0000000000..f84cdf5939 --- /dev/null +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_rpp_lr.h @@ -0,0 +1,37 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2024 Napatech A/S + */ + +/* + * nthw_fpga_reg_defs_rpp_lr.h + * + * Auto-generated file - do *NOT* edit + * + */ + +#ifndef _NTHW_FPGA_REG_DEFS_RPP_LR_ +#define _NTHW_FPGA_REG_DEFS_RPP_LR_ + +/* RPP_LR */ +#define NTHW_MOD_RPP_LR (0xba7f945cUL) +#define RPP_LR_IFR_RCP_CTRL (0xce88594UL) +#define RPP_LR_IFR_RCP_CTRL_ADR (0x4b4cc068UL) +#define RPP_LR_IFR_RCP_CTRL_CNT (0x5b4459b9UL) +#define RPP_LR_IFR_RCP_DATA (0xa339078dUL) +#define RPP_LR_IFR_RCP_DATA_IPV4_DF_DROP (0xee1d681fUL) +#define RPP_LR_IFR_RCP_DATA_IPV4_EN (0xfe386131UL) +#define RPP_LR_IFR_RCP_DATA_IPV6_DROP (0x41f324ffUL) +#define RPP_LR_IFR_RCP_DATA_IPV6_EN (0x5431a9baUL) +#define RPP_LR_IFR_RCP_DATA_MTU (0x871a2322UL) +#define RPP_LR_RCP_CTRL (0xf3395d47UL) +#define RPP_LR_RCP_CTRL_ADR (0x4916a944UL) +#define RPP_LR_RCP_CTRL_CNT (0x591e3095UL) +#define RPP_LR_RCP_DATA (0x5ce8df5eUL) +#define RPP_LR_RCP_DATA_EXP (0x578ca035UL) + +#endif /* _NTHW_FPGA_REG_DEFS_RPP_LR_ */ + +/* + * Auto-generated file - do *NOT* edit + */ -- 2.45.0