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 7064845AAF; Fri, 4 Oct 2024 17:13:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DFB5442E84; Fri, 4 Oct 2024 17:09:00 +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 736BE42D8C for ; Fri, 4 Oct 2024 17:08:34 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2105.outbound.protection.outlook.com [104.47.17.105]) by mx-outbound44-124.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 04 Oct 2024 15:08:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WV0s49DNLDbnMeEQeKHv7CJtYrz2xXmkqwWVsbeN7xXCZvzFPpZGoBdgOLMVIKXr2DZBJC6P8LGYYQVGh0tSYXJ5LLKat2c0PFtcrSh5+tmoi5cuKSdikoGB3zlqXsOOnA5cUonaJwtj/y9YydotJIv/l7rvEdTEhI6nHsYWAVdbr1eHIl6LWwsDfAdUp1MoSM1ZJYZceGioGFa5DtKvplHGlMezu4+HB+SvWdFwWt9X9o3jK+HAhW9yJ6oP5xCVVRgUf62jdz2Bbvs5k95J6XnCshxzofvRGxQI9JtkfTms5D+EWKBVvqLS9Tfru4cppeGUItX528k86Ri6USPvQA== 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=m7EsbddnTEzfze8bceOS5giOxKTQObkS2bk7iPi+jnc=; b=nx1tv0AffwSZTRmxrPOxw8IddiclTqFaa9aIWPP0+ZShIr30i7yoJ9MzauGWZInlz+QwNVGsOGbnr/n9NLDcQyBTxE1dsby+3sERlqiwKpNdPpbAa3IFVYhbgYw8roHQsdqLTKsQ0va7Vasofx3/iJvP/lh9s5j63wbduZUvcU5tHFKzRYkNSh7/pgcT275hciC6OugREqbDBCpu7Kgk5pDEcw9/s2VsdXtcAo2/FSdE0Nuet3m4ZmZdP71bhFK8J0Ch59Kw0HV6xscjlomzMFCOh2Dlk+InHFKv4bMAOluQk/HRceGa84IdARU3JoaoC3rGr9uGQXjk66C+2Gh37Q== 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=m7EsbddnTEzfze8bceOS5giOxKTQObkS2bk7iPi+jnc=; b=ne1ixq3V6pDZ4zn6gJJ6ONu7ICe3MBh8xAWDvLnVbdyJUjOwb+zkupIk4x3RtJhh6pZ9qcbmMfBPp4K0PEgsU8upqouU2GOSE35xBKdJYO/uI6FBVR3rItyVVFOfRxShBKugw4OtKMVAD696gH2sXKbNtwsJ2YEJHxyym9pgSLQ= Received: from AM0PR02CA0031.eurprd02.prod.outlook.com (2603:10a6:208:3e::44) by DB9P190MB1940.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:397::7) 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:27 +0000 Received: from AMS0EPF000001AC.eurprd05.prod.outlook.com (2603:10a6:208:3e:cafe::8a) by AM0PR02CA0031.outlook.office365.com (2603:10a6:208:3e::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.16 via Frontend Transport; Fri, 4 Oct 2024 15:08:27 +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: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 v1 26/31] net/ntnic: add hasher (HSH) FPGA module Date: Fri, 4 Oct 2024 17:07:19 +0200 Message-ID: <20241004150749.261020-33-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_|DB9P190MB1940:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: b8f0cd03-caba-477d-33c1-08dce486668d 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?ZcjF+STzRsoJtYFU6CQgWg9l5p2Hs93I9YJfuxAf93xCwCCJmkEniR74h7w2?= =?us-ascii?Q?LijT3rPDFLbFY4LwjjasPWziqqqmPywJ1qLwXijh3fYBabHrEd2bMR7Myzie?= =?us-ascii?Q?gnEg5+zMs16jDH0uG/rQNXUybyY2jNHitNkKKDnG0vIW9tPkPmO/SlmxJoCx?= =?us-ascii?Q?3cdapOLAFluxpkh8RSOKHdn1rifjnd/B/d7TuTYCyecx+nAchquaIBf825p1?= =?us-ascii?Q?ROz20nPgk4IWtJgAw+1I+/l00VQsPmu52C8pUm5iC+wzSml8qnmtBQFn+b2l?= =?us-ascii?Q?0nudRM08i+RtS3QGQW6sVBPvSiWg9nH40NNxKg110Ru4dmst67VSCypnjGQW?= =?us-ascii?Q?AaNvvjYjzMv6vW46FgDw/3c+z4MkV+phvdalVI5Qe9d1J5i7QXsEVYc+A5GN?= =?us-ascii?Q?kbSsApIM9bd4wxSZmcX6rMOhlNIwp5iR6UNYa5uydJfXeQ4k5M4S0lQC2ZfJ?= =?us-ascii?Q?HqhmzUuPaeb31MSLT73jyUcxBzFPCHMkkkjxHrp9Pz8mVbNtOQUsx4LwwdRZ?= =?us-ascii?Q?Q2eJkO/vnCG3od4YYQFCVGEHLUH18JWhKU9lEWPLDt8iHW6ZojjRpqqgtmYx?= =?us-ascii?Q?d5ZIZ/N+DopFeG6su0SzvHIrhNQrEluEGDcf/MhnmDjSUffKYOL4Ltfog7Wu?= =?us-ascii?Q?w0SSZxRTeM8QjtGLGJfYVb8TI17EZqQN1bB8lg+86WtcKMeGPpr0xl8z8aDP?= =?us-ascii?Q?vJFLnxRvyNAWF16QGMELruuRnT6KzTnkXf9IxJyyRf/31QCRochASJjNu6Ln?= =?us-ascii?Q?ftV3FUn0mIJX1+I6UE4foco9xIKQC9sSC+j2hYu1+fxIpgFZvN7ChydClBnD?= =?us-ascii?Q?QBWs4s/vkJgjsulVsLjaSD6iIZt1xAdZQdS1Icqc/WitB+xJfa444qwxBqOG?= =?us-ascii?Q?kZIeYbzmfrd7uT78vxtnvyy3nQzzM/p8xhXdK9ZMImOBM63AneAo6cYNf5wq?= =?us-ascii?Q?/BgaxznRGpillvY5TSC1sift3TqxvqA/eRyx5qYmJcXUaurRF3WAtV7RTreQ?= =?us-ascii?Q?Hr4lFoi0x19FlPGTa//9kYiix79xwYZ4bILpavZGzdc3HMf8RX/+B9jAwaie?= =?us-ascii?Q?mk6pkRaDbLt65cIau+5VuRM5EQDQyJY67abFp6mUhe/JwDgEtlBvKcgBkAt7?= =?us-ascii?Q?aNIuzX8dS9MtDWoV32KD2rXmK1j4uv20wek1ZCbMHr1IDPS3W285ZMJilKq1?= =?us-ascii?Q?8UlBU+gCBRIwgxW0kK7G+/ZyybxncwusUa4G4MideBDhCU0CTk84ux1o4guJ?= =?us-ascii?Q?vpsMOGEzE8MLkoZXQLoco2CWMH07qyvDy0dwsDj+pLyDpj45Hsj8mnEkMkMA?= =?us-ascii?Q?swHRH4hLgQzYqUzkyev8Q3Dug9ElnAnHQEEeCCCBum4LHO0XKa3LkUEyvFmQ?= =?us-ascii?Q?j3JUoeqPShh96ObURABEMY0vb3ek?= 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: 2qlulbvVPs6UwAk/Mf4mo+J44U6LigNRG5dv9g14zNH7t1beAIippm8fsIAdMpMMt8CnBorVjAJIduY9AmN30Z1xitr3eZ0I2Vy5co+USKYfyEYxD8u2lRlh4koXKDzudNhuYP8vIQrBiJ4vbVS+cZztwiioOTZ52l0TX8dCJdEPUavMfxQQxW2MDaDiQ+fMs6qMTH5kO3/Stl2+H14U8C3NMuOa5tKYTTuVPEBjnMgyNGknghS+gdLFJ15/6wMQexJ+NCNMHvYSTYYt03dSs6SfUtIB/NL6BSOp0nOPtNzVfn7bvhV1hQEJ1NAzstFE84YJXjv7IUC2oYRb6tFDufKe70EEx9UacZBIsvxN9oB+q2HLgizjLLZ4cZ2UCTYRButPSfcbqfD71Nl19vmIv5tKkGbyKQwHdcTBT2HO/XMsmJJ0wOXlPS+e1w/LTIWsi8a+VrMU0Ylmyp7kTFDHp0NPS+DFRrbkeSM3ZsT1z+RQLzO7J7rz+mQZeXWBwgxauKzlO8uPANDbTH2IGmPiP67t0r6f60peMNwWsCRfCWQj+jf49Db89m+QdnAmtYN1ptSaGM5QcwQF3xsbrQHYsmz00D/+jcrnP/QRABYl1y83vu54ekC8OkzlfF18UEXnzqhWTfKmN5zNhmCiLNtLDw== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2024 15:08:27.4391 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b8f0cd03-caba-477d-33c1-08dce486668d 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: DB9P190MB1940 X-BESS-ID: 1728054510-311388-12679-30404-2 X-BESS-VER: 2019.1_20240924.1654 X-BESS-Apparent-Source-IP: 104.47.17.105 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVpYGloZAVgZQMNHIKNU4NcnCMD XRzNQ01Twl0dTCOMnAMNnMMik5OTFRqTYWADt/UBNBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259494 [from cloudscan14-233.eu-central-1a.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 Hasher module calculates a configurable hash value to be used internally by the FPGA. The module support both Toeplitz and NT-hash. Signed-off-by: Oleksandr Kolomeiets --- drivers/net/ntnic/include/hw_mod_backend.h | 36 ++++++++ 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_hsh.c | 84 +++++++++++++++++++ .../supported/nthw_fpga_9563_055_049_0000.c | 39 ++++++++- 6 files changed, 163 insertions(+), 1 deletion(-) create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c diff --git a/drivers/net/ntnic/include/hw_mod_backend.h b/drivers/net/ntnic/include/hw_mod_backend.h index 3933d4bf53..6bf651272f 100644 --- a/drivers/net/ntnic/include/hw_mod_backend.h +++ b/drivers/net/ntnic/include/hw_mod_backend.h @@ -493,6 +493,41 @@ struct hsh_func_s { struct hw_mod_hsh_v5_s v5; }; }; +enum hw_hsh_e { + /* functions */ + HW_HSH_RCP_PRESET_ALL = 0, + HW_HSH_RCP_COMPARE, + HW_HSH_RCP_FIND, + /* fields */ + HW_HSH_RCP_LOAD_DIST_TYPE = FIELD_START_INDEX, + HW_HSH_RCP_MAC_PORT_MASK, + HW_HSH_RCP_SORT, + HW_HSH_RCP_QW0_PE, + HW_HSH_RCP_QW0_OFS, + HW_HSH_RCP_QW4_PE, + HW_HSH_RCP_QW4_OFS, + HW_HSH_RCP_W8_PE, + HW_HSH_RCP_W8_OFS, + HW_HSH_RCP_W8_SORT, + HW_HSH_RCP_W9_PE, + HW_HSH_RCP_W9_OFS, + HW_HSH_RCP_W9_SORT, + HW_HSH_RCP_W9_P, + HW_HSH_RCP_P_MASK, + HW_HSH_RCP_WORD_MASK, + HW_HSH_RCP_SEED, + HW_HSH_RCP_TNL_P, + HW_HSH_RCP_HSH_VALID, + HW_HSH_RCP_HSH_TYPE, + HW_HSH_RCP_TOEPLITZ, + HW_HSH_RCP_K, + HW_HSH_RCP_AUTO_IPV4_MASK +}; +bool hw_mod_hsh_present(struct flow_api_backend_s *be); +int hw_mod_hsh_alloc(struct flow_api_backend_s *be); +void hw_mod_hsh_free(struct flow_api_backend_s *be); +int hw_mod_hsh_reset(struct flow_api_backend_s *be); +int hw_mod_hsh_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count); struct qsl_func_s { COMMON_FUNC_INFO_S; @@ -685,6 +720,7 @@ struct flow_api_backend_s { struct cat_func_s cat; struct km_func_s km; struct flm_func_s flm; + struct hsh_func_s hsh; /* NIC attributes */ unsigned int num_phy_ports; diff --git a/drivers/net/ntnic/meson.build b/drivers/net/ntnic/meson.build index 9af7e3d813..18aafc57f0 100644 --- a/drivers/net/ntnic/meson.build +++ b/drivers/net/ntnic/meson.build @@ -51,6 +51,7 @@ sources = files( 'nthw/flow_api/hw_mod/hw_mod_backend.c', 'nthw/flow_api/hw_mod/hw_mod_cat.c', '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_filter/flow_nthw_cat.c', 'nthw/flow_filter/flow_nthw_csu.c', diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c b/drivers/net/ntnic/nthw/flow_api/flow_api.c index d39bdc9936..b43c8fef1a 100644 --- a/drivers/net/ntnic/nthw/flow_api/flow_api.c +++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c @@ -290,6 +290,9 @@ struct flow_nic_dev *flow_api_create(uint8_t adapter_no, const struct flow_api_b if (init_resource_elements(ndev, RES_KM_CATEGORY, ndev->be.km.nb_categories)) goto err_exit; + if (init_resource_elements(ndev, RES_HSH_RCP, ndev->be.hsh.nb_rcp)) + goto err_exit; + if (init_resource_elements(ndev, RES_SLC_LR_RCP, ndev->be.max_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 fe66493336..3ccc14c4ce 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 @@ -20,6 +20,7 @@ static const struct { { "CAT", hw_mod_cat_alloc, hw_mod_cat_free, hw_mod_cat_reset, hw_mod_cat_present }, { "KM", hw_mod_km_alloc, hw_mod_km_free, hw_mod_km_reset, hw_mod_km_present }, { "FLM", hw_mod_flm_alloc, hw_mod_flm_free, hw_mod_flm_reset, hw_mod_flm_present }, + { "HSH", hw_mod_hsh_alloc, hw_mod_hsh_free, hw_mod_hsh_reset, hw_mod_hsh_present }, }; #define MOD_COUNT (ARRAY_SIZE(module)) diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c new file mode 100644 index 0000000000..77dfbb5374 --- /dev/null +++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c @@ -0,0 +1,84 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2023 Napatech A/S + */ + +#include +#include +#include + +#include "hw_mod_backend.h" + +#define _MOD_ "HSH" +#define _VER_ be->hsh.ver + +bool hw_mod_hsh_present(struct flow_api_backend_s *be) +{ + return be->iface->get_hsh_present(be->be_dev); +} + +int hw_mod_hsh_alloc(struct flow_api_backend_s *be) +{ + int nb; + _VER_ = be->iface->get_hsh_version(be->be_dev); + NT_LOG(DBG, FILTER, "HSH MODULE VERSION %i.%i\n", VER_MAJOR(_VER_), VER_MINOR(_VER_)); + + /* detect number of HSH categories supported by FPGA */ + nb = be->iface->get_nb_hsh_categories(be->be_dev); + + if (nb <= 0) + return COUNT_ERROR(hsh_categories); + + be->hsh.nb_rcp = (uint32_t)nb; + + /* detect if Toeplitz hashing function is supported by FPGA */ + nb = be->iface->get_nb_hsh_toeplitz(be->be_dev); + + if (nb < 0) + return COUNT_ERROR(hsh_toeplitz); + + be->hsh.toeplitz = (uint32_t)nb; + + switch (_VER_) { + case 5: + if (!callocate_mod((struct common_func_s *)&be->hsh, 1, &be->hsh.v5.rcp, + be->hsh.nb_rcp, sizeof(struct hsh_v5_rcp_s))) + return -1; + + break; + + /* end case 5 */ + default: + return UNSUP_VER; + } + + return 0; +} + +void hw_mod_hsh_free(struct flow_api_backend_s *be) +{ + if (be->hsh.base) { + free(be->hsh.base); + be->hsh.base = NULL; + } +} + +int hw_mod_hsh_reset(struct flow_api_backend_s *be) +{ + /* Zero entire cache area */ + zero_module_cache((struct common_func_s *)(&be->hsh)); + + NT_LOG(DBG, FILTER, "INIT HSH RCP\n"); + return hw_mod_hsh_rcp_flush(be, 0, be->hsh.nb_rcp); +} + +int hw_mod_hsh_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count) +{ + if (count == ALL_ENTRIES) + count = be->hsh.nb_rcp; + + if ((start_idx + count) > (int)be->hsh.nb_rcp) + return INDEX_TOO_LARGE; + + return be->iface->hsh_rcp_flush(be->be_dev, &be->hsh, start_idx, count); +} 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 a003334a23..4317da8094 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 @@ -544,6 +544,42 @@ static nthw_fpga_register_init_s hif_registers[] = { { HIF_UUID3, 176, 32, NTHW_FPGA_REG_TYPE_RO, 462142918, 1, hif_uuid3_fields }, }; +static nthw_fpga_field_init_s hsh_rcp_ctrl_fields[] = { + { HSH_RCP_CTRL_ADR, 4, 0, 0x0000 }, + { HSH_RCP_CTRL_CNT, 16, 16, 0x0000 }, +}; + +static nthw_fpga_field_init_s hsh_rcp_data_fields[] = { + { HSH_RCP_DATA_AUTO_IPV4_MASK, 1, 742, 0x0000 }, + { HSH_RCP_DATA_HSH_TYPE, 5, 416, 0x0000 }, + { HSH_RCP_DATA_HSH_VALID, 1, 415, 0x0000 }, + { HSH_RCP_DATA_K, 320, 422, 0x0000 }, + { HSH_RCP_DATA_LOAD_DIST_TYPE, 2, 0, 0x0000 }, + { HSH_RCP_DATA_MAC_PORT_MASK, 2, 2, 0x0000 }, + { HSH_RCP_DATA_P_MASK, 1, 61, 0x0000 }, + { HSH_RCP_DATA_QW0_OFS, 8, 11, 0x0000 }, + { HSH_RCP_DATA_QW0_PE, 5, 6, 0x0000 }, + { HSH_RCP_DATA_QW4_OFS, 8, 24, 0x0000 }, + { HSH_RCP_DATA_QW4_PE, 5, 19, 0x0000 }, + { HSH_RCP_DATA_SEED, 32, 382, 0x0000 }, + { HSH_RCP_DATA_SORT, 2, 4, 0x0000 }, + { HSH_RCP_DATA_TNL_P, 1, 414, 0x0000 }, + { HSH_RCP_DATA_TOEPLITZ, 1, 421, 0x0000 }, + { HSH_RCP_DATA_W8_OFS, 8, 37, 0x0000 }, + { HSH_RCP_DATA_W8_PE, 5, 32, 0x0000 }, + { HSH_RCP_DATA_W8_SORT, 1, 45, 0x0000 }, + { HSH_RCP_DATA_W9_OFS, 8, 51, 0x0000 }, + { HSH_RCP_DATA_W9_P, 1, 60, 0x0000 }, + { HSH_RCP_DATA_W9_PE, 5, 46, 0x0000 }, + { HSH_RCP_DATA_W9_SORT, 1, 59, 0x0000 }, + { HSH_RCP_DATA_WORD_MASK, 320, 62, 0x0000 }, +}; + +static nthw_fpga_register_init_s hsh_registers[] = { + { HSH_RCP_CTRL, 0, 32, NTHW_FPGA_REG_TYPE_WO, 0, 2, hsh_rcp_ctrl_fields }, + { HSH_RCP_DATA, 1, 743, NTHW_FPGA_REG_TYPE_WO, 0, 23, hsh_rcp_data_fields }, +}; + static nthw_fpga_field_init_s iic_adr_fields[] = { { IIC_ADR_SLV_ADR, 7, 1, 0 }, }; @@ -1398,6 +1434,7 @@ static nthw_fpga_module_init_s fpga_modules[] = { gpio_phy_registers }, { MOD_HIF, 0, MOD_HIF, 0, 0, NTHW_FPGA_BUS_TYPE_PCI, 0, 18, hif_registers }, + { MOD_HSH, 0, MOD_HSH, 0, 5, NTHW_FPGA_BUS_TYPE_RAB1, 1536, 2, hsh_registers }, { MOD_IIC, 0, MOD_IIC, 0, 1, NTHW_FPGA_BUS_TYPE_RAB0, 768, 22, iic_registers }, { MOD_IIC, 1, MOD_IIC, 0, 1, NTHW_FPGA_BUS_TYPE_RAB0, 896, 22, iic_registers }, { MOD_IIC, 2, MOD_IIC, 0, 1, NTHW_FPGA_BUS_TYPE_RAB0, 24832, 22, iic_registers }, @@ -1580,5 +1617,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, 17, fpga_modules, + 200, 9563, 55, 49, 0, 0, 1726740521, 152, product_parameters, 18, fpga_modules, }; -- 2.45.0