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 C315645AAF; Fri, 4 Oct 2024 17:13:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 80CBC42E48; Fri, 4 Oct 2024 17:08:55 +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 1416442D7F for ; Fri, 4 Oct 2024 17:08:32 +0200 (CEST) Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02lp2047.outbound.protection.outlook.com [104.47.11.47]) by mx-outbound8-201.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 04 Oct 2024 15:08:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qh8GC26Y2l6TEMW2X6DZd0qAPHx1WSQeQYzkNLFYSfOImrYwO8PTK45gQe9+pM6z3Fv7VZcVnrTC1SODk8sJR3e5NhtBgY3GytHW92cwtIBf9+FbFC2y19sGiftj6KwCtusi/t/ThDaL1L21w91qsLu1S8rQYfowZUYS8ElIOAyZJDiMbB8rwkslSbSnr2DBu7JepHDq1q1Ih1Nzt1+kpvLOGFpSpMo1tSWocIOyprY1jNB6BslRhr6Nuao/FHbH6gdcArFLsXLxuGkq3zQIMhkR3DQfW7zMF9JUp21W4d+DT6ppje79k0IZHw/aFqwQcRcEAU3KOh16vtasmVFLCg== 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=Ct9zldZ8EWiYmb64kVVL2Qg8gqHSqIsyFWkz0xUtHYI3nQiwzt8hcCeTXaP+iGZPlgxMA0iVkv097guwusGeD2AV9pAteb/qyoQD54NdJ7uO2disDSQf5v5EiNewGc+0CvhuKU/Qa6ecLnyLdZD0puWKynztxuyiXjbKLVQuoOrXQrgYslJji0gtKPr11wf0DI+WFwrULFLvW2mRokEqvHKcaqnp5fbhISIxJP4goU0pXMGNSmSJ71j+/9I2V7SR5eLsGDVS+fLjN0YC5q9jGxf9gm9xSJ6P1azD58SJUlruTC0I0wq+/sbzXoGoMBbQJKKgBFMNFq5+BEtQagdbMg== 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=GPQX7kZRLArvdhP6SGrFTYIkBSjgRuodIckjf8mv437iMOvLjCdk4AbJ5R7Ve2ZXPP7A4h0Ha6VtnrMx0iYo6jTOqne7nWx5NXWfOhCUmt109J8sdmK8ic8pbMz8BLjL+2gxUcyntVH0OAhIvZTY3kAecddNK5aJqfN4JhB6fDY= Received: from AM0PR02CA0017.eurprd02.prod.outlook.com (2603:10a6:208:3e::30) by AM9P190MB1345.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:266::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.18; Fri, 4 Oct 2024 15:08:30 +0000 Received: from AMS0EPF000001AC.eurprd05.prod.outlook.com (2603:10a6:208:3e:cafe::e4) by AM0PR02CA0017.outlook.office365.com (2603:10a6:208:3e::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.18 via Frontend Transport; Fri, 4 Oct 2024 15:08:29 +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 AMS0EPF000001AC.mail.protection.outlook.com (10.167.16.152) with Microsoft SMTP Server id 15.20.7918.13 via Frontend Transport; Fri, 4 Oct 2024 15:08:29 +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 29/31] net/ntnic: add packet descriptor builder (PDB) FPGA module Date: Fri, 4 Oct 2024 17:07:22 +0200 Message-ID: <20241004150749.261020-36-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241004150749.261020-1-sil-plv@napatech.com> References: <20241004150749.261020-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF000001AC:EE_|AM9P190MB1345:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 0b92385e-fefa-4349-eda3-08dce48667e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?sG8K6Hluacz9jIA3b/iRUBp9yzONWmhxEggiSYCzplaU3NrewjDt+ZjxjY8A?= =?us-ascii?Q?vmRn8i1tMm1elz69LUH5+HrkJLrlAOUxu4/DbQQ/PmggCDvcjUDDiGGnLXwM?= =?us-ascii?Q?oXL3+kOxXcLVOfCuI2RRUioqhZI5+DLs4Gu5QDWD/EQH9B0I4sNWWs2/aEqr?= =?us-ascii?Q?8votJmpfcoD+mzbZkp2SEZ+hHKqE5lkjlMlTEVwRnb1g0LBw8LSJn142tl/7?= =?us-ascii?Q?PPPjVDZ6bz+uc0a/op7d1vK3orHUYzufReTEyIoAvzYb1V0Qbsb8g02Yp6vy?= =?us-ascii?Q?JT4vA9FehV2oDYIEY6tcxSYpJ/QV6i4s22gzG1BbMv37idAvqDYSU8hzZMdQ?= =?us-ascii?Q?WJoaW11dOKcqShbt+JGs3kPd6y8Xv9MEnOMXHY3Lb7KnxznMvwKzYK0tmHRg?= =?us-ascii?Q?Tv13de/+cmOKRfpo0BtjRMLAz7Aa0FuLHjLznzAyhQWnlVW3XVNW3YgKUfp+?= =?us-ascii?Q?RZH4B6TfJvqxwr7xZwaDOlSRi4W5q8f69EQOjuUZdjrRZIUIMJcqPiPhuE7p?= =?us-ascii?Q?iys8IhxxNUK+an6Tm195E2rZJDIAvKfahlUmeDQxPoDdHWwFzOHSnGNYXoHg?= =?us-ascii?Q?As3bwLd5k1jRh6tf5XqtskXu0EFrCHxQyUhr6hXyYrLph5lN2xQQKYd44d9E?= =?us-ascii?Q?bz6RFo3pWwIsiSTh6BEb8AcRUT/rgYhzEg25B52B7xIfMEe2x+cml98W9BbE?= =?us-ascii?Q?Jh9ziuiH/KrIoJW1Y5JJtXux99InGe63hKBWgRy5qHoxhLqyPs9QGigwT9PP?= =?us-ascii?Q?lPA79mxqZF2eiJLuQyTQHQthmbMWROYH384Te0zWsUijtrSNRF69vJ1IE+ux?= =?us-ascii?Q?9WknKLRE54bEkJDfClfu2aDzstF1DNLnN0R5hocdWQnXl6BbfCt29cLcHNEZ?= =?us-ascii?Q?LtL+1XZKW4daBSty7U6j6cnzqgV/4AwDBgp+vyfONfLQMQKx/1/BSqsgThw2?= =?us-ascii?Q?VG188uSdzTR97gBFBtLZ/n08xYPuSMlvOAs6++FYyJt0/f2YqualXA42jUcn?= =?us-ascii?Q?Vmr1VhsxNyEwFXdM/i9qIoKs8NgsFZwQuygOc3/0ahbrWp+zryANFyORZwXE?= =?us-ascii?Q?76tmUaPreO9lnncXbOZHjm58QU8+0IblZminp5/KJy00pHc3cEjWwYXoPO+R?= =?us-ascii?Q?LPhc0YKf8X0F05MhTX963gK0o6KxUPAOU3NByadF1Jy9TfFNHPsMlcCptxUr?= =?us-ascii?Q?F+HLGa/DangnADPknbS4AjaWSuxHWh8QLU+0r3Eax+lpoNYBYFum7xwvhvt+?= =?us-ascii?Q?LcNOrJdzfzkNUh5oWvSbhYroJt4HzkJ3j+j3ysDAjOCg100cDP/c47FYYfe4?= =?us-ascii?Q?QncL7awZm1g/NFF2JlII2frQBfqZBGmzzDG0uU6E/3e22LOHg1Ylo82fJe9M?= =?us-ascii?Q?nwIhPzv28/byxExOpZkt6pI+AWO+?= 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)(1800799024)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: WMt345SPV2ajM3aI0YD9xZGC5AvVIG+qlDjSUm7C4Kc8JDoO3qA0asnLW54spQeki2kV10bZ4Xu1fo1rE/WWK/BsYRbnnE0Apg8OoXzy1wgnypqCjU3IQ19p+Q4ITn1OzIYmlYmOtbUoTx1XaxV9UQ+X9muCPqFaA3Lusk+C2sT/Xnavt4/Ugd/Ndl5nYvvZfne8eVwrgKAEVyy/WVsC2hh35Zj+XL4xvOuUj2ymIWhirOL1VBRUYrSwzxBwE4bpA8oW6MR7MZIP7trtN/oLD3LHMo6r5Y+fCX9ruTvMhqm2qcry83WcDU3Nq135Xe1Rw+b9a+GVk4JCvKqWO4Jks8Qar7gGwiYlF7jWYLdqD+7AKCmqfyDlJYqAr4UnVzPB9Xh9Wx0UmHXCuRFP2BbdV99mPMIzNN+Y1zi+4z5DWwLWeKG/SzDJwxD62xqCCAjejET/O/oLHvuU4fEZhGcMp3eXTtjPxZUBV9o3bEyWVJQ+EOJHcg9qpUcdCS9lcZgQdnf2Lqbud7lc+a4YacsFTN1aA41d+ttRlRxjg5xYxGlFIkFeVI1WBzYWYn7GQ5H/VD7uwstHJhOYL4H+VXQM5/FKYEBJhQrduZu00NXevJbHP5CcONvqWojStvfbCwunKTsWVJL78gGYJfhuS8qZZQ== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2024 15:08:29.7829 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0b92385e-fefa-4349-eda3-08dce48667e6 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: AMS0EPF000001AC.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9P190MB1345 X-BESS-ID: 1728054511-302249-12645-31683-1 X-BESS-VER: 2019.1_20240924.1654 X-BESS-Apparent-Source-IP: 104.47.11.47 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.259494 [from cloudscan20-7.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