get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/131597/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 131597,
    "url": "https://patches.dpdk.org/api/patches/131597/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230919095440.45445-12-chaoyong.he@corigine.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230919095440.45445-12-chaoyong.he@corigine.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230919095440.45445-12-chaoyong.he@corigine.com",
    "date": "2023-09-19T09:54:25",
    "name": "[v5,11/26] net/nfp: refact the hwinfo module",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "9369e894f6d9f103fe4a65b715ee8e3869000bed",
    "submitter": {
        "id": 2554,
        "url": "https://patches.dpdk.org/api/people/2554/?format=api",
        "name": "Chaoyong He",
        "email": "chaoyong.he@corigine.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230919095440.45445-12-chaoyong.he@corigine.com/mbox/",
    "series": [
        {
            "id": 29547,
            "url": "https://patches.dpdk.org/api/series/29547/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=29547",
            "date": "2023-09-19T09:54:14",
            "name": "refact the nfpcore module",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/29547/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/131597/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/131597/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 807EE42600;\n\tTue, 19 Sep 2023 11:55:46 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0BB3940A6E;\n\tTue, 19 Sep 2023 11:55:44 +0200 (CEST)",
            "from NAM02-SN1-obe.outbound.protection.outlook.com\n (mail-sn1nam02on2137.outbound.protection.outlook.com [40.107.96.137])\n by mails.dpdk.org (Postfix) with ESMTP id 838F8406FF\n for <dev@dpdk.org>; Tue, 19 Sep 2023 11:55:42 +0200 (CEST)",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5)\n by PH7PR13MB5868.namprd13.prod.outlook.com (2603:10b6:510:15a::6)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.26; Tue, 19 Sep\n 2023 09:55:39 +0000",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::7a1c:2887:348a:84bd]) by SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::7a1c:2887:348a:84bd%6]) with mapi id 15.20.6792.026; Tue, 19 Sep 2023\n 09:55:39 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=TlLwQE5WIZ7nd0Ox0bK20FENPBad0HTRUTOhj2vqKpFao2I7MHU0A8Np52rka2555Dzy9QAUPPdYCKOsSUxtPhNhq0nLLAAePDxBLo9Q7Sw46PbVewFXNNmrYo8tmdaLaKC5dfbBbWJBjX3Pm0ezClV83oVjWFIn/RVe6ffWWXipBseUY6bb87ztLINQu47pZAlnhpjzkhaS8R1qPLmMlBfSypC0/n5GdjNSGzvpAVjNN0OvfMNE53uR7BcEcWuhkoQH0/6qSDpImllKTpzWBX/85RloZtW2zFsNyt1CjSGxmHEOkvnSFpp/dE3fFf3KTmJU2fWHCUSgKmE9zc/ZeA==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n 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;\n bh=zxWDQ73XSyjxbiBxxIJvtl160kD70OHqwYr5vm8WHSk=;\n b=F+DXv5G4y8RU6nBlBot/1ban2i2/UO/Do+yP3ewjj7Z4S1DCgIchEouWKhNkFzq9rlZbgOMsjuMlztjRgdLLSCYuemBnUj/CCa+iyGuXbeti7WGOcsOv9AgdoJbwS/CFWqQIn7basJtTrta37ak7eL8y7CI54HhPRpe9BCgaX0Yi0Tf8i5Kekxk5k5vJNNXItfGsBAg3etFqqza3yUUulBtWhT1XeuoWdUknEyhK3JNCVA29chmr9d5dDdsmX3kEAxw5/w/ZFlHVWXq0ObVr6tDI8bgzJb04z/I7LoveUwTnAisVg0u5NozWBXoBWlZPlGKfFYfdtFq079NuNo/4HQ==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com;\n dkim=pass header.d=corigine.com; arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=zxWDQ73XSyjxbiBxxIJvtl160kD70OHqwYr5vm8WHSk=;\n b=Gx/r/0vERqFzhyD7aq7CgplHKOQgPfB18oWOPuukVBu8hnx5bIvmpT8++Y4h08u0CKpronu2kE/1lM0WyDZUUo2FBiXOlHpCnpsSR+J6h0eTZaaTDhCtnxCBdOwvPNq7f4Sn4j2dBnzm16f83qZ2c0cBig9mvHpGn7GC/BxDZAs=",
        "Authentication-Results": "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=corigine.com;",
        "From": "Chaoyong He <chaoyong.he@corigine.com>",
        "To": "dev@dpdk.org",
        "Cc": "oss-drivers@corigine.com,\n\tChaoyong He <chaoyong.he@corigine.com>",
        "Subject": "[PATCH v5 11/26] net/nfp: refact the hwinfo module",
        "Date": "Tue, 19 Sep 2023 17:54:25 +0800",
        "Message-Id": "<20230919095440.45445-12-chaoyong.he@corigine.com>",
        "X-Mailer": "git-send-email 2.39.1",
        "In-Reply-To": "<20230919095440.45445-1-chaoyong.he@corigine.com>",
        "References": "<20230918024612.1600536-1-chaoyong.he@corigine.com>\n <20230919095440.45445-1-chaoyong.he@corigine.com>",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "BY5PR04CA0014.namprd04.prod.outlook.com\n (2603:10b6:a03:1d0::24) To SJ0PR13MB5545.namprd13.prod.outlook.com\n (2603:10b6:a03:424::5)",
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "SJ0PR13MB5545:EE_|PH7PR13MB5868:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "8a6811cb-f726-4d9a-edd1-08dbb8f6940e",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n wyxMBpJVdgGsCMqvH5c2GHE0jsAVjb9jmxirZ754Pi2IN5XaUDn5kHHkwyZ0N2/2RtLNduax3Wcjy063u7l+BR2wu9QXj3PzrrlsUbh7UyIc5AK7V0H0oRlRAh+qtpqYmJgXxIF0kffYMK78kgUtsnyLDctyBKx7+9Bk4xS5cGCTn7luQfcmsD7EP0TQ90XLq4UABluGMIsfJ/nkcgZsBHavFcRRyfpfky0tqv0RbIKDpYUQW9/sndhOGXIkqAJpHH0bHHEx8UvztcDdY34lB9abInEmQZKo7EXRnEY6xOoSVyya1XPvgiQe46QxkHD70Vb190YftA6mweiewS3PO2d2Ks+m6Q5F1IkkK3WdMUcWdAaooxaWeG08oU9nN4paBqHO6YCADMQnJF9SEJPjqk1mCAeFJyyfKJe1g8jlSJ4EYrRyYpFf4vWbGyw87MS3tYjSvFjxPMLTmqoIsctv4LQ1SZhB86MAeRuZIrxhvICZOUX3bq9k4thzATfIxfqKtDo1q6xy8KrlP3lh1/Y/+Vgw4XQk3c8lHGdfepyyWw8Ky4WIjGy9/ug5KYz7f5OtC7Xp9vPxrFRcgU9McHDi2KSo4HdZ4l8DtqIJc5tzMEx1xiJ62ol61VsRHGFuW2qPel6sqjJfjPbEeVmBWot+1yf2PSmQyyvfDDZaN1iRe/A=",
        "X-Forefront-Antispam-Report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE;\n SFS:(13230031)(136003)(39830400003)(366004)(346002)(376002)(396003)(1800799009)(186009)(451199024)(26005)(8936002)(2616005)(1076003)(8676002)(4326008)(107886003)(83380400001)(2906002)(36756003)(44832011)(86362001)(52116002)(6506007)(6486002)(478600001)(5660300002)(6666004)(6916009)(316002)(6512007)(38100700002)(66946007)(66476007)(41300700001)(66556008)(38350700002);\n DIR:OUT; SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n zs/GnduYJz6LC3gDGGfx3QVd+tNRu1q9V25N57c94a8J02MxOfM379STBxKsgFIJPDPA49i8EjQl4Liu1rhNgZo9FG08EbkrvujbbtfSQy3TtZy4RysKjffMDKjkW2G13/3igX5zjeStF08F1l4+QCkLutQltvZqnzklfknLzLC0a5tK+zohcDGn2GtFY6WQbqZEXXpyNLRxRsWy4Z5NwsxbdxKIeb2rs6MtL44uqrbBaLND1A+lrEp6XIgfTZAEk1VSJzKEHyIb2PJj0kPAFXKURFNuvAbf3sEIccNxjYtL01LdwhSJ4Frs1UVhT8mFRjiWeea0TwSRTwVSKDHPikjX9cLnvP3vp+lobiBrqkPtR9EtiwoYI7PgZwv3iOz/ru3+ly9eMkTxNCOIrkRcMy3LI5ruqby4F5H+RFB619Y1MrppmQhzJcnYkWcgvWBcB22NU8jhl7bGor9p6xQ2a39b17FQx5eQXGpWRssXKeoiKQhGbBqWZjdhZnedhOz8k//8J11gbBZQfXRTaDUKXIdnUCw9Bp0y43IOaGryjRuTQmCP9dSz4UymZqHoHekWj6hKYsKHpPHuRtDJUjbWwXywGCB03J+Klw/p9KZcFQqcU5VkQ5lurptsyAmBZWJjRZnlSO0PS+TI2WVSJyha+Q7Jt84zCqjOQfjXFFUPguSIHOhoBuao+49qUWepzGeenFkjjSjwN08kRROD/c2uBjhCXV6HznMSZnZ9XLvDnFNYiX2/gHpu1ENDXbAhuWrU0gRBLcEeaokRJ8FMSSG+BnabYiozRmM5RGgbLcmEEwIy5StfL+moVd0MwxUdeVbwBSX54yOQBVijmWqod9RU5jWDXhClkfVYX2oprvhI9v5gB5jCGkSnbgLTWBoUlovI/ZCXpGJgulJPlULzGqNnpXOOzI3hL3+TPEujC4r6AZp66BrNNdyuM1MCjI0/YMEJaDV9HNq1SyfG0njfT2Wm2P4B8pxBEyitdvzVHsupQ11Pb9AY7EeuPtYQaaifFjBU3XoMdVXfNjzasviLlcXescTUN5c1Ny7O8U+Yi5O4mQjtAjxAXkvcOsPHe9IehjhFYdUZI+6G78KksWSgvlP/5AM2m22UPW/X1m/dZJo8rNaImMp/MyViJ/9z74gFNy7J0Q+AX5WyOq1jA1Mm1RSxvTED4HeWLFSr54cOh9KIM1v7wTy6+cMGN+cShAGVW+iwUsWVA50jLONwUhlrxF/HmjxBfrk22hZ2VKBNiEwEwyKPrK8Ra54JbqAwno+U/vcBjD4vs0X/76B0DyqmZeLeWwG6gdwuuJ/nU/qwQ0xNKzbwCH0xxjJ03cI08QyV9pZXAkrJiE9hl63ItwN+LGCSTGxGkxKIxCUl8B5GMzzFOdYkECBzIK44xWpxa46pAeJDFbZWF5qi6Oz52nxgU15wl8Fqd197x4VT7SySvGL3qAkEkpBovK4ZInhf3NFeZcVwDCyQsLzR+qSiI1N7DF7An7quzuNzl3LfS7F3EuhmX/PJr7twNzDpGxo6/5Sjl2zSSFN0YLux9kpHLlJnW81tsbfqSh3KNwp9MQlTLzj8tT6cyEYSNGxJ5he22ygUg/wzfnE+LwAFaK2MAglbsV05RA==",
        "X-OriginatorOrg": "corigine.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 8a6811cb-f726-4d9a-edd1-08dbb8f6940e",
        "X-MS-Exchange-CrossTenant-AuthSource": "SJ0PR13MB5545.namprd13.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "19 Sep 2023 09:55:39.1345 (UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "fe128f2c-073b-4c20-818e-7246a585940c",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n aWF6qoX4O0hqrMvZjxlLQzAiMFIDoHCWr5R3NWUl8nhj6Mo2yZwDspT1jPbahVL8GNQ0uu8MwdayA33wOi2/7GI0809J+li+1xINmKvO1Vg=",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PH7PR13MB5868",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Move the definition of data structure and macro into the implement file.\nAlso remove the unneeded header file include statements.\n\nSigned-off-by: Chaoyong He <chaoyong.he@corigine.com>\n---\n drivers/net/nfp/nfpcore/nfp_hwinfo.c | 84 +++++++++++++++++++++++++---\n drivers/net/nfp/nfpcore/nfp_hwinfo.h | 71 +----------------------\n 2 files changed, 77 insertions(+), 78 deletions(-)",
    "diff": "diff --git a/drivers/net/nfp/nfpcore/nfp_hwinfo.c b/drivers/net/nfp/nfpcore/nfp_hwinfo.c\nindex e33e660ea9..c334202bd7 100644\n--- a/drivers/net/nfp/nfpcore/nfp_hwinfo.c\n+++ b/drivers/net/nfp/nfpcore/nfp_hwinfo.c\n@@ -17,17 +17,82 @@\n  *   (ie, in this example, ME 39 has been reserved by boardconfig.)\n  */\n \n-#include <stdio.h>\n-#include <time.h>\n+#include \"nfp_hwinfo.h\"\n \n-#include \"nfp_cpp.h\"\n+#include \"nfp_crc.h\"\n #include \"nfp_logs.h\"\n-#include \"nfp6000/nfp6000.h\"\n #include \"nfp_resource.h\"\n-#include \"nfp_hwinfo.h\"\n-#include \"nfp_crc.h\"\n \n-static int\n+#define HWINFO_SIZE_MIN    0x100\n+\n+/*\n+ * The Hardware Info Table defines the properties of the system.\n+ *\n+ * HWInfo v1 Table (fixed size)\n+ *\n+ * 0x0000: uint32_t version        Hardware Info Table version (1.0)\n+ * 0x0004: uint32_t size           Total size of the table, including the\n+ *                                     CRC32 (IEEE 802.3)\n+ * 0x0008: uint32_t jumptab        Offset of key/value table\n+ * 0x000c: uint32_t keys           Total number of keys in the key/value table\n+ * NNNNNN:                         Key/value jump table and string data\n+ * (size - 4): uint32_t crc32      CRC32 (same as IEEE 802.3, POSIX csum, etc)\n+ *                                     CRC32(\"\",0) = ~0, CRC32(\"a\",1) = 0x48C279FE\n+ *\n+ * HWInfo v2 Table (variable size)\n+ *\n+ * 0x0000: uint32_t version        Hardware Info Table version (2.0)\n+ * 0x0004: uint32_t size           Current size of the data area, excluding CRC32\n+ * 0x0008: uint32_t limit          Maximum size of the table\n+ * 0x000c: uint32_t reserved       Unused, set to zero\n+ * NNNNNN:                         Key/value data\n+ * (size - 4): uint32_t crc32      CRC32 (same as IEEE 802.3, POSIX csum, etc)\n+ *                                     CRC32(\"\",0) = ~0, CRC32(\"a\",1) = 0x48C279FE\n+ *\n+ * If the HWInfo table is in the process of being updated, the low bit of\n+ * version will be set.\n+ *\n+ * HWInfo v1 Key/Value Table\n+ * -------------------------\n+ *\n+ *  The key/value table is a set of offsets to ASCIIZ strings which have\n+ *  been strcmp(3) sorted (yes, please use bsearch(3) on the table).\n+ *\n+ *  All keys are guaranteed to be unique.\n+ *\n+ * N+0: uint32_t key_1        Offset to the first key\n+ * N+4: uint32_t val_1        Offset to the first value\n+ * N+8: uint32_t key_2        Offset to the second key\n+ * N+c: uint32_t val_2        Offset to the second value\n+ * ...\n+ *\n+ * HWInfo v2 Key/Value Table\n+ * -------------------------\n+ *\n+ * Packed UTF8Z strings, ie 'key1\\000value1\\000key2\\000value2\\000'\n+ * Unsorted.\n+ *\n+ * Note: Only the HwInfo v2 Table be supported now.\n+ */\n+\n+#define NFP_HWINFO_VERSION_1 ('H' << 24 | 'I' << 16 | 1 << 8 | 0 << 1 | 0)\n+#define NFP_HWINFO_VERSION_2 ('H' << 24 | 'I' << 16 | 2 << 8 | 0 << 1 | 0)\n+#define NFP_HWINFO_VERSION_UPDATING    RTE_BIT32(0)\n+\n+struct nfp_hwinfo {\n+\tuint8_t start[0];\n+\n+\tuint32_t version;\n+\tuint32_t size;\n+\n+\t/* V2 specific fields */\n+\tuint32_t limit;\n+\tuint32_t resv;\n+\n+\tchar data[];\n+};\n+\n+static bool\n nfp_hwinfo_is_updating(struct nfp_hwinfo *hwinfo)\n {\n \treturn hwinfo->version & NFP_HWINFO_VERSION_UPDATING;\n@@ -120,7 +185,7 @@ nfp_hwinfo_try_fetch(struct nfp_cpp *cpp,\n \t\tgoto exit_free;\n \t}\n \n-\theader = (void *)db;\n+\theader = (struct nfp_hwinfo *)db;\n \tif (nfp_hwinfo_is_updating(header))\n \t\tgoto exit_free;\n \n@@ -133,7 +198,8 @@ nfp_hwinfo_try_fetch(struct nfp_cpp *cpp,\n \t/* NULL-terminate for safety */\n \tdb[*cpp_size] = '\\0';\n \n-\treturn (void *)db;\n+\treturn (struct nfp_hwinfo *)db;\n+\n exit_free:\n \tfree(db);\n \treturn NULL;\ndiff --git a/drivers/net/nfp/nfpcore/nfp_hwinfo.h b/drivers/net/nfp/nfpcore/nfp_hwinfo.h\nindex 543562779a..c812f10076 100644\n--- a/drivers/net/nfp/nfpcore/nfp_hwinfo.h\n+++ b/drivers/net/nfp/nfpcore/nfp_hwinfo.h\n@@ -6,76 +6,9 @@\n #ifndef __NFP_HWINFO_H__\n #define __NFP_HWINFO_H__\n \n-#include <inttypes.h>\n+#include \"nfp_cpp.h\"\n \n-#define HWINFO_SIZE_MIN    0x100\n-\n-/*\n- * The Hardware Info Table defines the properties of the system.\n- *\n- * HWInfo v1 Table (fixed size)\n- *\n- * 0x0000: uint32_t version        Hardware Info Table version (1.0)\n- * 0x0004: uint32_t size           Total size of the table, including the\n- *                                     CRC32 (IEEE 802.3)\n- * 0x0008: uint32_t jumptab        Offset of key/value table\n- * 0x000c: uint32_t keys           Total number of keys in the key/value table\n- * NNNNNN:                         Key/value jump table and string data\n- * (size - 4): uint32_t crc32      CRC32 (same as IEEE 802.3, POSIX csum, etc)\n- *                                     CRC32(\"\",0) = ~0, CRC32(\"a\",1) = 0x48C279FE\n- *\n- * HWInfo v2 Table (variable size)\n- *\n- * 0x0000: uint32_t version        Hardware Info Table version (2.0)\n- * 0x0004: uint32_t size           Current size of the data area, excluding CRC32\n- * 0x0008: uint32_t limit          Maximum size of the table\n- * 0x000c: uint32_t reserved       Unused, set to zero\n- * NNNNNN:                         Key/value data\n- * (size - 4): uint32_t crc32      CRC32 (same as IEEE 802.3, POSIX csum, etc)\n- *                                     CRC32(\"\",0) = ~0, CRC32(\"a\",1) = 0x48C279FE\n- *\n- * If the HWInfo table is in the process of being updated, the low bit of\n- * version will be set.\n- *\n- * HWInfo v1 Key/Value Table\n- * -------------------------\n- *\n- *  The key/value table is a set of offsets to ASCIIZ strings which have\n- *  been strcmp(3) sorted (yes, please use bsearch(3) on the table).\n- *\n- *  All keys are guaranteed to be unique.\n- *\n- * N+0: uint32_t key_1        Offset to the first key\n- * N+4: uint32_t val_1        Offset to the first value\n- * N+8: uint32_t key_2        Offset to the second key\n- * N+c: uint32_t val_2        Offset to the second value\n- * ...\n- *\n- * HWInfo v2 Key/Value Table\n- * -------------------------\n- *\n- * Packed UTF8Z strings, ie 'key1\\000value1\\000key2\\000value2\\000'\n- * Unsorted.\n- *\n- * Note: Only the HwInfo v2 Table be supported now.\n- */\n-\n-#define NFP_HWINFO_VERSION_1 ('H' << 24 | 'I' << 16 | 1 << 8 | 0 << 1 | 0)\n-#define NFP_HWINFO_VERSION_2 ('H' << 24 | 'I' << 16 | 2 << 8 | 0 << 1 | 0)\n-#define NFP_HWINFO_VERSION_UPDATING    RTE_BIT32(0)\n-\n-struct nfp_hwinfo {\n-\tuint8_t start[0];\n-\n-\tuint32_t version;\n-\tuint32_t size;\n-\n-\t/* v2 specific fields */\n-\tuint32_t limit;\n-\tuint32_t resv;\n-\n-\tchar data[];\n-};\n+struct nfp_hwinfo;\n \n struct nfp_hwinfo *nfp_hwinfo_read(struct nfp_cpp *cpp);\n \n",
    "prefixes": [
        "v5",
        "11/26"
    ]
}