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 5B0AF45A68; Tue, 22 Oct 2024 20:30:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4642C4029B; Tue, 22 Oct 2024 20:30:08 +0200 (CEST) Received: from egress-ip42a.ess.de.barracuda.com (egress-ip42a.ess.de.barracuda.com [18.185.115.201]) by mails.dpdk.org (Postfix) with ESMTP id 5411540272 for ; Tue, 22 Oct 2024 20:30:05 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2111.outbound.protection.outlook.com [104.47.17.111]) by mx-outbound15-54.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 22 Oct 2024 18:30:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=u+S1q7ffjL5/dkRceZ8xop72RSuLTRXQye8X7Ux6f8N6jSgToxb9WtygnavklROgEVG5yuShEnUwXNN+e4CeGkSysH5nCdOq7lJ/kewqSR8HI3woRPT88A709zZvK624pifqUrwQ8b3P/9C93QrIlvc1uy+h86ofXsQlkY0BFIEJMI3s7VAr78fa7GdeqMX3iLls0BCGNETUs1qOqDEXnuHdzoOCRHaX8gzlnxL6gxFFA8wiELC4M7q2OH2YrhAcPrDRSYeEk/VSTyhZKmj8NU2EduPsgv5iVr2nZta/Xj7ua6mHFcoaR/BArAYOCYVoj7Vr4///CGCdI4aQGHE9nw== 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=TdhyGAeaAX8CSd4cKBPMGIlVaiqgLLLe6b1+LabwCZVy2+nd5Q7Z4ViU7yEIRpoc3pZ0CWwtiWH1l9uYM6YUX1WlPUJPI/dvcar0BCiC6D8QWATQewUNpMuvDjNo/Ieg3Ye/JmjaEDKGQ4p6a6uYyBaF6j1b+KPYpjy0ZMrybkdSlROLAw6EBMX3GMHM5gwJ41oemcU74KzLWrCYIypZOx+d50YRKGy0uD5ZyPrhDUpDpIgko39c4wPQ6M6GCeugDznrugAj6or5JcEK117UAzTZS+pFH8TUYbtGG9ObadLXrvER+llsnQS4Cq5tYIgcZHHBP48uOm/wrW8DMbZaTw== 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=ZImiDWkltJg51AHin1il+CCzYfzjLzD4zjPktQXcM7MtMmblMl1e4VYluGV5x5aH1CBqGzYWDVLKH9Zb/G9mKQAS6m0bpiemLTnHa0MoRAh3tJtyAiNeQwvOmybEX1pk4GAuPx3PQfRW6nQ/5qfyBmjdyMINUkGbBaVHG/rLcNw= Received: from DB9PR06CA0005.eurprd06.prod.outlook.com (2603:10a6:10:1db::10) by GV1P190MB2227.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:204::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Tue, 22 Oct 2024 16:56:53 +0000 Received: from DU2PEPF0001E9C2.eurprd03.prod.outlook.com (2603:10a6:10:1db:cafe::d3) by DB9PR06CA0005.outlook.office365.com (2603:10a6:10:1db::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Tue, 22 Oct 2024 16:56:52 +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 DU2PEPF0001E9C2.mail.protection.outlook.com (10.167.8.71) with Microsoft SMTP Server id 15.20.8093.14 via Frontend Transport; Tue, 22 Oct 2024 16:56:52 +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 v2 51/73] net/ntnic: add Tx RPL module Date: Tue, 22 Oct 2024 18:55:08 +0200 Message-ID: <20241022165541.3186140-52-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241022165541.3186140-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241022165541.3186140-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF0001E9C2:EE_|GV1P190MB2227:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 70288847-5a1f-480c-f38e-08dcf2ba8754 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?2zAcOY/4Fd/5JS7iXFy8bOdMTGWlH613s/i85i2jzCDwrWkTQXTrqNCQzpeo?= =?us-ascii?Q?JMnCf4Vsun560wTRKjyS3sY+YnG/fyBUDmXIu+MTpNiI/34JBS8Y+IoDwwb9?= =?us-ascii?Q?XZB+HdY/KgbVt6//DDzBd8MGw5OAsSES3LeKrO0MeMNuQHA7eQVvdJKeG9EK?= =?us-ascii?Q?xyAXMI4cp3SCn1fa/g38F5aahrZoc/M+KARm68zYIemToVs0inxlrfeOqL2B?= =?us-ascii?Q?apcqOnuFStsRU+YITIKLhBU3cIfMvN0ejAllKRmGXsjokeHA7r3aGEqk53/C?= =?us-ascii?Q?oS9bh3sRndOe2m/uQTx95cjDqPs3weZ01P30TZXglqXexvtjkvvosaeXPVAs?= =?us-ascii?Q?B92O+3VhSyzVEgr3ToLXmFrp7WK0K27PGhryb5sytIeAmzD/GmdWgoB4ogr2?= =?us-ascii?Q?5kVqR8kQpp5tOM27IaWmw2bWWSb2AY1VdqD52VERIbec9KFHXBgwyzob36cV?= =?us-ascii?Q?6S9Td0gd1EhAO/7Mw62sr61zHxUGHNxWvQper+eT6L2dFaU8+W101gVm9lBC?= =?us-ascii?Q?3AIlm/NeYSMkoTZoEm2Ko49RE1dYo6Em76yc1ZZsUf96FgBBbnFawr4O7z51?= =?us-ascii?Q?hKSdMwsKRvlSKlm7zq3m7NgsT11gYSvWM9oziqxIORM/1vZBHIrW0uU/SDHA?= =?us-ascii?Q?Shz4VCM2SfiNLgXyfiKImiimgBEAWN56gJRjQEzKu/diBBLu95k88sztQWnp?= =?us-ascii?Q?Wl9Ifmo4tay/omdc3LTZ2H0f9FrJkWO2+A4sVjLV/gAGa+k1CCMvgWnbIicT?= =?us-ascii?Q?hmfUAWXHFqxYMdIMXd0nz5rAjQOpVIJnkrr3hoOCugDd9EwjRmfFoYKeQPiG?= =?us-ascii?Q?YP2kgcB/azt5HWAg1IM6cq/27npHTJd8DGPr+kUckBob5q2qCkvKBD+TKTOi?= =?us-ascii?Q?X7MStv2d8sOWbS54r+HLLvING4AhsjxEBEOswZ8LXboxkLl3YhoFnKncTPr1?= =?us-ascii?Q?PsLrkiUtI7P5e4phXQPtJt4hHPugYH6Ubz6HzLioM8YVF8lpTwWRAmOfnyjV?= =?us-ascii?Q?n2jQNxmhh19LrD10geLvE7r2wzJDCqT1/ThF1zGMC2Q2hQ/N5eoulcqDuIgZ?= =?us-ascii?Q?JcxgiwkYDLmC07f2Uv4xwE2AJJ+GuDGYgN9rqFj6szls5ynpSEZBcOgBgTgm?= =?us-ascii?Q?FXw5TgV5dg2BF0ZneYk2mbeG9zlojPVtTbJ0thepBn1gAaBsvBgXriTaegmV?= =?us-ascii?Q?etXM6txsp6n8i8gb0ScpB8Pi4rTS35V47QI7LQf0V9cppgk6bgloVcr6Nast?= =?us-ascii?Q?bW1bUYmsbcJRVfnOJ7cl2uxBwv0mHyyGYKuskfC9J4L1hsNLM6JRSCU9tSC5?= =?us-ascii?Q?NhlZCsxvSwM33swGaQFm5pLTKnIzSWDvr/WF4YpmgPy5spbR9/61grqrJvMP?= =?us-ascii?Q?qfETqMUFtzsTGWmRr5LVfcCbKJV+GapZzm0k0mi9KMxvoaJisw=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)(36860700013)(1800799024)(376014)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 9C2yy3fi2nbBHpN0aWlBHP/K7w34MxcFGds23KvbTYB5Hnl//kvg5wwbjbCfbzomCZ+RZSw/TlYm1WupPjQJGZfLJhxD2GXS2Cxbl9nkpwcmpQQslzYCSyWcFyqsrceFbF+uhaC9hBqzyJpB5XwWMio+VjBb3iFUHE8yjrogWKCjDkPlWTV9jOE/kEtGBbABKJYce5tjrTKgBjY7+0gLL8BmefgkLst2gxwgovPpFQGCVRnL/hwWk0Gl+upz3KkjbwkBTYUGHdALPFLU3wQnNLbzhP2pUNUDMPGkS5LVBTqqc1oUy+Gqu4fwD9zq1artOIpOu7a8Wqh4mSauksP1RZRhXUI1C1m/c2/16KDwzZn63jxuMcM8trc1lb2UdwraSmXfFc1SIjyLqZG3ru572JhlLsbe7LakWYY+6ROQiMYl+WaUn/vU+XoTXUpViu9Uue13bkBsWy9MCbNjto4Vk9uhmJ49TLAsvY8gbTJhrl5Iq3SfzJKczF/vuV6gsx98+v4Xwc8IQZiUkn2KxlKnEwSAfwpfFn/W8FLUdAhIZTJlEzw/oAZLg0TxdGjQdM/Ojr9jNMgZ7GKC2UjCoWzRoD694vfKFVvQNjkg/J/lwwmnwdTId7yWoNkpIflBHRMNEo4BYVwcTAW4K9KWTRtJSNaNpRUvtCn8yocS3JC9Gm8= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 16:56:52.5129 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70288847-5a1f-480c-f38e-08dcf2ba8754 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: DU2PEPF0001E9C2.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1P190MB2227 X-OriginatorOrg: napatech.com X-BESS-ID: 1729621804-303894-12664-17530-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.111 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.259903 [from cloudscan10-0.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