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 AEB2945BCC; Thu, 31 Oct 2024 00:14:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A61C643501; Thu, 31 Oct 2024 00:14:53 +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 36682433A9 for ; Thu, 31 Oct 2024 00:14:52 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2112.outbound.protection.outlook.com [104.47.18.112]) by mx-outbound47-144.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 30 Oct 2024 23:14:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SKclPmCs5BVBp0+y3a+fDdcQ3AlIVnkfAzbpf5lCKBuidzAvW8OMUBV30ygpAyKXsxRTJ9JHTLs8IuKmqjBF3GI4uqF3/Xc6oge+daHHlxPATXjV/JKBZ6hFoDvXOgH9Z0cO/S9DQixnjdZsnLDaPT64UbcSm80uLP17gWNJ6MGgTWt/ciSLxC9MVkmNduIU94TtMawThtzeerqOdqMlcYvXJIsetAx4xmCmbpVxgPHTmt1nnKjoHUezYCF7ls1Y3jzNm9sJDgHz/XNhADadFLAzK2PWK6vr7IjaKH2aQlkmaQM2DnKxEk2x4+HiskyT4PCK14yhNJXHsGedBUzyvw== 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=G8Eac9ZoqNRYnH4j5XnuX2BeOX3oOVt+FBYFBY0ZLeHUyJQMli6Y67VxUii4OzofdB90JICLYjogdPCjUYiWGARSkv9V4gbrm3J0LammjoR0db5PUDg5MhTqrjsSCINCyfcVCM9s0Rl5IgdLBeXFk1O0XbFow+IHnNRqV4Q0ANhw1X79UgscaG5DFsryMWt3JP71xAHSw/se9RiLcm08esPObMiqkQoA9KoxVeScbPbH6Qafhn2KPkXE9mPg3NYnXttEtGD4WNQrJPJpG0UoSeRdwpl7MwCQL9c5jExvlIUv8E85bCWTjlMKkm7RFyF+IDbxxbKkJIxrXYR//DYPXA== 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=TCOqf+PXuDGN5YKM5LC6RC/Nx/PG12n18edgmlxMSbq/nBzrwMW74pPwEgPzzd8gqLSUca9FGLwOVlEa7khbZwLEMFJomyZGnX7TBeNSzdWMRJyWJIzsaLzcQHhnd74tpOHL1YDJeiwwq+ve8gzwwWI2p/7ZGNu48mQLIU8j2GU= Received: from DUZPR01CA0005.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c3::9) by GV1P190MB1971.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:57::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Wed, 30 Oct 2024 21:40:42 +0000 Received: from DU2PEPF00028D13.eurprd03.prod.outlook.com (2603:10a6:10:3c3:cafe::3b) by DUZPR01CA0005.outlook.office365.com (2603:10a6:10:3c3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.23 via Frontend Transport; Wed, 30 Oct 2024 21:40:41 +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 DU2PEPF00028D13.mail.protection.outlook.com (10.167.242.27) with Microsoft SMTP Server id 15.20.8114.16 via Frontend Transport; Wed, 30 Oct 2024 21:40: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, stephen@networkplumber.org, Oleksandr Kolomeiets Subject: [PATCH v5 51/80] net/ntnic: add Tx RPL module registers Date: Wed, 30 Oct 2024 22:38:58 +0100 Message-ID: <20241030213940.3470062-52-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241030213940.3470062-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241030213940.3470062-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D13:EE_|GV1P190MB1971:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 29d76e52-4c9e-46af-0b91-08dcf92b80a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?8JYK0jqFr/4g17xTQwIE1+lma/Qq+TljV4xB8BLxOHa+W3Rh/SevRcmX3KAn?= =?us-ascii?Q?KoSXWeiGmjpJrszlA2LrXiPic7B4+SJPUWuil20ekTwgKq5Hftmcu5QOQr32?= =?us-ascii?Q?dd9+WNB2UPAKva9OYWZNgTHBNYygNt+Hjpxu8LA6ZP//WcB1KvBnCsqCc2J8?= =?us-ascii?Q?CWLxVdgT2DzK5uTOaO9A74kKImKBXz0gS+l1DsG+zLfbQeq9aBrjkJYm9KHW?= =?us-ascii?Q?S5gOrA8RXOh2KvpRPi/+vSAVzkt4tv/5F+vPyIcpB7YgrydnJuqqpox/OR3g?= =?us-ascii?Q?1wlvFsyvOrLDgtOHOQxqA76PnuiSKockqzI7KRHzYXnx8yRayS/l4rBB5i3E?= =?us-ascii?Q?loz7l1fF7XHaGsWpGefQntEuyKdkSZpRFan/HVVWEavAgQP1QdPeSGM4MDWE?= =?us-ascii?Q?AjMxZXrpGOtd60Lk0u/f2dAMqaQ6GmqSWk7yCKDzYMPZFZhn9tu+H6QHW6mA?= =?us-ascii?Q?xJlmQrfYa8LMjzYvxBL0RR44un1e5kOJUDH9FSOF9DNrNI2fmI6/p+e31RLo?= =?us-ascii?Q?8F4XclXUSL/yCZkSoAFMJvffA0fNfGiRYcm+hBNFhhefOjooWi7sjTas00sh?= =?us-ascii?Q?tQWpWV13OnkXmh3WESNH/of93+ei8D1VDylECiE2fL43sdWIZFZ+TLNhuWW4?= =?us-ascii?Q?r75A3lETvg6lsG3sw0Rn7ZQhuKaz0zbeU1QJ1umGdwJBNkyPm8baBRFDiF6l?= =?us-ascii?Q?YOy664IlSBnczPOUM7TyXTvjc9dBVpovWRvw1z2yB3vZJ8XJ2FkzSi07HQOa?= =?us-ascii?Q?WJFTDqaI9HaB9Il32ZbKNFs0W8Ny1y3gxo4GBrgjQVq86y+rbQg72qPcmlu8?= =?us-ascii?Q?x6iQ5iVB8E4ZgusZvP/bRZkfqgd1v4ZFGQ393HN4Kl4dbL4y/znZPtKGKECm?= =?us-ascii?Q?KxVks35O7aresVHioX1aLO55d9WNFtoPb8q+4REWaMbcRiIcOifkD5QBgesV?= =?us-ascii?Q?TPr10m7MD8tskXV3XuuQUVCb1zG8O7GV/oOEpGSpsr14sL5fvKoCE9YgIAHV?= =?us-ascii?Q?ij22VpwY/979aHxUjpPfSss+9SZ9jimxw9YQXN/jcOImNhjd3AbSZI31LuiX?= =?us-ascii?Q?q3GveAu9zEt9HNRKGroEJ9v1nqidcx3l+6H1+eqXFq4kHoaLsPQNxr0cNmGP?= =?us-ascii?Q?eLJKivMGinjYO1GZ5VAifimKDtZMAHBMXOMAAvyT6vw1OR801gcB+ixahbxC?= =?us-ascii?Q?Xkhy4xwmrQWcbEyeaR1dJIXPsQtSLLZHAN7GWWk1ZgeUkGizHyKD95ODo4m7?= =?us-ascii?Q?1H5pKjZv2vtvOApr1LCKTC3J+2idsW+xdhI//qXXAnrKZRmFxE6k19ea3vHT?= =?us-ascii?Q?Lt1VM4PwNwsE448mLWc0M1k64u2kZCEhWoPC+vgnSxvKJgPDmjwHUBblUhwh?= =?us-ascii?Q?iDq+ABAJWJxzs/XFVfoApS36h2rWRVYqKcR6O0MxKGOE/2hywg=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)(376014)(36860700013)(82310400026)(1800799024); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: /0Ldqd5Q6jTpATZiPtMJa7X8Z4dU71S1y0TDsL1rlrc8q6HVaoLVP80TTrA2nQEauTDlGdpU4S8T0kQ2pn9zcRAttNE6RQ671ivtPREu3bHEaC91t9Q0zWMGuRpbaJrEE+FTEe4MSSuallV3tkhVDElAVY8/mdbXUao+X30NkQp95+MM6N8hVnwIE6amWOVb/ImKYYhATXNRN9JxsqnQeirjPKelwTPqxZg8U46SLVrwJZxvjuCSGCeK819x/0j4kGihmfxGsMS1Vt/vG/piVvkQUK+myJ7fXOIX/zl+BAMI4tzc6A639ZkO2HRowUFcqEHVF3xbmNE6zmKxOXi3hm1dSSNVReZ77RXdmINoDrSNXhTJHTP//itoeM18M/zMH4T4CfiVBrOOABFG04115Df0Hz7kEy/egdnD8KEMp68zMwCgAmC60M/b8ZJwKoi5uRrmayT1ZyLRTrDQYsCtbpoQguLKefEvU6WXE3UasRi0TS0PwKrgPwOdO8clFCANh48/Cu2bnbi74B0huB951v9QvV0NxCT35qQdRBKXkb/BCt9JKnJ2JWDQhjp1OtUqZggqlbC5VkLpcFBaZvgWe3TmH8uxDAr/+r5vVmWh36gwLLvj0smACNfHeNKdfhI2RE0t5CbLDfm6fmZvXufArq0af+QilUgQo2yo8bkv7iA= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2024 21:40:41.4271 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 29d76e52-4c9e-46af-0b91-08dcf92b80a9 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: DU2PEPF00028D13.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1P190MB1971 X-OriginatorOrg: napatech.com X-BESS-ID: 1730330089-312176-12713-43905-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.18.112 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.260092 [from cloudscan16-249.eu-central-1b.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