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 C586C45AD9; Mon, 7 Oct 2024 21:40:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14F204111B; Mon, 7 Oct 2024 21:36:03 +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 B839340E15 for ; Mon, 7 Oct 2024 21:35:36 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2104.outbound.protection.outlook.com [104.47.18.104]) by mx-outbound9-155.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 07 Oct 2024 19:35:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ibT3dTIbzv3JqUQL/i33YAcrBxPJVBl3YFx6ciExverPDC8qihaYQLh+VlwRZJVTyzbffHjm3gBD3Js9jxO28+6reOgtwe5EhG466qto6Xy2EcMUM8/Bm9/zhmlRQPNWoAUMDqPYI4rA3gLcUyNziYICbWepjnulRgM5s3JiED0xQpuCGJsrlqMm4PRMvXqqfz5vzGKwJdaNwFL5dkYVQRGbt8wRz9LGStGSVazDMntDs7wNbs43kEmTOAdzREI8LItjn0ITx+rMUti7tzyKweEFbBGn8xeDI91kucAOotD3BVrG97y/mFdpAwdl0dNC7ZL3cIWsgQen8Oi4BUeR6Q== 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=wBBV/Gu9lxIr+wr/M42sah3EV9egPZ3zeRl9cYtkNt0=; b=rHoCnj+YyRS1iO09BY1kHzJTcy638W5e0NshcLBZ0CzcXlTGQDcyM+YUCM8OHK4HE1GlQBVwNWr5oF+HcE4w/VSkhp5rplobOtg0xBiwI5ohW8Xx4OMX9EWuz/GbyqPzPC4BVQmxJwmihbg6BJI6HHEMi/CbzpRCb68NfyqnEweUvh+VNJ/AjELZs3DJtte5djqNR1YNGvgYRRClE+a6qEU0GH2eRbitTzOcgIbnE8nYdHcTKo+qmgSofk2U0o4omZC8pZ1C8KJq2NgR0fNC9dGln5UPojE/A1JFJMQFLLq6Eg1hzZLsSRuu8BptdsCu+kAGxAPmmlxDhYXyEQo6ZA== 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=wBBV/Gu9lxIr+wr/M42sah3EV9egPZ3zeRl9cYtkNt0=; b=ROeNT4cFsst5qIfyrQXIiL6Q64t06gcckQbSJi1MKUtqAokUqNRZpmAra3t3iC9kWLNVtLSOg8wsIqas4fVTFW+1rmqsnKuUGiOcOixe3N7uYV6Kch1N4A9TUxZVtnlccyd9Gzt5ybMFCwQlk0svVOHeV2imhyyngIl/bNn2Dps= Received: from DB9PR05CA0027.eurprd05.prod.outlook.com (2603:10a6:10:1da::32) by PR3P190MB0873.EURP190.PROD.OUTLOOK.COM (2603:10a6:102:88::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.20; Mon, 7 Oct 2024 19:35:30 +0000 Received: from DB1PEPF000509EC.eurprd03.prod.outlook.com (2603:10a6:10:1da:cafe::8) by DB9PR05CA0027.outlook.office365.com (2603:10a6:10:1da::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.34 via Frontend Transport; Mon, 7 Oct 2024 19:35:30 +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 DB1PEPF000509EC.mail.protection.outlook.com (10.167.242.70) with Microsoft SMTP Server id 15.20.8048.13 via Frontend Transport; Mon, 7 Oct 2024 19:35:30 +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 v2 34/50] net/ntnic: add packet descriptor builder (PDB) FPGA module Date: Mon, 7 Oct 2024 21:34:10 +0200 Message-ID: <20241007193436.675785-35-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241007193436.675785-1-sil-plv@napatech.com> References: <20241006203728.330792-2-sil-plv@napatech.com> <20241007193436.675785-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF000509EC:EE_|PR3P190MB0873:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 4d6fed1e-9c4d-4241-169b-08dce7073427 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?w2sX6720+WrRQETWXU+fkaPZRW9wDd/ybd0496LaC7s3gzZZjsHMHZt3dQ4Z?= =?us-ascii?Q?0MzAh+XjNEEjLpvZBOZW+p8ZDhRQcf0Nl4fWPzg+9k1zyJkni8je4xYnALWa?= =?us-ascii?Q?3tpMtdKrOqVdTIopfyG3Jh4MlNYnTx2+b8KlQjcmK62edfCFbfLSikcc4f/w?= =?us-ascii?Q?tBD/B47TnOm92BU2Ycck7QBMbQvt+VqKHg4FQiLwgnyGbX7BF2wCRpegtFkv?= =?us-ascii?Q?M485EubpxzTMWvWI8GuIE8TNyHv8oh+eGN/7CQNawy2b80AbdWeM4XXRefdI?= =?us-ascii?Q?f6u4ylwqHzcTJ/L3JKHZAGMLckSKZso+h7cDfyhsDHf9IvnwTRogCmjZxBXB?= =?us-ascii?Q?Mw5AGNLqkE2dbhOIRnmF/WdA2CM1/dhWv8ZQan8ZNuLssCowiDLi6G7j7Zq5?= =?us-ascii?Q?zyoWf5cdIuX8aYKddcOMaQacSQNXfGXRwtayyxYxtUTDS87jSVwgLpvLIz42?= =?us-ascii?Q?9zDAnswMzkHT4LS93TfRCuaNERDf2bVr5JCurj6mMd0Eo97i+8ePxjyFPJzB?= =?us-ascii?Q?KJXUFa8H8VKM+0DB3/I74Sef2RjpWKrgggjJcZiXtK/isgQrCwBZiHDdXB4d?= =?us-ascii?Q?shw6NyuHRjr20eHC4ERt5OSgQvwTNyYyXmi92/nGfBNQI+2RM+X1QilXAhT5?= =?us-ascii?Q?VZD88abQYvs5FSBHWoNk8SncfkPP8LazLJpyVAGc73EoN2h0jAlhmzRYICQr?= =?us-ascii?Q?7LIxPpAw5jgnD4dFmmJq5S+0Fr8nBuRhrory5KWBi/cbWi+iCPo+vfC/J0/+?= =?us-ascii?Q?XPrQ2PBIPHkTQ1mlChDrK0ALjjKvXuunkvopMcllQCcbulcl1sV/XiUFDOj/?= =?us-ascii?Q?uKFVMxOVg1AcAGZxNTVMGFFgSNUHjgcAbsU1D/bVd4Bnr1D3K+BM3iAZzqIS?= =?us-ascii?Q?I89wNcQjKO0OhQYVMzJqrECaUB/GXI4aZhGFyeaV0EWyIgIn1ssWQSpk+Ybf?= =?us-ascii?Q?9UfI65pVolQ71ZfdH83/NRs+Sfivq2IVhdhDOvgmB/erzcsfvR0B9VQnp1oi?= =?us-ascii?Q?xcVh0tqrDPv2wT7/9uYRgof3gmpPAZoFH3TSaWjUUnD7MU+9oaGo2ex5OFRk?= =?us-ascii?Q?4pnAuj0NDAz3OyOjX2Q/bhCDIVtBbyzxqkoc2zSiS+UkXFL0feH7CYiQTCnj?= =?us-ascii?Q?xzCxzL/qEfQ4T+bM6y4QPM4i6cz+nKwQK77VMIrQMd5FNDYC9g7ECEKKJT0K?= =?us-ascii?Q?vfXzM9amLrBt9WhJ3VAZWxnVUPWidY8FZ/aWmvThm9vCAWnvlJcKadRjDaim?= =?us-ascii?Q?TwLpvpY+KT0fH+hUZvcDmil91W4vjTqSbRDO0eaBSjog7j0a0MclNaooo1Qg?= =?us-ascii?Q?AQ/FN284MXCxpT7PL9bBf2LFdc04fq5clDo64HRr4+zMLbvWVRWeo97wqABG?= =?us-ascii?Q?K/rSnvnlm1SL/wz8zeUE/Vlgrhb5?= 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: CQ2CLZyJeexDVxviDdTFxa4Tl5BN2JtDS0XyN4aPc/2gl8tk5Yr65QNG4dEnUm6s07jzicHNQ+kaskRlAoVB3PlGPra0vD7f6nu4olMRAv9L7f2PICwuS2d8KnLf0tKwySHvmyHvEUBYm7h/GZLeGZhc27lTtyXpV/KeTkd3m80Is9vbxB3yd+b/D+W9eoUgodGQrz/97TqcTKUzmzcfs+AsPbAcbHNCAHEZ8SuDoNIod8N/ETjSWIZJQZpS6bTg2rfHU6/Z8j9K3EVlSltcUATZgkoMiuQjgOWfrfqLqh/IZK/AHOldKk7oCAQlXSIjHbrgJfW8CEm2o/OUXSErRnvDo1F+63tijzzFSLd7w0sXT/Odqr9zaTiyjaOq43nsKeXzfJIfeskW/KYpFxEj53kaaYTiFLQZH4RVYB+7dOJdfOcWSSCMu7PUtjpe4vOGNEGMLK7TXhvsmu6lHm8naL0eRW/49Z3kyy/tpqqCvq6YeiSNT91XPn3K0ypatIVM18N/O9lVA8jVsQob+Bg87hJy9yjjqwzOoN34XwiYyc2/GWQJgS/4DUX1WkFMs/uc8mn3c2fg9pCLbqfGX0o3xXzqC0G7AorYunPqFMDdw4nHIv8F85q+MA7s4USia1yTKNsT9yBGrCvnjehA0ayDXw== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 19:35:30.2719 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4d6fed1e-9c4d-4241-169b-08dce7073427 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: DB1PEPF000509EC.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3P190MB0873 X-BESS-ID: 1728329732-302459-3375-3619-2 X-BESS-VER: 2019.1_20241004.2057 X-BESS-Apparent-Source-IP: 104.47.18.104 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVpaGJqZAVgZQ0NgiySDVzNDAIs 3MxMgoMdnAINU4zSjRPC05xcg4Kc1AqTYWAAKLqOlBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259566 [from cloudscan19-135.eu-central-1b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=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 Packet Description Builder module creates packet meta-data for example virtio-net headers. Signed-off-by: Oleksandr Kolomeiets --- drivers/net/ntnic/include/hw_mod_backend.h | 34 ++++++++ drivers/net/ntnic/meson.build | 1 + drivers/net/ntnic/nthw/flow_api/flow_api.c | 3 + .../nthw/flow_api/hw_mod/hw_mod_backend.c | 1 + .../ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c | 86 +++++++++++++++++++ .../supported/nthw_fpga_9563_055_049_0000.c | 40 ++++++++- 6 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c diff --git a/drivers/net/ntnic/include/hw_mod_backend.h b/drivers/net/ntnic/include/hw_mod_backend.h index b28192e682..9644639131 100644 --- a/drivers/net/ntnic/include/hw_mod_backend.h +++ b/drivers/net/ntnic/include/hw_mod_backend.h @@ -609,6 +609,39 @@ struct pdb_func_s { struct hw_mod_pdb_v9_s v9; }; }; +enum hw_pdb_e { + /* functions */ + HW_PDB_RCP_PRESET_ALL = 0, + HW_PDB_RCP_COMPARE, + HW_PDB_RCP_FIND, + /* fields */ + HW_PDB_RCP_DESCRIPTOR = FIELD_START_INDEX, + HW_PDB_RCP_DESC_LEN, + HW_PDB_RCP_TX_PORT, + HW_PDB_RCP_TX_IGNORE, + HW_PDB_RCP_TX_NOW, + HW_PDB_RCP_CRC_OVERWRITE, + HW_PDB_RCP_ALIGN, + HW_PDB_RCP_OFS0_DYN, + HW_PDB_RCP_OFS0_REL, + HW_PDB_RCP_OFS1_DYN, + HW_PDB_RCP_OFS1_REL, + HW_PDB_RCP_OFS2_DYN, + HW_PDB_RCP_OFS2_REL, + HW_PDB_RCP_IP_PROT_TNL, + HW_PDB_RCP_PPC_HSH, + HW_PDB_RCP_DUPLICATE_EN, + HW_PDB_RCP_DUPLICATE_BIT, + HW_PDB_RCP_PCAP_KEEP_FCS, + HW_PDB_CONFIG_TS_FORMAT, + HW_PDB_CONFIG_PORT_OFS, +}; +bool hw_mod_pdb_present(struct flow_api_backend_s *be); +int hw_mod_pdb_alloc(struct flow_api_backend_s *be); +void hw_mod_pdb_free(struct flow_api_backend_s *be); +int hw_mod_pdb_reset(struct flow_api_backend_s *be); +int hw_mod_pdb_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count); +int hw_mod_pdb_config_flush(struct flow_api_backend_s *be); struct tpe_func_s { COMMON_FUNC_INFO_S; @@ -779,6 +812,7 @@ struct flow_api_backend_s { struct hsh_func_s hsh; struct qsl_func_s qsl; struct slc_lr_func_s slc_lr; + struct pdb_func_s pdb; /* NIC attributes */ unsigned int num_phy_ports; diff --git a/drivers/net/ntnic/meson.build b/drivers/net/ntnic/meson.build index 4caee8ac41..0415e5a5b2 100644 --- a/drivers/net/ntnic/meson.build +++ b/drivers/net/ntnic/meson.build @@ -53,6 +53,7 @@ sources = files( 'nthw/flow_api/hw_mod/hw_mod_flm.c', 'nthw/flow_api/hw_mod/hw_mod_hsh.c', 'nthw/flow_api/hw_mod/hw_mod_km.c', + 'nthw/flow_api/hw_mod/hw_mod_pdb.c', 'nthw/flow_api/hw_mod/hw_mod_qsl.c', 'nthw/flow_api/hw_mod/hw_mod_slc_lr.c', 'nthw/flow_filter/flow_nthw_cat.c', diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c b/drivers/net/ntnic/nthw/flow_api/flow_api.c index 5d6571310c..03946fb52f 100644 --- a/drivers/net/ntnic/nthw/flow_api/flow_api.c +++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c @@ -301,6 +301,9 @@ struct flow_nic_dev *flow_api_create(uint8_t adapter_no, const struct flow_api_b if (init_resource_elements(ndev, RES_HSH_RCP, ndev->be.hsh.nb_rcp)) goto err_exit; + if (init_resource_elements(ndev, RES_PDB_RCP, ndev->be.pdb.nb_pdb_rcp_categories)) + goto err_exit; + if (init_resource_elements(ndev, RES_QSL_RCP, ndev->be.qsl.nb_rcp_categories)) goto err_exit; diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_backend.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_backend.c index 6b0ea2a4a6..118e49f539 100644 --- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_backend.c +++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_backend.c @@ -26,6 +26,7 @@ static const struct { "SLC LR", hw_mod_slc_lr_alloc, hw_mod_slc_lr_free, hw_mod_slc_lr_reset, hw_mod_slc_lr_present }, + { "PDB", hw_mod_pdb_alloc, hw_mod_pdb_free, hw_mod_pdb_reset, hw_mod_pdb_present }, }; #define MOD_COUNT (ARRAY_SIZE(module)) diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c new file mode 100644 index 0000000000..13f0972e07 --- /dev/null +++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c @@ -0,0 +1,86 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2023 Napatech A/S + */ + +#include +#include +#include + +#include "hw_mod_backend.h" + +#define _MOD_ "PDB" +#define _VER_ be->pdb.ver + +bool hw_mod_pdb_present(struct flow_api_backend_s *be) +{ + return be->iface->get_pdb_present(be->be_dev); +} + +int hw_mod_pdb_alloc(struct flow_api_backend_s *be) +{ + int nb; + _VER_ = be->iface->get_pdb_version(be->be_dev); + NT_LOG(DBG, FILTER, "PDB MODULE VERSION %i.%i\n", VER_MAJOR(_VER_), VER_MINOR(_VER_)); + + nb = be->iface->get_nb_pdb_categories(be->be_dev); + + if (nb <= 0) + return COUNT_ERROR(pdb_categories); + + be->pdb.nb_pdb_rcp_categories = (uint32_t)nb; + + switch (_VER_) { + case 9: + if (!callocate_mod((struct common_func_s *)&be->pdb, 2, &be->pdb.v9.rcp, + be->pdb.nb_pdb_rcp_categories, sizeof(struct pdb_v9_rcp_s), + &be->pdb.v9.config, 1, sizeof(struct pdb_v9_config_s))) + return -1; + + break; + + /* end case 9 */ + default: + return UNSUP_VER; + } + + return 0; +} + +void hw_mod_pdb_free(struct flow_api_backend_s *be) +{ + if (be->pdb.base) { + free(be->pdb.base); + be->pdb.base = NULL; + } +} + +int hw_mod_pdb_reset(struct flow_api_backend_s *be) +{ + int err = 0; + /* Zero entire cache area */ + zero_module_cache((struct common_func_s *)(&be->hsh)); + + NT_LOG(DBG, FILTER, "INIT PDB RCP\n"); + err |= hw_mod_pdb_rcp_flush(be, 0, ALL_ENTRIES); + + NT_LOG(DBG, FILTER, "INIT PDB CONFIG\n"); + err |= hw_mod_pdb_config_flush(be); + return err; +} + +int hw_mod_pdb_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count) +{ + if (count == ALL_ENTRIES) + count = be->pdb.nb_pdb_rcp_categories; + + if ((unsigned int)(start_idx + count) > be->pdb.nb_pdb_rcp_categories) + return INDEX_TOO_LARGE; + + return be->iface->pdb_rcp_flush(be->be_dev, &be->pdb, start_idx, count); +} + +int hw_mod_pdb_config_flush(struct flow_api_backend_s *be) +{ + return be->iface->pdb_config_flush(be->be_dev, &be->pdb); +} 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 7eeb210b80..9f821abf55 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 @@ -1297,6 +1297,43 @@ static nthw_fpga_register_init_s pci_wr_tg_registers[] = { { PCI_WR_TG_TG_WR_RUN, 4, 16, NTHW_FPGA_REG_TYPE_WO, 0, 1, pci_wr_tg_tg_wr_run_fields }, }; +static nthw_fpga_field_init_s pdb_config_fields[] = { + { PDB_CONFIG_PORT_OFS, 6, 3, 0 }, + { PDB_CONFIG_TS_FORMAT, 3, 0, 0 }, +}; + +static nthw_fpga_field_init_s pdb_rcp_ctrl_fields[] = { + { PDB_RCP_CTRL_ADR, 4, 0, 0x0000 }, + { PDB_RCP_CTRL_CNT, 16, 16, 0x0000 }, +}; + +static nthw_fpga_field_init_s pdb_rcp_data_fields[] = { + { PDB_RCP_DATA_ALIGN, 1, 17, 0x0000 }, + { PDB_RCP_DATA_CRC_OVERWRITE, 1, 16, 0x0000 }, + { PDB_RCP_DATA_DESCRIPTOR, 4, 0, 0x0000 }, + { PDB_RCP_DATA_DESC_LEN, 5, 4, 0 }, + { PDB_RCP_DATA_DUPLICATE_BIT, 5, 61, 0x0000 }, + { PDB_RCP_DATA_DUPLICATE_EN, 1, 60, 0x0000 }, + { PDB_RCP_DATA_IP_PROT_TNL, 1, 57, 0x0000 }, + { PDB_RCP_DATA_OFS0_DYN, 5, 18, 0x0000 }, + { PDB_RCP_DATA_OFS0_REL, 8, 23, 0x0000 }, + { PDB_RCP_DATA_OFS1_DYN, 5, 31, 0x0000 }, + { PDB_RCP_DATA_OFS1_REL, 8, 36, 0x0000 }, + { PDB_RCP_DATA_OFS2_DYN, 5, 44, 0x0000 }, + { PDB_RCP_DATA_OFS2_REL, 8, 49, 0x0000 }, + { PDB_RCP_DATA_PCAP_KEEP_FCS, 1, 66, 0x0000 }, + { PDB_RCP_DATA_PPC_HSH, 2, 58, 0x0000 }, + { PDB_RCP_DATA_TX_IGNORE, 1, 14, 0x0000 }, + { PDB_RCP_DATA_TX_NOW, 1, 15, 0x0000 }, + { PDB_RCP_DATA_TX_PORT, 5, 9, 0x0000 }, +}; + +static nthw_fpga_register_init_s pdb_registers[] = { + { PDB_CONFIG, 2, 10, NTHW_FPGA_REG_TYPE_WO, 0, 2, pdb_config_fields }, + { PDB_RCP_CTRL, 0, 32, NTHW_FPGA_REG_TYPE_WO, 0, 2, pdb_rcp_ctrl_fields }, + { PDB_RCP_DATA, 1, 67, NTHW_FPGA_REG_TYPE_WO, 0, 18, pdb_rcp_data_fields }, +}; + static nthw_fpga_field_init_s qsl_qen_ctrl_fields[] = { { QSL_QEN_CTRL_ADR, 5, 0, 0x0000 }, { QSL_QEN_CTRL_CNT, 16, 16, 0x0000 }, @@ -1510,6 +1547,7 @@ static nthw_fpga_module_init_s fpga_modules[] = { MOD_PCI_WR_TG, 0, MOD_PCI_WR_TG, 0, 1, NTHW_FPGA_BUS_TYPE_RAB0, 2304, 7, pci_wr_tg_registers }, + { MOD_PDB, 0, MOD_PDB, 0, 9, NTHW_FPGA_BUS_TYPE_RAB1, 2560, 3, pdb_registers }, { MOD_QSL, 0, MOD_QSL, 0, 7, NTHW_FPGA_BUS_TYPE_RAB1, 1792, 8, qsl_registers }, { MOD_RAC, 0, MOD_RAC, 3, 0, NTHW_FPGA_BUS_TYPE_PCI, 8192, 14, rac_registers }, { MOD_RST9563, 0, MOD_RST9563, 0, 5, NTHW_FPGA_BUS_TYPE_RAB0, 1024, 5, rst9563_registers }, @@ -1672,5 +1710,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, 19, fpga_modules, + 200, 9563, 55, 49, 0, 0, 1726740521, 152, product_parameters, 20, fpga_modules, }; -- 2.45.0