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 141D145B96; Mon, 21 Oct 2024 23:11:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CEF2A427A9; Mon, 21 Oct 2024 23:06:52 +0200 (CEST) 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 82A6C40A70 for ; Mon, 21 Oct 2024 23:06:12 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2104.outbound.protection.outlook.com [104.47.17.104]) by mx-outbound8-87.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 21 Oct 2024 21:06:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xy8tnGsKjgFbVqtPzCLa2NmY+lwpBUshaxNmAY79iBaa7epXr+UvduAgjQ9FLOwDI+NYNv5MqTRPX+T68q2HQyhT017XlFtk6OqRNHND9mK+PBoviTQvPvdtIw4gbiuRe2p6rR+ur4m8rbxY6rIE9OtoSEDE0S24G61s6r7sWCIH/AVr2NA+CRADR4P6yl+mTwKHDxa/ve+UitwxSnjQyIjuWeKF+Lh9gubY8fPicHRc5F+jJ87iUXpWhTWgdBPiuumH/PapMeTokV/X0X4YLpeilnZYYRU2GBMB8rrCzv9l8LjSzTEatA5NTSphpIJproGAwgMoXbzVNzxhEbIWsw== 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=HCNB2ZI3xCSKSDoRuZvLIZHkyEtzN6wsJZyu02wyJOTYbD39ARLliE+QxPbrPoSej2zeYbdas+1JlMgPQip4/GaynsSTmVD9tz1N/3etCwRwNk90fE9bIINjMchCeTeyc9UwA67t+FFectw2cJIAltl54kzW26KNokA5sQQAQTOxdJvKdJvmQ6clw1w/ps8W0ylHUZEYQjbbKcWQE+FTRmx/kczrJ5dqun1yE793UsRTnjXX/G8Il1GlnPbTL+MRzlldME1rrjfhN6vxj/HaLmNv72ht60Uw+nJLZlZcH2qTEaKC7Wt7qpFJX3SLE2S5tHHk4JLs3FEiRiY2/hVbKQ== 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=R4IIL+ePQssAo/MB5+84TCzymca0+J0urzS4YLQaPwEdYfG4Sb2hOVsHRUbtKY5uyCjjE1pfVa87TojAqILyW/icXuk+7DbpM46XmYbgMvw59XPjEpmWhSo3sDC9LNj/6pc8PDu6RDbgxDdczEM7Mu5ZvChpp+Y6yNC6Mcqxulc= Received: from AS9PR04CA0150.eurprd04.prod.outlook.com (2603:10a6:20b:48a::23) by PA2P190MB2127.EURP190.PROD.OUTLOOK.COM (2603:10a6:102:403::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 21:06:08 +0000 Received: from AMS0EPF000001A8.eurprd05.prod.outlook.com (2603:10a6:20b:48a:cafe::88) by AS9PR04CA0150.outlook.office365.com (2603:10a6:20b:48a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Mon, 21 Oct 2024 21:06:08 +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 AMS0EPF000001A8.mail.protection.outlook.com (10.167.16.148) with Microsoft SMTP Server id 15.20.8093.14 via Frontend Transport; Mon, 21 Oct 2024 21:06:07 +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 v1 51/73] net/ntnic: add Tx RPL module Date: Mon, 21 Oct 2024 23:04:53 +0200 Message-ID: <20241021210527.2075431-52-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241021210527.2075431-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF000001A8:EE_|PA2P190MB2127:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 505765e4-ce8b-4ab4-eaca-08dcf2142ee8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?IwTgo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/xwugNvToZ?= =?us-ascii?Q?5ddmKieAc4Ut+QMe6PaBfDFJOV2zBQzip287GCrTkU7CSB4UsKdNs6JLuHX4?= =?us-ascii?Q?5gAdjVMITEqdQa7eqMD18p/DW1+cfyrD1Lugq2Q4YmI2vN2rcKTG9GMfVBNk?= =?us-ascii?Q?SBfuEtEJWiUnlJm9ev3cI/JfXBBi7DRs90LUD68Tq8KESpgDl8l2CGuId9Yp?= =?us-ascii?Q?KuV+h8M2PGZi48zyeBtc+DTanmGfB16mDkcbT4CLH9oWVsgd+BtWzXvR+DTQ?= =?us-ascii?Q?jboxkwTO19yC9k2RUcmPW09kSCoPOh491BOdfgCIilK7eNXkYtoeV/4Yl44n?= =?us-ascii?Q?f5mRTww2++RKHT726lf4tcgmgJQK/zNtcXhRj/26EvJPqc6h0UdmOfZYJney?= =?us-ascii?Q?ZjPdXFcYgcdyq1y457QavRCmzmXYw2pBO7vbD+jF3deXJpQCvd0FTOg0TunL?= =?us-ascii?Q?Lx4q36YjJ36cqVsunFu3+IH/6u61iBwdkfCrV/MEE2X1OugTP9MT8Yzx2EaD?= =?us-ascii?Q?2bjvMnkvMX5CEGR4Qpk3Lwq0zpOlMV5qGGM2wOE5RSzMFb66BQ=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)(82310400026)(1800799024)(36860700013)(376014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: WqhCKpMct8a9bHxszP23HSRtFEKNCv0D1YExKW7ky1tzb+Gy9oVNUpT195bjXMTpKEDDQSuLw8Ozlz55634ynMfBqXl65ZFo4cwfziLQKhZqAXVTXPv3xQLFj2BqBg11dkm/+HI3OcxgpJIZLpexT4M+DYxh9v5GIfj+PeIt4n4HQ4J1h4vHNoaGqVDs1QTMGark5QZQQP1gHndu153o0eHgBB/3WZJ6r/wAjcztkKvnoen7b4dBTQfsTBgSIponmxAHw/ItQfxMmoXJYlK4vVgCJC6chRHxzVspTkBRVDEbYAWMFT1U9q29Tz4HdroNZos5Xx/Hf5BcPJdlzKXgLZ8e73UG3nMzkNWG4neojHB/kfRcRFHhdYfve+INQVyouYcg8ulJKGyJRS967lCgr865K5eqm330EKpjEL1B1Iq6baoPzxVsxcv7UySCj3aOcedw8pwF33O2/ytJi2yvkJZGFVjKjyvJxhrCUJzQBiZ19fXWFLsn26YeHK/Cnl7M8hj4d6wVyTQ469SiRsKwypOpOiPFfrbtWHOXUPYH85ivlPtx24nkIxi6YUYqaQJmdz9GLKiG1ph+ytG+OfOf7PUJ9UPgFdWUeNamK43JkpWKrgnN07KujSiNpbZ6K5HMZkHlcK/3k6tMb5oMaha4CYUT73+NDdC2XRxXqdGRgfI= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 21:06:07.8489 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 505765e4-ce8b-4ab4-eaca-08dcf2142ee8 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: AMS0EPF000001A8.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2P190MB2127 X-BESS-ID: 1729544769-302135-12940-43236-2 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.104 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.259883 [from cloudscan8-241.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