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 0078B45B04; Thu, 10 Oct 2024 16:16:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CE5F40B92; Thu, 10 Oct 2024 16:14:51 +0200 (CEST) Received: from egress-ip11b.ess.de.barracuda.com (egress-ip11b.ess.de.barracuda.com [18.185.115.215]) by mails.dpdk.org (Postfix) with ESMTP id EE57F40698 for ; Thu, 10 Oct 2024 16:14:41 +0200 (CEST) Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03lp2112.outbound.protection.outlook.com [104.47.30.112]) by mx-outbound20-48.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 10 Oct 2024 14:14:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=o1pALaLAy8iIlJs7kEZVNzzbZkJM5u8x9OJQyMeb/MYe+h4XlCowKJL60cdpHKGEj7EtkxfG8m2S6uof83ccyRLv9SWN3O/gU36CFWddQyouV8/cuNyGI4HCm6moW82F+4X2M/auVRbi9SJTzcScp3BuhyH0YJhbz2zP+qAcWpn0rfIoXI++1d7Pa9PIP+Og5zBZr7cr7a19Rdl2c9whD5b8eP+5s+/bZrH0pHhHLf3zwMCW11tmdm3+b2zMOqGeymFrlqbbWB6pj3UbABg43gjoYSG6AC6rcNt5wPkGG1I2tVPE3Oqdjc0R3OMXBMP5rgEx8Kl49tTwwtEDm18TDA== 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=L64E2D1I5xHk88vSy3JjX9yXLRtnW9vO0IrCRF6cPng=; b=GAM+zvAYOOEjIH1VblKxIGyjwQLfFnkv4BjK7Y8Zb4u28kp8tXBKRAIjvw15VpDFDGTwkvg0dHqvz4/moVmoFnMsRJkJ1BJYsBgwzeETRp41w++HnRqhrNzcDQUUv5ItdU6rtYYlRUQiD/YjNBc7F/MgAQoi5cjfy4riQAOmVfxh3J6zLUpLMEBWzC1HsvUcq1513IFJyrkXx9kondXckp3AACHjblceGM26RlKwKhG91DG9rroxrOgtCtbKWUglshR3rIX0L/6PuK1u6SsxcNc/tFb81VSbJF62iLjWj5sq+/8IGDlJfDzO9DvCkKkow4PlcIAfOODUT7rE7BzUzA== 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=L64E2D1I5xHk88vSy3JjX9yXLRtnW9vO0IrCRF6cPng=; b=gdgRmbJQ36GYZ96kV0g1aKwtXNhiHv2/3NoBs4sKBPI8BS3x7Ya1Hw2yKds6AX1/WBN27gUdMuL0wynKemWWOu9WZk8XKhMkidn9p6v0p8THnHbnEKgzMZf++ehGkWbwhfwuXZqFaFpLB7GaPHpZJTpSYFNZPXEWwnA5/PoRTIo= Received: from DU2PR04CA0064.eurprd04.prod.outlook.com (2603:10a6:10:232::9) by AM9P190MB1156.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:26b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16; Thu, 10 Oct 2024 14:14:38 +0000 Received: from DU6PEPF0000B61B.eurprd02.prod.outlook.com (2603:10a6:10:232:cafe::77) by DU2PR04CA0064.outlook.office365.com (2603:10a6:10:232::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.17 via Frontend Transport; Thu, 10 Oct 2024 14:14:37 +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 DU6PEPF0000B61B.mail.protection.outlook.com (10.167.8.132) with Microsoft SMTP Server id 15.20.8048.13 via Frontend Transport; Thu, 10 Oct 2024 14:14:37 +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 15/50] net/ntnic: add hasher (HSH) flow module Date: Thu, 10 Oct 2024 16:13:30 +0200 Message-ID: <20241010141416.4063591-16-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241010141416.4063591-1-sil-plv@napatech.com> References: <20241006203728.330792-2-sil-plv@napatech.com> <20241010141416.4063591-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU6PEPF0000B61B:EE_|AM9P190MB1156:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: f69fe474-933c-40b2-0248-08dce935dffc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?GSpaIgcI59GC7P1znd55P8lQJ32z9r8d/d/RDBt363GELpHD0vze5VpppruH?= =?us-ascii?Q?cPT1N4J7iqEJaw+ukEiHyqsjB/72hxMhbWpIhwJG8rpwsuP5g2MCQrH+HO7Z?= =?us-ascii?Q?5tC1gGxM8UtMs4J4kUpuWfJL3sLFs24lXFXF3yJcYo8cfp1oy3XS48k8T3wY?= =?us-ascii?Q?I7fqFFYljFm2PZWrvY8QQqi9X2S9OD/RPXSivcn2eHypYgzCVnJ0/r6MbiNs?= =?us-ascii?Q?EZskSsBIVuKgAhB5zLmRI27yKj5TmnXGnZkDmeXKZSVMdkWBmINRwlt0em7L?= =?us-ascii?Q?oCB0LFWtCaSkKdYZrQzHjUMsZ05f7kncSLnrB0gubUY2aqDFOezvs4QKNZiJ?= =?us-ascii?Q?iuisXZvF84bmwNNLKBiosws1d7WXR74axE4b0I+20Y2nPhKXl4Gz7HWKWlIA?= =?us-ascii?Q?P7plngtyUCMmWq8Y06AHiw1Lyl8Vgdyc3IoarUyUO0Wd+jlTHwnwA1UKPm6L?= =?us-ascii?Q?so3ifpbZ22mIBiiLoogzN9Z2EdLiMX+8/ubD/jKY676ckM5nqd0B4k+YZ/aO?= =?us-ascii?Q?InnJgCZ4Uh6gUwMjxXvcfVnsScjs9eBGtkz1ZgX+14w57426AX9N0BQZjKbP?= =?us-ascii?Q?SKG+rZW7xLmNkoqvx9xwnGl5cOPLaJbFjWT/v9fyNJBw5PFAeAOPcyVz0W5d?= =?us-ascii?Q?tTLsR6tkB8+rwyVbZ35W6U3+esRq6RCKr4ClAS/tva1ffukBNIPqq2922KqX?= =?us-ascii?Q?AIjcqVdfhotKLjw7cnoFIl53xitqhpRk7SHZlXhKdxUs5FMKCL9euJwV9pEC?= =?us-ascii?Q?lHOVCpdnKCs7ToA6Y/V/EnXKy/JpSubxCq2qpGncyYh1RT5Hl7TM6PIQ9vdn?= =?us-ascii?Q?LGHkAbeMvcbpZ3iClms+gMMhB/BzfSUJsrPvyG0WIMpiZkgfRxUk/wOIA53Z?= =?us-ascii?Q?moOltqcwEInAZryhCFXSNkOk2jOAhgntvOoMl7BQI7ap6B5m2DduCaDaQt4h?= =?us-ascii?Q?OVSOyL8v52fGVlOvYzInUZdRMDb1nLwPxXeaxgCNeCKrwA5lsxI0dRSC0B2C?= =?us-ascii?Q?zt7cxFODyTnfpc2IACCvW+fhi45lPEIDCy8XzQPd8pPlPexevB0OhDRht0Y0?= =?us-ascii?Q?vQL2gbNnqkPt7abjwB9sfYILieHnrlBhCQdntYGZsDF4oP/QFaXYTbQM3E4C?= =?us-ascii?Q?cQKIHiylfPnQP2qDM9MUoqWqKkjP/3vwH5EQF0fcExTWCMwvQ9A2+HA9aY6l?= =?us-ascii?Q?d/BX/od+omyfe6+zmqtFuPVTDFtK0s3Zjupb+CNfMY5eex91vFpk3ppaQAMC?= =?us-ascii?Q?oCJTx6NbMLBcXTSyqDx20fnmYaEQN0DQG/oRjAoTCS3OV1+KF83v7PnuO+Pi?= =?us-ascii?Q?MYGfSBAooVjGlpgNAIiuP7cHeR7iVyw+NYtzjcOXIxh9+HhnB7MDUZki5KZO?= =?us-ascii?Q?WPwOC/r3oG3EQEWKG0kTr+dheYCX?= 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)(36860700013)(1800799024); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 8Qc9Eig8Um6y9+Y5GBtnUG6Xl3Gahm5UC1lsxv8QBTy+pewRih49It6Ri0Y3CKjscqqZ7KPUrMcpntVBqBIJSmonPkWakElVf3cDT8eQUfM7xIr/Z+9RCJPdX+wUVuSYgcPm8AfZdYdXsjSIlE9OJy6xKAaUDJv3+zPLsDoakmObqU3tFPG1oQN47vofHK04rqAZecfyrl0aMuZ9vOHztg8kiQz9fnNL6A94HreFNJjnFT6Xnu52EO0t2ZQaWirTALtAetPXOpjfcBwJCOY0MlEWtQTKa1Nc1tZyu7hq49O6paNxm53iOLAYgwuh7Wr/nkN+TLFY6koUPhvZB40/lMlz3im419UG8JGwWGPXYYWgfD5HYN8MzJjQdFO4aW01pCgX/UAX++195WrgHag2y6QUMczb+p4OS8NeBhu2QghH2RGjiCIPrn+FN6RtEha7qZATh0tgdErapRQCKEg8tn3RjxYyeXikeab7MI5pP+O8PJh9JA5pyPtjT0gQabSBnPBsydyo2lh8aU8leQa6sMTtaeW46//nfTw+Hx0SfurvQXqYNYdjveeW0wSHiTkgljUS9xWTdRpH0ZV4GebnqomXPjscZ5HObQbHhzERmRkxEPuF7YuxU3DjJc7x23l07Lwo/Z2PDdq7+smOydEEfN6hx93lOqFPdF82AmSVi/c= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2024 14:14:37.7328 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f69fe474-933c-40b2-0248-08dce935dffc 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: DU6PEPF0000B61B.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9P190MB1156 X-BESS-ID: 1728569680-305168-12641-25853-1 X-BESS-VER: 2019.1_20241004.2057 X-BESS-Apparent-Source-IP: 104.47.30.112 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVkYmxmZGQGYGUNTcxMQkLcUg2c TIIsnC3CIlydjC0MLS0Ngk1dLc1MTQVKk2FgA6olXFQgAAAA== X-BESS-Outbound-Spam-Score: 1.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259630 [from cloudscan18-244.eu-central-1b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.50 BSF_RULE_7582B META: Custom Rule 7582B 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=1.00 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, BSF_RULE_7582B, 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 --- v3 * Remove newline characters from logs. --- drivers/net/ntnic/include/hw_mod_backend.h | 16 ++ drivers/net/ntnic/include/hw_mod_hsh_v5.h | 46 ++++ drivers/net/ntnic/meson.build | 1 + .../nthw/flow_api/flow_backend/flow_backend.c | 80 ++++++ .../ntnic/nthw/flow_filter/flow_nthw_hsh.c | 260 ++++++++++++++++++ .../ntnic/nthw/flow_filter/flow_nthw_hsh.h | 87 ++++++ .../ntnic/nthw/supported/nthw_fpga_mod_defs.h | 1 + .../ntnic/nthw/supported/nthw_fpga_reg_defs.h | 1 + .../nthw/supported/nthw_fpga_reg_defs_hsh.h | 50 ++++ 9 files changed, 542 insertions(+) create mode 100644 drivers/net/ntnic/include/hw_mod_hsh_v5.h create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_hsh.h diff --git a/drivers/net/ntnic/include/hw_mod_backend.h b/drivers/net/ntnic/include/hw_mod_backend.h index 133a61fe9c..a4c3336e13 100644 --- a/drivers/net/ntnic/include/hw_mod_backend.h +++ b/drivers/net/ntnic/include/hw_mod_backend.h @@ -12,6 +12,7 @@ #include "hw_mod_cat_v21.h" #include "hw_mod_flm_v25.h" #include "hw_mod_km_v7.h" +#include "hw_mod_hsh_v5.h" #define MAX_PHYS_ADAPTERS 8 @@ -75,6 +76,16 @@ struct flm_func_s { }; }; +struct hsh_func_s { + COMMON_FUNC_INFO_S; + uint32_t nb_rcp;/* number of HSH recipes supported by FPGA */ + /* indication if Toeplitz is supported by FPGA, i.e. 0 - unsupported, 1 - supported */ + uint32_t toeplitz; + union { + struct hw_mod_hsh_v5_s v5; + }; +}; + enum debug_mode_e { FLOW_BACKEND_DEBUG_MODE_NONE = 0x0000, FLOW_BACKEND_DEBUG_MODE_WRITE = 0x0001 @@ -180,6 +191,11 @@ struct flow_api_backend_ops { uint32_t *inf_data, uint32_t inf_size, uint32_t *inf_word_cnt, uint32_t *sta_data, uint32_t sta_size, uint32_t *sta_word_cnt); + + /* HSH */ + bool (*get_hsh_present)(void *dev); + uint32_t (*get_hsh_version)(void *dev); + int (*hsh_rcp_flush)(void *dev, const struct hsh_func_s *hsh, int category, int cnt); }; struct flow_api_backend_s { diff --git a/drivers/net/ntnic/include/hw_mod_hsh_v5.h b/drivers/net/ntnic/include/hw_mod_hsh_v5.h new file mode 100644 index 0000000000..cdab15e6c2 --- /dev/null +++ b/drivers/net/ntnic/include/hw_mod_hsh_v5.h @@ -0,0 +1,46 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2023 Napatech A/S + */ + +#ifndef _HW_MOD_HSH_V5_H_ +#define _HW_MOD_HSH_V5_H_ + +#include + +#define HSH_RCP_MAC_PORT_MASK_SIZE 4 +#define HSH_RCP_WORD_MASK_SIZE 10 +/* Toeplitz hash key size in 32-bit words, e.g. 10 words means 320 bits, i.e. 40 Bytes */ +#define HSH_RCP_KEY_SIZE 10 + +struct hsh_v5_rcp_s { + uint32_t load_dist_type; + uint32_t mac_port_mask[HSH_RCP_MAC_PORT_MASK_SIZE]; + uint32_t sort; + uint32_t qw0_pe; + int32_t qw0_ofs; + uint32_t qw4_pe; + int32_t qw4_ofs; + uint32_t w8_pe; + int32_t w8_ofs; + uint32_t w8_sort; + uint32_t w9_pe; + int32_t w9_ofs; + uint32_t w9_sort; + uint32_t w9_p; + uint32_t p_mask; + uint32_t word_mask[HSH_RCP_WORD_MASK_SIZE]; + uint32_t seed; + uint32_t tnl_p; + uint32_t hsh_valid; + uint32_t hsh_type; + uint32_t toeplitz; /* Toeplitz enabled / disabled */ + uint32_t k[HSH_RCP_KEY_SIZE]; /* Toeplitz hash key */ + uint32_t auto_ipv4_mask; +}; + +struct hw_mod_hsh_v5_s { + struct hsh_v5_rcp_s *rcp; +}; + +#endif /* _HW_MOD_HSH_V5_H_ */ diff --git a/drivers/net/ntnic/meson.build b/drivers/net/ntnic/meson.build index 1ca34d8b47..de6777f4d3 100644 --- a/drivers/net/ntnic/meson.build +++ b/drivers/net/ntnic/meson.build @@ -48,6 +48,7 @@ sources = files( 'nthw/flow_api/flow_filter.c', 'nthw/flow_filter/flow_nthw_cat.c', 'nthw/flow_filter/flow_nthw_flm.c', + 'nthw/flow_filter/flow_nthw_hsh.c', 'nthw/flow_filter/flow_nthw_ifr.c', 'nthw/flow_filter/flow_nthw_info.c', 'nthw/flow_filter/flow_nthw_km.c', diff --git a/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c b/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c index 2cf60ab11a..de72c63b2f 100644 --- a/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c +++ b/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c @@ -10,6 +10,7 @@ #include "flow_nthw_cat.h" #include "flow_nthw_km.h" #include "flow_nthw_flm.h" +#include "flow_nthw_hsh.h" #include "ntnic_mod_reg.h" #include "nthw_fpga_model.h" #include "hw_mod_backend.h" @@ -28,6 +29,7 @@ static struct backend_dev_s { struct cat_nthw *p_cat_nthw; struct km_nthw *p_km_nthw; struct flm_nthw *p_flm_nthw; + struct hsh_nthw *p_hsh_nthw; struct ifr_nthw *p_ifr_nthw; /* TPE module */ } be_devs[MAX_PHYS_ADAPTERS]; @@ -1260,6 +1262,69 @@ static int flm_inf_sta_data_update(void *be_dev, const struct flm_func_s *flm, u return ret; } +/* + * HSH + */ + +static bool hsh_get_present(void *be_dev) +{ + struct backend_dev_s *be = (struct backend_dev_s *)be_dev; + return be->p_hsh_nthw != NULL; +} + +static uint32_t hsh_get_version(void *be_dev) +{ + struct backend_dev_s *be = (struct backend_dev_s *)be_dev; + return (uint32_t)((nthw_module_get_major_version(be->p_hsh_nthw->m_hsh) << 16) | + (nthw_module_get_minor_version(be->p_hsh_nthw->m_hsh) & 0xffff)); +} + +static int hsh_rcp_flush(void *be_dev, const struct hsh_func_s *hsh, int category, int cnt) +{ + struct backend_dev_s *be = (struct backend_dev_s *)be_dev; + CHECK_DEBUG_ON(be, hsh, be->p_hsh_nthw); + + if (hsh->ver == 5) { + hsh_nthw_rcp_cnt(be->p_hsh_nthw, 1); + + for (int i = 0; i < cnt; i++) { + hsh_nthw_rcp_select(be->p_hsh_nthw, category + i); + hsh_nthw_rcp_load_dist_type(be->p_hsh_nthw, + hsh->v5.rcp[category + i].load_dist_type); + hsh_nthw_rcp_mac_port_mask(be->p_hsh_nthw, + hsh->v5.rcp[category + i].mac_port_mask); + hsh_nthw_rcp_sort(be->p_hsh_nthw, hsh->v5.rcp[category + i].sort); + hsh_nthw_rcp_qw0_pe(be->p_hsh_nthw, hsh->v5.rcp[category + i].qw0_pe); + hsh_nthw_rcp_qw0_ofs(be->p_hsh_nthw, hsh->v5.rcp[category + i].qw0_ofs); + hsh_nthw_rcp_qw4_pe(be->p_hsh_nthw, hsh->v5.rcp[category + i].qw4_pe); + hsh_nthw_rcp_qw4_ofs(be->p_hsh_nthw, hsh->v5.rcp[category + i].qw4_ofs); + hsh_nthw_rcp_w8_pe(be->p_hsh_nthw, hsh->v5.rcp[category + i].w8_pe); + hsh_nthw_rcp_w8_ofs(be->p_hsh_nthw, hsh->v5.rcp[category + i].w8_ofs); + hsh_nthw_rcp_w8_sort(be->p_hsh_nthw, hsh->v5.rcp[category + i].w8_sort); + hsh_nthw_rcp_w9_pe(be->p_hsh_nthw, hsh->v5.rcp[category + i].w9_pe); + hsh_nthw_rcp_w9_ofs(be->p_hsh_nthw, hsh->v5.rcp[category + i].w9_ofs); + hsh_nthw_rcp_w9_sort(be->p_hsh_nthw, hsh->v5.rcp[category + i].w9_sort); + hsh_nthw_rcp_w9_p(be->p_hsh_nthw, hsh->v5.rcp[category + i].w9_p); + hsh_nthw_rcp_p_mask(be->p_hsh_nthw, hsh->v5.rcp[category + i].p_mask); + hsh_nthw_rcp_word_mask(be->p_hsh_nthw, + hsh->v5.rcp[category + i].word_mask); + hsh_nthw_rcp_seed(be->p_hsh_nthw, hsh->v5.rcp[category + i].seed); + hsh_nthw_rcp_tnl_p(be->p_hsh_nthw, hsh->v5.rcp[category + i].tnl_p); + hsh_nthw_rcp_hsh_valid(be->p_hsh_nthw, + hsh->v5.rcp[category + i].hsh_valid); + hsh_nthw_rcp_hsh_type(be->p_hsh_nthw, hsh->v5.rcp[category + i].hsh_type); + hsh_nthw_rcp_toeplitz(be->p_hsh_nthw, hsh->v5.rcp[category + i].toeplitz); + hsh_nthw_rcp_k(be->p_hsh_nthw, hsh->v5.rcp[category + i].k); + hsh_nthw_rcp_auto_ipv4_mask(be->p_hsh_nthw, + hsh->v5.rcp[category + i].auto_ipv4_mask); + hsh_nthw_rcp_flush(be->p_hsh_nthw); + } + } + + CHECK_DEBUG_OFF(hsh, be->p_hsh_nthw); + return 0; +} + /* * DBS */ @@ -1369,6 +1434,10 @@ const struct flow_api_backend_ops flow_be_iface = { flm_stat_update, flm_lrn_data_flush, flm_inf_sta_data_update, + + hsh_get_present, + hsh_get_version, + hsh_rcp_flush, }; const struct flow_api_backend_ops *bin_flow_backend_init(nthw_fpga_t *p_fpga, void **dev) @@ -1419,6 +1488,16 @@ const struct flow_api_backend_ops *bin_flow_backend_init(nthw_fpga_t *p_fpga, vo be_devs[physical_adapter_no].p_ifr_nthw = NULL; } + /* Init nthw HSH */ + if (hsh_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) { + struct hsh_nthw *phshnthw = hsh_nthw_new(); + hsh_nthw_init(phshnthw, p_fpga, physical_adapter_no); + be_devs[physical_adapter_no].p_hsh_nthw = phshnthw; + + } else { + be_devs[physical_adapter_no].p_hsh_nthw = NULL; + } + be_devs[physical_adapter_no].adapter_no = physical_adapter_no; *dev = (void *)&be_devs[physical_adapter_no]; @@ -1432,6 +1511,7 @@ static void bin_flow_backend_done(void *dev) cat_nthw_delete(be_dev->p_cat_nthw); km_nthw_delete(be_dev->p_km_nthw); flm_nthw_delete(be_dev->p_flm_nthw); + hsh_nthw_delete(be_dev->p_hsh_nthw); } static const struct flow_backend_ops ops = { diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c new file mode 100644 index 0000000000..80ead2729a --- /dev/null +++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c @@ -0,0 +1,260 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2023 Napatech A/S + */ + +#include +#include + +#include "ntlog.h" + +#include "nthw_drv.h" +#include "nthw_register.h" + +#include "flow_nthw_hsh.h" + +void hsh_nthw_set_debug_mode(struct hsh_nthw *p, unsigned int n_debug_mode) +{ + nthw_module_set_debug_mode(p->m_hsh, n_debug_mode); +} + +struct hsh_nthw *hsh_nthw_new(void) +{ + struct hsh_nthw *p = malloc(sizeof(struct hsh_nthw)); + + if (p) + (void)memset(p, 0, sizeof(*p)); + + return p; +} + +void hsh_nthw_delete(struct hsh_nthw *p) +{ + if (p) { + (void)memset(p, 0, sizeof(*p)); + free(p); + } +} + +int hsh_nthw_init(struct hsh_nthw *p, nthw_fpga_t *p_fpga, int n_instance) +{ + const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str; + nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_HSH, n_instance); + assert(n_instance >= 0 && n_instance < 256); + + if (p == NULL) + return p_mod == NULL ? -1 : 0; + + if (p_mod == NULL) { + NT_LOG(ERR, NTHW, "%s: Hsh %d: no such instance", p_adapter_id_str, n_instance); + return -1; + } + + p->mp_fpga = p_fpga; + p->m_physical_adapter_no = (uint8_t)n_instance; + p->m_hsh = p_mod; + + /* RCP */ + p->mp_rcp_ctrl = nthw_module_get_register(p->m_hsh, HSH_RCP_CTRL); + p->mp_rcp_addr = nthw_register_get_field(p->mp_rcp_ctrl, HSH_RCP_CTRL_ADR); + p->mp_rcp_cnt = nthw_register_get_field(p->mp_rcp_ctrl, HSH_RCP_CTRL_CNT); + p->mp_rcp_data = nthw_module_get_register(p->m_hsh, HSH_RCP_DATA); + p->mp_rcp_data_load_dist_type = + nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_LOAD_DIST_TYPE); + p->mp_rcp_data_mac_port_mask = + nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_MAC_PORT_MASK); + p->mp_rcp_data_sort = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_SORT); + p->mp_rcp_data_qw0_pe = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_QW0_PE); + p->mp_rcp_data_qw0_ofs = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_QW0_OFS); + p->mp_rcp_data_qw4_pe = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_QW4_PE); + p->mp_rcp_data_qw4_ofs = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_QW4_OFS); + p->mp_rcp_data_w8_pe = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_W8_PE); + p->mp_rcp_data_w8_ofs = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_W8_OFS); + p->mp_rcp_data_w8_sort = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_W8_SORT); + p->mp_rcp_data_w9_pe = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_W9_PE); + p->mp_rcp_data_w9_ofs = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_W9_OFS); + p->mp_rcp_data_w9_sort = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_W9_SORT); + p->mp_rcp_data_w9_p = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_W9_P); + p->mp_rcp_data_p_mask = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_P_MASK); + p->mp_rcp_data_word_mask = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_WORD_MASK); + p->mp_rcp_data_seed = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_SEED); + p->mp_rcp_data_tnl_p = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_TNL_P); + p->mp_rcp_data_hsh_valid = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_HSH_VALID); + p->mp_rcp_data_hsh_type = nthw_register_get_field(p->mp_rcp_data, HSH_RCP_DATA_HSH_TYPE); + p->mp_rcp_data_toeplitz = nthw_register_query_field(p->mp_rcp_data, HSH_RCP_DATA_TOEPLITZ); + p->mp_rcp_data_k = nthw_register_query_field(p->mp_rcp_data, HSH_RCP_DATA_K); + p->mp_rcp_data_auto_ipv4_mask = + nthw_register_query_field(p->mp_rcp_data, HSH_RCP_DATA_AUTO_IPV4_MASK); + + /* Init */ + uint32_t val[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + nthw_field_set_val32(p->mp_rcp_addr, 0); + nthw_field_set_val32(p->mp_rcp_cnt, 1); + + nthw_field_set_val32(p->mp_rcp_data_load_dist_type, 0); + nthw_field_set_val(p->mp_rcp_data_mac_port_mask, val, + p->mp_rcp_data_mac_port_mask->mn_words); + nthw_field_set_val32(p->mp_rcp_data_sort, 0); + nthw_field_set_val32(p->mp_rcp_data_qw0_pe, 0); + nthw_field_set_val32(p->mp_rcp_data_qw0_ofs, 0); + nthw_field_set_val32(p->mp_rcp_data_qw4_pe, 0); + nthw_field_set_val32(p->mp_rcp_data_qw4_ofs, 0); + nthw_field_set_val32(p->mp_rcp_data_w8_pe, 0); + nthw_field_set_val32(p->mp_rcp_data_w8_ofs, 0); + nthw_field_set_val32(p->mp_rcp_data_w8_sort, 0); + nthw_field_set_val32(p->mp_rcp_data_w9_pe, 0); + nthw_field_set_val32(p->mp_rcp_data_w9_ofs, 0); + nthw_field_set_val32(p->mp_rcp_data_w9_sort, 0); + nthw_field_set_val32(p->mp_rcp_data_w9_p, 0); + nthw_field_set_val(p->mp_rcp_data_word_mask, val, 10); + nthw_field_set_val32(p->mp_rcp_data_seed, 0); + nthw_field_set_val32(p->mp_rcp_data_tnl_p, 0); + nthw_field_set_val32(p->mp_rcp_data_hsh_valid, 0); + nthw_field_set_val32(p->mp_rcp_data_hsh_type, 31); + + if (p->mp_rcp_data_toeplitz) + nthw_field_set_val32(p->mp_rcp_data_toeplitz, 0); + + if (p->mp_rcp_data_k) + nthw_field_set_val(p->mp_rcp_data_k, val, 10); + + nthw_register_flush(p->mp_rcp_ctrl, 1); + nthw_register_flush(p->mp_rcp_data, 1); + + return 0; +} + +void hsh_nthw_rcp_select(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_addr, val); +} + +void hsh_nthw_rcp_cnt(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_cnt, val); +} + +void hsh_nthw_rcp_load_dist_type(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_load_dist_type, val); +} + +void hsh_nthw_rcp_mac_port_mask(const struct hsh_nthw *p, uint32_t *val) +{ + nthw_field_set_val(p->mp_rcp_data_mac_port_mask, val, + p->mp_rcp_data_mac_port_mask->mn_words); +} + +void hsh_nthw_rcp_sort(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_sort, val); +} + +void hsh_nthw_rcp_qw0_pe(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_qw0_pe, val); +} + +void hsh_nthw_rcp_qw0_ofs(const struct hsh_nthw *p, int32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_qw0_ofs, val); +} + +void hsh_nthw_rcp_qw4_pe(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_qw4_pe, val); +} + +void hsh_nthw_rcp_qw4_ofs(const struct hsh_nthw *p, int32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_qw4_ofs, val); +} + +void hsh_nthw_rcp_w8_pe(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_w8_pe, val); +} + +void hsh_nthw_rcp_w8_ofs(const struct hsh_nthw *p, int32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_w8_ofs, val); +} + +void hsh_nthw_rcp_w8_sort(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_w8_sort, val); +} + +void hsh_nthw_rcp_w9_pe(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_w9_pe, val); +} + +void hsh_nthw_rcp_w9_ofs(const struct hsh_nthw *p, int32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_w9_ofs, val); +} + +void hsh_nthw_rcp_w9_sort(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_w9_sort, val); +} + +void hsh_nthw_rcp_w9_p(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_w9_p, val); +} + +void hsh_nthw_rcp_p_mask(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_p_mask, val); +} + +void hsh_nthw_rcp_word_mask(const struct hsh_nthw *p, uint32_t *val) +{ + nthw_field_set_val(p->mp_rcp_data_word_mask, val, 10); +} + +void hsh_nthw_rcp_seed(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_seed, val); +} + +void hsh_nthw_rcp_tnl_p(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_tnl_p, val); +} + +void hsh_nthw_rcp_hsh_valid(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_hsh_valid, val); +} + +void hsh_nthw_rcp_hsh_type(const struct hsh_nthw *p, uint32_t val) +{ + nthw_field_set_val32(p->mp_rcp_data_hsh_type, val); +} + +void hsh_nthw_rcp_toeplitz(const struct hsh_nthw *p, uint32_t val) +{ + if (p->mp_rcp_data_toeplitz) + nthw_field_set_val32(p->mp_rcp_data_toeplitz, val); +} + +void hsh_nthw_rcp_k(const struct hsh_nthw *p, uint32_t *val) +{ + if (p->mp_rcp_data_k) + nthw_field_set_val(p->mp_rcp_data_k, val, 10); +} + +void hsh_nthw_rcp_auto_ipv4_mask(const struct hsh_nthw *p, uint32_t val) +{ + if (p->mp_rcp_data_auto_ipv4_mask) + nthw_field_set_val32(p->mp_rcp_data_auto_ipv4_mask, val); +} + +void hsh_nthw_rcp_flush(const struct hsh_nthw *p) +{ + nthw_register_flush(p->mp_rcp_ctrl, 1); + nthw_register_flush(p->mp_rcp_data, 1); +} diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h new file mode 100644 index 0000000000..70626122e3 --- /dev/null +++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h @@ -0,0 +1,87 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2023 Napatech A/S + */ + +#ifndef __FLOW_NTHW_HSH_H__ +#define __FLOW_NTHW_HSH_H__ + +#include + +#include "nthw_fpga_model.h" + +struct hsh_nthw; + +typedef struct hsh_nthw hsh_nthw_t; + +struct hsh_nthw *hsh_nthw_new(void); +void hsh_nthw_delete(struct hsh_nthw *p); +int hsh_nthw_init(struct hsh_nthw *p, nthw_fpga_t *p_fpga, int n_instance); + +int hsh_nthw_setup(struct hsh_nthw *p, int n_idx, int n_idx_cnt); +void hsh_nthw_set_debug_mode(struct hsh_nthw *p, unsigned int n_debug_mode); + +/* RCP */ +void hsh_nthw_rcp_select(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_cnt(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_load_dist_type(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_mac_port_mask(const struct hsh_nthw *p, uint32_t *val); +void hsh_nthw_rcp_sort(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_qw0_pe(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_qw0_ofs(const struct hsh_nthw *p, int32_t val); +void hsh_nthw_rcp_qw4_pe(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_qw4_ofs(const struct hsh_nthw *p, int32_t val); +void hsh_nthw_rcp_w8_pe(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_w8_ofs(const struct hsh_nthw *p, int32_t val); +void hsh_nthw_rcp_w8_sort(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_w9_pe(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_w9_ofs(const struct hsh_nthw *p, int32_t val); +void hsh_nthw_rcp_w9_sort(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_w9_p(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_p_mask(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_word_mask(const struct hsh_nthw *p, uint32_t *val); +void hsh_nthw_rcp_seed(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_tnl_p(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_hsh_valid(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_hsh_type(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_toeplitz(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_k(const struct hsh_nthw *p, uint32_t *val); +void hsh_nthw_rcp_auto_ipv4_mask(const struct hsh_nthw *p, uint32_t val); +void hsh_nthw_rcp_flush(const struct hsh_nthw *p); + +struct hsh_nthw { + uint8_t m_physical_adapter_no; + nthw_fpga_t *mp_fpga; + + nthw_module_t *m_hsh; + + nthw_register_t *mp_rcp_ctrl; + nthw_field_t *mp_rcp_addr; + nthw_field_t *mp_rcp_cnt; + nthw_register_t *mp_rcp_data; + nthw_field_t *mp_rcp_data_load_dist_type; + nthw_field_t *mp_rcp_data_mac_port_mask; + nthw_field_t *mp_rcp_data_sort; + nthw_field_t *mp_rcp_data_qw0_pe; + nthw_field_t *mp_rcp_data_qw0_ofs; + nthw_field_t *mp_rcp_data_qw4_pe; + nthw_field_t *mp_rcp_data_qw4_ofs; + nthw_field_t *mp_rcp_data_w8_pe; + nthw_field_t *mp_rcp_data_w8_ofs; + nthw_field_t *mp_rcp_data_w8_sort; + nthw_field_t *mp_rcp_data_w9_pe; + nthw_field_t *mp_rcp_data_w9_ofs; + nthw_field_t *mp_rcp_data_w9_sort; + nthw_field_t *mp_rcp_data_w9_p; + nthw_field_t *mp_rcp_data_p_mask; + nthw_field_t *mp_rcp_data_word_mask; + nthw_field_t *mp_rcp_data_seed; + nthw_field_t *mp_rcp_data_tnl_p; + nthw_field_t *mp_rcp_data_hsh_valid; + nthw_field_t *mp_rcp_data_hsh_type; + nthw_field_t *mp_rcp_data_toeplitz; + nthw_field_t *mp_rcp_data_k; + nthw_field_t *mp_rcp_data_auto_ipv4_mask; +}; + +#endif /* __FLOW_NTHW_HSH_H__ */ 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 6b2b5334da..a929a98b52 100644 --- a/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_defs.h +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_defs.h @@ -20,6 +20,7 @@ #define MOD_GMF (0x68b1d15aUL) #define MOD_GPIO_PHY (0xbbe81659UL) #define MOD_HIF (0x7815363UL) +#define MOD_HSH (0x501484bfUL) #define MOD_I2CM (0x93bc7780UL) #define MOD_IFR (0x9b01f1e6UL) #define MOD_IIC (0x7629cddbUL) diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs.h b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs.h index 38b222363e..9155cc4435 100644 --- a/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs.h +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs.h @@ -19,6 +19,7 @@ #include "nthw_fpga_reg_defs_gmf.h" #include "nthw_fpga_reg_defs_gpio_phy.h" #include "nthw_fpga_reg_defs_hif.h" +#include "nthw_fpga_reg_defs_hsh.h" #include "nthw_fpga_reg_defs_i2cm.h" #include "nthw_fpga_reg_defs_ifr.h" #include "nthw_fpga_reg_defs_iic.h" diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_hsh.h b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_hsh.h new file mode 100644 index 0000000000..fb95a514de --- /dev/null +++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_reg_defs_hsh.h @@ -0,0 +1,50 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2024 Napatech A/S + */ + +/* + * nthw_fpga_reg_defs_hsh.h + * + * Auto-generated file - do *NOT* edit + * + */ + +#ifndef _NTHW_FPGA_REG_DEFS_HSH_ +#define _NTHW_FPGA_REG_DEFS_HSH_ + +/* HSH */ +#define NTHW_MOD_HSH (0x501484bfUL) +#define HSH_RCP_CTRL (0xb257f1b9UL) +#define HSH_RCP_CTRL_ADR (0x5685bfbUL) +#define HSH_RCP_CTRL_CNT (0x1560c22aUL) +#define HSH_RCP_DATA (0x1d8673a0UL) +#define HSH_RCP_DATA_AUTO_IPV4_MASK (0xa0d4de3bUL) +#define HSH_RCP_DATA_HSH_TYPE (0x14cd0865UL) +#define HSH_RCP_DATA_HSH_VALID (0xc89b0bd3UL) +#define HSH_RCP_DATA_K (0xccdb0222UL) +#define HSH_RCP_DATA_LOAD_DIST_TYPE (0x152a0a87UL) +#define HSH_RCP_DATA_MAC_PORT_MASK (0x5160b288UL) +#define HSH_RCP_DATA_P_MASK (0x8a555abbUL) +#define HSH_RCP_DATA_QW0_OFS (0x276b79cfUL) +#define HSH_RCP_DATA_QW0_PE (0x32014a20UL) +#define HSH_RCP_DATA_QW4_OFS (0xd2ebdf0fUL) +#define HSH_RCP_DATA_QW4_PE (0xbd63dd77UL) +#define HSH_RCP_DATA_SEED (0xf8fc2c1cUL) +#define HSH_RCP_DATA_SORT (0xed5f3d38UL) +#define HSH_RCP_DATA_TNL_P (0x6e56b51eUL) +#define HSH_RCP_DATA_TOEPLITZ (0xc1864a45UL) +#define HSH_RCP_DATA_W8_OFS (0x68150d02UL) +#define HSH_RCP_DATA_W8_PE (0x9387d583UL) +#define HSH_RCP_DATA_W8_SORT (0x5c67eca8UL) +#define HSH_RCP_DATA_W9_OFS (0x557524b2UL) +#define HSH_RCP_DATA_W9_P (0x808204d9UL) +#define HSH_RCP_DATA_W9_PE (0x2b3bb2e6UL) +#define HSH_RCP_DATA_W9_SORT (0x973b3f0dUL) +#define HSH_RCP_DATA_WORD_MASK (0x55c53a1fUL) + +#endif /* _NTHW_FPGA_REG_DEFS_HSH_ */ + +/* + * Auto-generated file - do *NOT* edit + */ -- 2.45.0