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 8358B45BB4; Wed, 23 Oct 2024 19:07:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3102432E6; Wed, 23 Oct 2024 19:02:17 +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 E91EB42F77 for ; Wed, 23 Oct 2024 19:01:30 +0200 (CEST) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03lp2176.outbound.protection.outlook.com [104.47.51.176]) by mx-outbound42-14.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 Oct 2024 17:01:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=q41oGLxMHuTYiPIVdPAlv723nFfH/Do6E/ITK3PEtTm8xa2EUTBJASb2ZPubgoOsD25HLysXvKLC8dEAPbthU2+MusbYStTV39kGDIMKjlzARaNvCkDvwTjSJtL1GdQxH5yyi75xomryVvriORZqHJANX2tIAD7lqkgCY54X+rr7Q0i2bWWDKUePL9/trSTO9WSm5e0aV2ddRPfyc1yUapP6gff2/khH2/ERKhMXstIBu5fnVYc5hR4Y/Y/CLQfurOEXryr0WJIgZHEPezxATs2OFUU7knbIFOhAoMuhZNXt4BA+97oiyXgmEa9y5MSvWUim44qEeVUM+rTbxvPLoA== 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=beR09GQ3xg2Pz6aj8CXsLr5ZsBASXHgejhYHMVLqmIVaRyteHbFmFcmakqKV9KOAj4pB+fQGMNnZiMalEqFP2nJD+bR7bEpuZEuk0cmLdwFFbJexgRpiY5CK9SgTKPUKHsou2mx9Klt/AH3+ggyvh5gjjx4agVaOOKbCio87Do6SzZNwNCfUDq6m5qrMQxK8TOimzO4cyWZyI9nOj/XK3LUif4ibbEbvhoTTy5LM79ewdCdUr30dzdskZs/VSaWcQnySL2O1/1md8HLN7qGd25W2hNF/08V9YXY1xMGnezCgm/ZRxDlntogm/aii7Hl0YPU22ukV10DYtHajw/KnnA== 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=aKQ74on+T0RTSsT87JNOIhZs0D5As5/T4lOAEK4LKrIVYApOPena58wODFg1PStvixuxDsEmuDwz8iA8G1Hj6IQbKN086GglsMWPRUELmTs+q0dUvEIkRhUdWHFWSbLjMaPxabjw2DRimwa4dySNP1EfhS7eGuMVz/gq8Tdo2sM= Received: from DU7PR01CA0018.eurprd01.prod.exchangelabs.com (2603:10a6:10:50f::12) by AM9P190MB1169.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:266::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.17; Wed, 23 Oct 2024 17:01:28 +0000 Received: from DB5PEPF00014B9E.eurprd02.prod.outlook.com (2603:10a6:10:50f:cafe::d7) by DU7PR01CA0018.outlook.office365.com (2603:10a6:10:50f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16 via Frontend Transport; Wed, 23 Oct 2024 17:01:28 +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 DB5PEPF00014B9E.mail.protection.outlook.com (10.167.8.171) with Microsoft SMTP Server id 15.20.8093.14 via Frontend Transport; Wed, 23 Oct 2024 17:01:27 +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 51/73] net/ntnic: add Tx RPL module Date: Wed, 23 Oct 2024 18:59:59 +0200 Message-ID: <20241023170032.314155-52-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241023170032.314155-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241023170032.314155-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B9E:EE_|AM9P190MB1169:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 2f76840c-378c-4a3f-ba6f-08dcf38455f8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-asc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8sYDkWB?= =?us-ascii?Q?w4+Ciau0ue5fJXR14Do/GLYLexnWdxHcA+mMn1iilybuPydW+rzsYgL7qBcP?= =?us-ascii?Q?ImM9UgsytUsNjE4boLkcuqX++9CIKXfWPfwCg69saJAPbnp1m9hCkTCnGtLL?= =?us-ascii?Q?832alQ7RkMQ0V6acRZqXqCCejsbsojL7lJlxyaJBjBGqDUyJFmVFX8Oe75jX?= =?us-ascii?Q?bxXc1aAMupyhlertuz1alAKmduIYbI+dHJ+JeumINqHOpR8Ek9EeSF/1IrTN?= =?us-ascii?Q?No2eWLHOesVKQyAJb5ppNt/6hFbeu7QqmE1l4YFEpsmn+c4r9j/lkrE6cbiw?= =?us-ascii?Q?Ch08HysDfvgw+SUtQyVR93lH0vspOB1vf0VJ7gsoQseoS1nCxQiemLfBuwka?= =?us-ascii?Q?D8TMBPPN7aA1QqXPk1DhlUP8j+jVTHOVAkGvnFX88y3ytdYbEFFyVyWOSLas?= =?us-ascii?Q?apozTGrLjpMMhrqYxfJ0bs7Vj6RpyVngsGTppqw2eLvDwLbCjQtWJRBe7Zug?= =?us-ascii?Q?EfOPG+PuIQyXgEcBXBqQrqgAJs2LrmqQ4tXAxNMZ2NpcyfGoZA=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)(376014)(1800799024)(36860700013); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: YDtiyTQOeFvK2tnZQzbgU6bpvQkfxmz5RLfTI5ARKUxSo2zdDsPeXaNzQ94pVgdZdbvAq6HrfiZVeISnwA8zMS7UCqvHBAw5r8MpAhCsPijD2VJai8AiJNw4vQj3KsKQioG3d2OeWCslLUthekG9E6oqtdzZCemFQuR5RCQJjmAOf+U4rA3Gl3LtSkAiiOKaZXv5vy0fnBwrPVkXJk943P0+UGIsyY6R00r5Bo3d4/+gMuozi/tLdpxWc8G8/C22ezzRWnAe6ZU07VtTBW8h22rkHr+ERwE4Bk6ZH1cwFh/Bm/sP8LXCw1KN8z6NgnTSYSsCYHChjvO4A02JCfcKE7Tl68i/fPYvX0udLYk8xeMXlrA/VMrYNZS4XoGT8AmKr3VQaS1LG2uF1pJ0IBN1WGK9AR6ryHHSbD0khdcmcD4E2wfoWOxmHu1nOQpni2VKgiezl4zX4xqNsm02q0qHjN9CcgMASWTUOm87bLHaxjsLRrnVWWYFjnSqSWytLD6hSp01kry/WCCO4B6pmlD+Czcq8mRcY6sN5WzYq2kpNq2UXuwg+QV/vJBic2y22/kfOsr4DfRSO61mr4k15P0QoIJ9UjvNKPaBTpIP0I4TxuCpVoNuGgj/jsy3IAKDh74E9PTLzOTZuXOxvURVCsupsMgvGBUT7k4VzVdz9Ej00iQ= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2024 17:01:27.9926 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2f76840c-378c-4a3f-ba6f-08dcf38455f8 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: DB5PEPF00014B9E.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9P190MB1169 X-BESS-ID: 1729702889-310766-12816-42084-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.51.176 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.259925 [from cloudscan10-18.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