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 E6E9745BC0; Tue, 29 Oct 2024 19:18:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B3FDE42E48; Tue, 29 Oct 2024 19:18:39 +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 0144440267 for ; Tue, 29 Oct 2024 19:18:37 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2172.outbound.protection.outlook.com [104.47.17.172]) by mx-outbound12-25.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 29 Oct 2024 18:18:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KmHVtvoJsMdAYBC5bWAAp3bp86YfHbF5RwpA+YlOjelEITI6xBELotviC5//laCoQupBPCBu8sm9iqrD1S6bXODYZKim07sbroO82txQFev1XZSh+An8z+YhnpLHUiFjTRJEaNekWLjOTkWAOHxMwXhUZAmUUuRqSlG24iD2+Jy2Rz0nPZHRz9Xn9Qj4IT9Sukiw/YMk3Que0nuJ0lazfYYuIWivOnJR+8RVdnjLsOTSA/ssqyilSTGvCI0DecAAdQSCHv95tdIN9q8ki9ZHCJT3ykPvqaaFwnV4Zy2k14AnN4HCdi3spAMD3CjCjFgH2Uo86iGSnCp2zjcvgvjQMA== 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=VZpAVABdmKPdGyHwzqH2uyeluWX/lhUBqAUDa19BehA=; b=VB5MvY134i8ePkmDGTMpBITPfXL2N6nbMUKdofBI6JwkVnMyJ/Gt+jL0+u83Y/hxDHn3ZWTz2XOe7XhDZpBhFZ/zGhvF2ExxO0nsApnWh8+g5aSmwmf93MwwS5UKbFREPwNdM262ByO8rVzezJSDtThqdbwBH3CqUTpzR8/bC73DstcHKJe/lfm4fqrIm7Bt72LU6jNtNDBjU//N13qLhzjMNAga/+2mcMGR1Il5fSyrBj5q7ZUyQBGyFy+ay7Fiu9BTq7tAycxyqQwm+EJOhE5KfYVyjeUoTr4KBbePfVFUAueNUyD6eecixKet5qKM5vdsienNkS+cxHKABAtAyA== 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=VZpAVABdmKPdGyHwzqH2uyeluWX/lhUBqAUDa19BehA=; b=G74FftcaxDi9JGUBBcR9kpLdfFTB+jx/uOwtXh3GNEdkmCsRjzVWEmeQFdPMjsXLswch2aL8nZipQNOoCeJWUGNMhwAKfnjOdqRa3YidR8rjgK2Bmf0fpz1Iowz2dziIw0gUjA4jsLnYiizPUMoCEptNWIVVNTJLGRcQU2nt8KI= Received: from DUZPR01CA0198.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::29) by DB8P190MB0732.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:fc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Tue, 29 Oct 2024 16:43:42 +0000 Received: from DU2PEPF00028D06.eurprd03.prod.outlook.com (2603:10a6:10:4b6:cafe::a7) by DUZPR01CA0198.outlook.office365.com (2603:10a6:10:4b6::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.29 via Frontend Transport; Tue, 29 Oct 2024 16:43: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 DU2PEPF00028D06.mail.protection.outlook.com (10.167.242.166) with Microsoft SMTP Server id 15.20.8114.16 via Frontend Transport; Tue, 29 Oct 2024 16:43:42 +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, Oleksandr Kolomeiets Subject: [PATCH v4 51/86] net/ntnic: add Tx RPL module registers Date: Tue, 29 Oct 2024 17:41:55 +0100 Message-ID: <20241029164243.1648775-52-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241029164243.1648775-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241029164243.1648775-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D06:EE_|DB8P190MB0732:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: b29c6a22-f03b-48ee-f16c-08dcf838d93b 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?zpXc28tAVY8pJGm7MSMZ0yWuq7ED3ld9o8nzuGfYFoIFt3XXitbFMYX1Eu6x?= =?us-ascii?Q?BQ1jVBeP58sDTdnmnBfJ8zhJ0DlRLGIy0Y5DB3nYlAeXkVbm1P9U2Yip5a1X?= =?us-ascii?Q?4llo+hFOnAT0ebGwvMaFx90mT+NY9+KCz6uOa9ivomWJQbHRxcr5EtPH36wV?= =?us-ascii?Q?rXPRMWug9oydMeD0YQLfsdA03NXisAO36PvvTGAvbqjLFgOlWjt/9OWGAt1n?= =?us-ascii?Q?prycfh1UUUzIsPO0tFtBx0jsV7gnle7NyQwHEvntaFu2nJFRKhp6RoZpo5sP?= =?us-ascii?Q?feXhJ4AVy/jcZWrWZX6ilQ0kJH/rAzxRDUGm3cEVMy6HVG0PVc7I9qNcfack?= =?us-ascii?Q?G0Dbc4R+hgt8HcGYIAYHrBc9jR2SQgvTVdtSpP/LrJ24hrT/d0Ovg4va7LU8?= =?us-ascii?Q?2ySqG7UIKdniIJs0fQkRdBPBc28fKua0BAVPrjnXif5qDvppXfvuiSh2JRzz?= =?us-ascii?Q?qdpudvyVWdqgYSyNktTItqKLak7pPqU4xYnqLK7ajSeOuDbctjn+m+EHrFqa?= =?us-ascii?Q?NSN85ITDgzROa96mblCBb5F8ky4JBjrLqDOsrq6Rz08OhyA29ZCaNA6F8SZY?= =?us-ascii?Q?M7tcXlq+8/rSYyttTzD1LYDt+kgFSdVeNUa17ZuKOB13G2LTXXZNhmB8y44A?= =?us-ascii?Q?1CX8E2T/jG0mEBVXSRcjZryXPkewhXILv8n3KyLs05sPG0OpgONE/I752m5e?= =?us-ascii?Q?DiLcvVXsuRmi8QmnidQ8V6CPFRDxq1ij9DBHvsOIne9IM7pfxNcQq6xVGGg5?= =?us-ascii?Q?3fhgZLdxwclE6hpzZzaNp8x7XauhXlQQ5m6r6ENSdPbKiGXQHRJY2QW9dImP?= =?us-ascii?Q?RhKTj75AhUHwBNRuEYPg/ygMiaskUN6Veu8GQIOU2HCwxfHvBeY4ZR4N/LbA?= =?us-ascii?Q?0kn+75C+jcH45sUqGef4MYdrbsY2vyn+3TWVL1ZSYLRhdlMluo8e2hWbTxKm?= =?us-ascii?Q?ql8YceDMuKSBw6VPnKwxuFWTR5z04P1775Wnhm0x/DF9pMSifraihNUMVQcU?= =?us-ascii?Q?QMwS/ir358b0loEfk5LCPyZUSHF1HdJwGNW+ccNx/I2yL40PNfhifVcCPeI9?= =?us-ascii?Q?o5L9zJrQ/+LQqQ7Sm6YecGLhPcLnR13uB+3lqohFkYmZbL0Mjf7U8qzbCXZO?= =?us-ascii?Q?dBmkLu1rESsNwpvdGe5BcLd61u6QACvlFN5zJM+9iZTb3hkuv3eQRy40Z7IX?= =?us-ascii?Q?qS/Ph9p1fg9R1PNTkgxlbiZCz4LJgEB2/d4w7oYWO+eNrrQdDjruVJu38GNH?= =?us-ascii?Q?43pWJ0hPqAjEQdAVMiVTI+0hvpLV9jkJhW45urR6h9+XeIyFiQpo1wYEwDk2?= =?us-ascii?Q?jockfeuS7l9GizuIiFY/PG9g3UKOfA4FFXIATLZ4yOzf5UN49xmGJ5eu0Fny?= =?us-ascii?Q?7rYkVvJg6MjR2j5N8PF10HWW/fovvgw+Myd3tfRTaWwXaSghtQ=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)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: jXE15oE3F4OMuxDnMWgmXO2eIMrc7ajG573Wy7IXJzX7lGuLCHVjBqDPQ/99o8oqS+Obsn/QxEbPNN9lSIYIiTK3ffXXFUnBPNDYIRqwxr/66vOxS9sEbmTYOBJqb9+sf/SC+5hUJVqBssj0W0o0NWsOmFyruUU9en5oQsD+AE+keLkiTLv9TJfsR/DNdUvDa1wORqIJ33L0zTrAmq2MtHrWXBuEGn2afd3WxjQHRc5mQR065djLjcdsTIktFW6lJyYPsMc6JZEo0grIEqEzOzGGr9hIwjcBs+X0Ad/8KO/r3j5bgN6Uyw0TWoAgriGmsdRmqJlph64yr3HDUyuVemmQAR1mDtLvC02g/RlYxT2qLqT9lANasN1QATt0oIkMxix7xsGL/5crd/RjLOjfCyNXYA1WpiqnutrfHHalaAgcsuFIDe7ynUzW4vOn0nBnswnHWsmblL7VChQKpcBNaovw0ob8Uqi5j0P1l7tPX5u7taIve7Yiw1J12qAsEd/je1AvPrV8qdLsbfNWMfN/VadYLTGQhCT/z9y1bFlOYLvrxvmrOglgLn+AlHFIek0kPSU3HxuWAlV0dFXXy0ZBn8uED6z0AqpEn8dXUYId+QLIsTLvqy/98/SBG+8lq9R9syCnbmJ3TlUmibV1oiBwyFwzRGgFipuTstwfbc+BKbs= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:43:42.3240 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b29c6a22-f03b-48ee-f16c-08dcf838d93b 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: DU2PEPF00028D06.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8P190MB0732 X-OriginatorOrg: napatech.com X-BESS-ID: 1730225914-303097-12767-33868-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.172 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKViaGxgZAVgZQMCnR0jAlMcUgJc Ui1cDCyMwyJc3YKNnQxDTF0jzNODlZqTYWAH3iTVFBAAAA X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.260065 [from cloudscan14-117.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 TX Replacer module can replace a range of bytes in a packet. The replacing data is stored in a table in the module and will often contain tunnel data. Signed-off-by: Oleksandr Kolomeiets --- .../supported/nthw_fpga_9563_055_049_0000.c | 41 ++++++++++++++++++- .../ntnic/nthw/supported/nthw_fpga_mod_defs.h | 3 +- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_049_0000.c b/drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_049_0000.c index c8841b1dc2..a3d9f94fc6 100644 --- a/drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_049_0000.c +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_049_0000.c @@ -2355,6 +2355,44 @@ static nthw_fpga_register_init_s rmc_registers[] = { { RMC_STATUS, 1, 17, NTHW_FPGA_REG_TYPE_RO, 0, 2, rmc_status_fields }, }; +static nthw_fpga_field_init_s rpl_ext_ctrl_fields[] = { + { RPL_EXT_CTRL_ADR, 10, 0, 0x0000 }, + { RPL_EXT_CTRL_CNT, 16, 16, 0x0000 }, +}; + +static nthw_fpga_field_init_s rpl_ext_data_fields[] = { + { RPL_EXT_DATA_RPL_PTR, 12, 0, 0x0000 }, +}; + +static nthw_fpga_field_init_s rpl_rcp_ctrl_fields[] = { + { RPL_RCP_CTRL_ADR, 4, 0, 0x0000 }, + { RPL_RCP_CTRL_CNT, 16, 16, 0x0000 }, +}; + +static nthw_fpga_field_init_s rpl_rcp_data_fields[] = { + { RPL_RCP_DATA_DYN, 5, 0, 0x0000 }, { RPL_RCP_DATA_ETH_TYPE_WR, 1, 36, 0x0000 }, + { RPL_RCP_DATA_EXT_PRIO, 1, 35, 0x0000 }, { RPL_RCP_DATA_LEN, 8, 15, 0x0000 }, + { RPL_RCP_DATA_OFS, 10, 5, 0x0000 }, { RPL_RCP_DATA_RPL_PTR, 12, 23, 0x0000 }, +}; + +static nthw_fpga_field_init_s rpl_rpl_ctrl_fields[] = { + { RPL_RPL_CTRL_ADR, 12, 0, 0x0000 }, + { RPL_RPL_CTRL_CNT, 16, 16, 0x0000 }, +}; + +static nthw_fpga_field_init_s rpl_rpl_data_fields[] = { + { RPL_RPL_DATA_VALUE, 128, 0, 0x0000 }, +}; + +static nthw_fpga_register_init_s rpl_registers[] = { + { RPL_EXT_CTRL, 2, 32, NTHW_FPGA_REG_TYPE_WO, 0, 2, rpl_ext_ctrl_fields }, + { RPL_EXT_DATA, 3, 12, NTHW_FPGA_REG_TYPE_WO, 0, 1, rpl_ext_data_fields }, + { RPL_RCP_CTRL, 0, 32, NTHW_FPGA_REG_TYPE_WO, 0, 2, rpl_rcp_ctrl_fields }, + { RPL_RCP_DATA, 1, 37, NTHW_FPGA_REG_TYPE_WO, 0, 6, rpl_rcp_data_fields }, + { RPL_RPL_CTRL, 4, 32, NTHW_FPGA_REG_TYPE_WO, 0, 2, rpl_rpl_ctrl_fields }, + { RPL_RPL_DATA, 5, 128, NTHW_FPGA_REG_TYPE_WO, 0, 1, rpl_rpl_data_fields }, +}; + static nthw_fpga_field_init_s rpp_lr_ifr_rcp_ctrl_fields[] = { { RPP_LR_IFR_RCP_CTRL_ADR, 4, 0, 0x0000 }, { RPP_LR_IFR_RCP_CTRL_CNT, 16, 16, 0x0000 }, @@ -2498,6 +2536,7 @@ static nthw_fpga_module_init_s fpga_modules[] = { { MOD_SLC_LR, 0, MOD_SLC, 0, 2, NTHW_FPGA_BUS_TYPE_RAB1, 2048, 2, slc_registers }, { MOD_TX_CPY, 0, MOD_CPY, 0, 4, NTHW_FPGA_BUS_TYPE_RAB1, 9216, 26, cpy_registers }, { MOD_TX_INS, 0, MOD_INS, 0, 2, NTHW_FPGA_BUS_TYPE_RAB1, 8704, 2, ins_registers }, + { MOD_TX_RPL, 0, MOD_RPL, 0, 4, NTHW_FPGA_BUS_TYPE_RAB1, 8960, 6, rpl_registers }, }; static nthw_fpga_prod_param_s product_parameters[] = { @@ -2656,5 +2695,5 @@ static nthw_fpga_prod_param_s product_parameters[] = { }; nthw_fpga_prod_init_s nthw_fpga_9563_055_049_0000 = { - 200, 9563, 55, 49, 0, 0, 1726740521, 152, product_parameters, 34, fpga_modules, + 200, 9563, 55, 49, 0, 0, 1726740521, 152, product_parameters, 35, fpga_modules, }; 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 8c0c727e16..2b059d98ff 100644 --- a/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_defs.h +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_defs.h @@ -40,6 +40,7 @@ #define MOD_QSL (0x448ed859UL) #define MOD_RAC (0xae830b42UL) #define MOD_RMC (0x236444eUL) +#define MOD_RPL (0x6de535c3UL) #define MOD_RPP_LR (0xba7f945cUL) #define MOD_RST9563 (0x385d6d1dUL) #define MOD_SDC (0xd2369530UL) @@ -48,7 +49,7 @@ #define MOD_TX_CPY (0x60acf217UL) #define MOD_TX_INS (0x59afa100UL) #define MOD_TX_RPL (0x1095dfbbUL) -#define MOD_IDX_COUNT (35) +#define MOD_IDX_COUNT (36) /* aliases - only aliases go below this point */ #endif /* _NTHW_FPGA_MOD_DEFS_H_ */ -- 2.45.0