get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 103971,
    "url": "http://patches.dpdk.org/api/patches/103971/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211108185805.3887-2-eagostini@nvidia.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20211108185805.3887-2-eagostini@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211108185805.3887-2-eagostini@nvidia.com",
    "date": "2021-11-08T18:57:57",
    "name": "[v5,1/9] gpudev: introduce GPU device class library",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "3eb537ad5beab6aedc5799485f47ea0044e411de",
    "submitter": {
        "id": 1571,
        "url": "http://patches.dpdk.org/api/people/1571/?format=api",
        "name": "Elena Agostini",
        "email": "eagostini@nvidia.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211108185805.3887-2-eagostini@nvidia.com/mbox/",
    "series": [
        {
            "id": 20381,
            "url": "http://patches.dpdk.org/api/series/20381/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=20381",
            "date": "2021-11-08T18:57:56",
            "name": "GPU library",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/20381/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/103971/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/103971/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 03396A0C4D;\n\tMon,  8 Nov 2021 11:47:14 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 908404111E;\n\tMon,  8 Nov 2021 11:47:07 +0100 (CET)",
            "from NAM12-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam12on2056.outbound.protection.outlook.com [40.107.243.56])\n by mails.dpdk.org (Postfix) with ESMTP id C0A5040E28\n for <dev@dpdk.org>; Mon,  8 Nov 2021 11:47:05 +0100 (CET)",
            "from MW2PR16CA0039.namprd16.prod.outlook.com (2603:10b6:907:1::16)\n by DM6PR12MB2873.namprd12.prod.outlook.com (2603:10b6:5:18a::32) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Mon, 8 Nov\n 2021 10:47:03 +0000",
            "from CO1NAM11FT064.eop-nam11.prod.protection.outlook.com\n (2603:10b6:907:1:cafe::ce) by MW2PR16CA0039.outlook.office365.com\n (2603:10b6:907:1::16) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend\n Transport; Mon, 8 Nov 2021 10:47:03 +0000",
            "from mail.nvidia.com (216.228.112.34) by\n CO1NAM11FT064.mail.protection.outlook.com (10.13.175.77) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.4669.10 via Frontend Transport; Mon, 8 Nov 2021 10:47:02 +0000",
            "from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com\n (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 8 Nov\n 2021 10:47:00 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=YXjnGh7m/OBhKJkuO3bLRu1dBHvM35uEkmLMyZ6ip0YAWuVB0opnPGmjD1oWpy0CP15BbClGjEBVO4oU52uE4jK5WsRfjGMHU4DHjeFW3JMHZfsmvof2zNyeZPoj7FKkkX+W8VEx+++pwoEMOBHWU9Ui+psx+F7BZqhBmluj1ra/TSFmx7TYeJu5JcSFBhaY2d76k3TQl6ljVTM56EL9cKAUhP6Tbv7JfMRE5jeiZ0eO4mvWhSzSREcHnaBIIte3LAuipaeuyjop7a/QfX2VKXLbwtsJcy3+rp/y0cEHbA4nA2IrsAz0RP/9B5DCo8MUHfxAYFifiBODP8nkmwjYqg==",
        "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=ffG+yRJ4RWSWAMZdD84+MsRT6D4yMjtktQ4/q9wmcFk=;\n b=GtO0Il+OYSzn+fhyNFjZr2wxNKq6d1jvxzLhTdY5U6zGcHxx5R2rmgGGs6vhRDdzba3ojvRUJWZJuZMsVifrE92PPd3oMU5tmxVNu9C2NF0SMRvoa0PhLYsSX9wKdRmcuecT8IuOKoXZrDBLSu3KA8lYDivpi/BzRdm8OJAN4mf8pVZ6wiiTy2ilEHfJnEq4It8Q8O78Z/HtW8OkiMJ0JfIPQ8KqwDThCc4EMAm3SnxxTS3EbDu6LfY89CDfF2hZ16EGqcQupke7NNLL66QucOTGtf4jH1WJkYSSWjYt21yJ/UtmjvO2oDLq954s0Ar7weciS9tP1JsLoiyg1hiKnw==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.112.34) smtp.rcpttodomain=monjalon.net smtp.mailfrom=nvidia.com;\n dmarc=pass (p=quarantine sp=quarantine pct=100) action=none\n header.from=nvidia.com; dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=ffG+yRJ4RWSWAMZdD84+MsRT6D4yMjtktQ4/q9wmcFk=;\n b=osoOUxVPxKbBdrrcL3oA4BpalWcA3ih+cAP9BSAPiNL74mlmZ4X31uYWcHH5GjAn85EomaxLao7oZzWcnBxSmvpuYZMTvalIkidjtZOxr+z97TEx4Pk62wk5LI6Rcg1QFgu7k952BnbS5JYrEDEtGb0DG+uVD+3NoarAr9xG+N1Hy4eFfb52o4GiApKFTBVeuui4//6IYRpvZ5aL2Ys1rPcppV5zpgr2M7T3S+nBfeHt9rTsHqZnilSmi/UU/pi3wWpoNw66a2wXLNa2NLv7Cbx+0A0pkjC3oWwu7g4tPrErmefBcrgsbz8mGeLbGopHCG+Hg9O0uHMDmSOJl1djZQ==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.112.34)\n smtp.mailfrom=nvidia.com; monjalon.net; dkim=none (message not signed)\n header.d=none;monjalon.net; dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.112.34 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.112.34; helo=mail.nvidia.com;",
        "From": "<eagostini@nvidia.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Elena Agostini <eagostini@nvidia.com>, Thomas Monjalon\n <thomas@monjalon.net>",
        "Date": "Mon, 8 Nov 2021 18:57:57 +0000",
        "Message-ID": "<20211108185805.3887-2-eagostini@nvidia.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20211108185805.3887-1-eagostini@nvidia.com>",
        "References": "<20210602203531.2288645-1-thomas@monjalon.net>\n <20211108185805.3887-1-eagostini@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[172.20.187.6]",
        "X-ClientProxiedBy": "HQMAIL105.nvidia.com (172.20.187.12) To\n HQMAIL107.nvidia.com (172.20.187.13)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "af456ffa-16fe-4510-8a13-08d9a2a51935",
        "X-MS-TrafficTypeDiagnostic": "DM6PR12MB2873:",
        "X-LD-Processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr",
        "X-Microsoft-Antispam-PRVS": "\n <DM6PR12MB2873136CD18A33CF664B093ACD919@DM6PR12MB2873.namprd12.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:1824;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n gA5aFGpV7ufslXHzxYuvAkbx8fAFTMuE3jB2vCXmqWgdfP9xyv/eBfgN0GxijvQVHCgumeYUT1cWIamDk93tGlNRpl1WxnRPgwgYTjj+6ae3Eohicr6ePk7vR99EvwG1dMzkkGgzwGlpvsHVpxzoTUXJR39TIQ/9Xf+0Ai96Ct+ojeYhnboChrmKDJmf4GTVilut8N1qqRmnCLACRYj+M2sb1d1tLwEWkwYle5z7Zk7jsMRWx74syQ+lTJhRxjqXYGPMveD7l9fmQFA1xfRpu+CfRWFNo2xRuxvkI53MbMhT/e0dMdPTOwR0tVnksTKwnKAbYfN+GUQzhKoEeID3U1iC5Z1eireoFbbZdlOuz2ibzny2h54w6DyIe3GMBlc2yxaaXlUtuatFVV2ym1nuHoAVqMBiMAEXkjGFlS47qGkERJTkhPY2pGESqxjblilywRUPAWRUNyTJno9u3I324TVXrQt4/6UoM/Jnoex41YTC2fkt8EHlnPOSYlC40RIPXzNFHTbV9ov7A68CYAV1hDaum2+x0iBlW/mbJHIFuRvfGuM1IU2Po13uVodqqqRz1yBO5wcvxIleVdWsP26GPflEnwBaa2UZ42Rpa/n+v3tcUodzSMVtQikSLH9EX4lk/gjPs/PbDZMfB4WAhsK0UicgKT1Z9qaBYNLskYSTBS3VdWghWhuZiB+FDNIEnK463qzUMQa1XOAqwmKfIrB3AQ==",
        "X-Forefront-Antispam-Report": "CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE;\n SFS:(4636009)(46966006)(36840700001)(70206006)(70586007)(47076005)(8936002)(508600001)(336012)(426003)(83380400001)(36756003)(54906003)(6916009)(7636003)(30864003)(2616005)(356005)(55016002)(6286002)(16526019)(186003)(82310400003)(2906002)(316002)(5660300002)(2876002)(4326008)(7696005)(6666004)(36860700001)(8676002)(26005)(86362001)(1076003);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "08 Nov 2021 10:47:02.4799 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n af456ffa-16fe-4510-8a13-08d9a2a51935",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n CO1NAM11FT064.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DM6PR12MB2873",
        "Subject": "[dpdk-dev] [PATCH v5 1/9] gpudev: introduce GPU device class library",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Elena Agostini <eagostini@nvidia.com>\n\nIn heterogeneous computing system, processing is not only in the CPU.\nSome tasks can be delegated to devices working in parallel.\n\nThe new library gpudev is for dealing with GPGPU computing devices\nfrom a DPDK application running on the CPU.\n\nThe infrastructure is prepared to welcome drivers in drivers/gpu/.\n\nSigned-off-by: Elena Agostini <eagostini@nvidia.com>\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n .gitignore                             |   1 +\n MAINTAINERS                            |   6 +\n app/meson.build                        |   1 +\n app/test-gpudev/main.c                 | 107 +++++++++++\n app/test-gpudev/meson.build            |   5 +\n doc/api/doxy-api.conf.in               |   1 +\n doc/guides/conf.py                     |   8 +\n doc/guides/gpus/features/default.ini   |  10 +\n doc/guides/gpus/index.rst              |  11 ++\n doc/guides/gpus/overview.rst           |  10 +\n doc/guides/index.rst                   |   1 +\n doc/guides/prog_guide/gpudev.rst       |  36 ++++\n doc/guides/prog_guide/index.rst        |   1 +\n doc/guides/rel_notes/release_21_11.rst |   4 +\n drivers/gpu/meson.build                |   4 +\n drivers/meson.build                    |   1 +\n lib/gpudev/gpudev.c                    | 249 +++++++++++++++++++++++++\n lib/gpudev/gpudev_driver.h             |  67 +++++++\n lib/gpudev/meson.build                 |  10 +\n lib/gpudev/rte_gpudev.h                | 168 +++++++++++++++++\n lib/gpudev/version.map                 |  20 ++\n lib/meson.build                        |   1 +\n 22 files changed, 722 insertions(+)\n create mode 100644 app/test-gpudev/main.c\n create mode 100644 app/test-gpudev/meson.build\n create mode 100644 doc/guides/gpus/features/default.ini\n create mode 100644 doc/guides/gpus/index.rst\n create mode 100644 doc/guides/gpus/overview.rst\n create mode 100644 doc/guides/prog_guide/gpudev.rst\n create mode 100644 drivers/gpu/meson.build\n create mode 100644 lib/gpudev/gpudev.c\n create mode 100644 lib/gpudev/gpudev_driver.h\n create mode 100644 lib/gpudev/meson.build\n create mode 100644 lib/gpudev/rte_gpudev.h\n create mode 100644 lib/gpudev/version.map",
    "diff": "diff --git a/.gitignore b/.gitignore\nindex 7ec8688342..b98a43a601 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -15,6 +15,7 @@ doc/guides/compressdevs/overview_feature_table.txt\n doc/guides/regexdevs/overview_feature_table.txt\n doc/guides/vdpadevs/overview_feature_table.txt\n doc/guides/bbdevs/overview_feature_table.txt\n+doc/guides/gpus/overview_feature_table.txt\n \n # ignore generated ctags/cscope files\n cscope.out.po\ndiff --git a/MAINTAINERS b/MAINTAINERS\nindex 3459187e26..a2e67fb1e6 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -467,6 +467,12 @@ M: Bruce Richardson <bruce.richardson@intel.com>\n F: examples/dma/\n F: doc/guides/sample_app_ug/dma.rst\n \n+General-Purpose Graphics Processing Unit (GPU) API - EXPERIMENTAL\n+M: Elena Agostini <eagostini@nvidia.com>\n+F: lib/gpudev/\n+F: doc/guides/prog_guide/gpudev.rst\n+F: doc/guides/gpus/features/default.ini\n+\n Eventdev API\n M: Jerin Jacob <jerinj@marvell.com>\n T: git://dpdk.org/next/dpdk-next-eventdev\ndiff --git a/app/meson.build b/app/meson.build\nindex 986c1a4ad4..310e83076f 100644\n--- a/app/meson.build\n+++ b/app/meson.build\n@@ -13,6 +13,7 @@ apps = [\n         'test-eventdev',\n         'test-fib',\n         'test-flow-perf',\n+        'test-gpudev',\n         'test-pipeline',\n         'test-pmd',\n         'test-regex',\ndiff --git a/app/test-gpudev/main.c b/app/test-gpudev/main.c\nnew file mode 100644\nindex 0000000000..438cfdac54\n--- /dev/null\n+++ b/app/test-gpudev/main.c\n@@ -0,0 +1,107 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2021 NVIDIA Corporation & Affiliates\n+ */\n+\n+#include <stdio.h>\n+#include <stdlib.h>\n+#include <string.h>\n+#include <stdint.h>\n+#include <inttypes.h>\n+#include <stdarg.h>\n+#include <errno.h>\n+#include <getopt.h>\n+\n+#include <rte_common.h>\n+#include <rte_malloc.h>\n+#include <rte_memory.h>\n+#include <rte_eal.h>\n+#include <rte_ether.h>\n+#include <rte_ethdev.h>\n+#include <rte_mempool.h>\n+#include <rte_mbuf.h>\n+\n+#include <rte_gpudev.h>\n+\n+enum app_args {\n+\tARG_HELP,\n+\tARG_MEMPOOL\n+};\n+\n+static void\n+usage(const char *prog_name)\n+{\n+\tprintf(\"%s [EAL options] --\\n\",\n+\t\tprog_name);\n+}\n+\n+static void\n+args_parse(int argc, char **argv)\n+{\n+\tchar **argvopt;\n+\tint opt;\n+\tint opt_idx;\n+\n+\tstatic struct option lgopts[] = {\n+\t\t{ \"help\", 0, 0, ARG_HELP},\n+\t\t/* End of options */\n+\t\t{ 0, 0, 0, 0 }\n+\t};\n+\n+\targvopt = argv;\n+\twhile ((opt = getopt_long(argc, argvopt, \"\",\n+\t\t\t\tlgopts, &opt_idx)) != EOF) {\n+\t\tswitch (opt) {\n+\t\tcase ARG_HELP:\n+\t\t\tusage(argv[0]);\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tusage(argv[0]);\n+\t\t\trte_exit(EXIT_FAILURE, \"Invalid option: %s\\n\", argv[optind]);\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+}\n+\n+int\n+main(int argc, char **argv)\n+{\n+\tint ret;\n+\tint nb_gpus = 0;\n+\tint16_t gpu_id = 0;\n+\tstruct rte_gpu_info ginfo;\n+\n+\t/* Init EAL. */\n+\tret = rte_eal_init(argc, argv);\n+\tif (ret < 0)\n+\t\trte_exit(EXIT_FAILURE, \"EAL init failed\\n\");\n+\targc -= ret;\n+\targv += ret;\n+\tif (argc > 1)\n+\t\targs_parse(argc, argv);\n+\targc -= ret;\n+\targv += ret;\n+\n+\tnb_gpus = rte_gpu_count_avail();\n+\tprintf(\"\\n\\nDPDK found %d GPUs:\\n\", nb_gpus);\n+\tRTE_GPU_FOREACH(gpu_id)\n+\t{\n+\t\tif (rte_gpu_info_get(gpu_id, &ginfo))\n+\t\t\trte_exit(EXIT_FAILURE, \"rte_gpu_info_get error - bye\\n\");\n+\n+\t\tprintf(\"\\tGPU ID %d\\n\\t\\tparent ID %d GPU Bus ID %s NUMA node %d Tot memory %.02f MB, Tot processors %d\\n\",\n+\t\t\t\tginfo.dev_id,\n+\t\t\t\tginfo.parent,\n+\t\t\t\tginfo.name,\n+\t\t\t\tginfo.numa_node,\n+\t\t\t\t(((float)ginfo.total_memory)/(float)1024)/(float)1024,\n+\t\t\t\tginfo.processor_count\n+\t\t\t);\n+\t}\n+\tprintf(\"\\n\\n\");\n+\n+\t/* clean up the EAL */\n+\trte_eal_cleanup();\n+\tprintf(\"Bye...\\n\");\n+\n+\treturn EXIT_SUCCESS;\n+}\ndiff --git a/app/test-gpudev/meson.build b/app/test-gpudev/meson.build\nnew file mode 100644\nindex 0000000000..17bdef3646\n--- /dev/null\n+++ b/app/test-gpudev/meson.build\n@@ -0,0 +1,5 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright (c) 2021 NVIDIA Corporation & Affiliates\n+\n+sources = files('main.c')\n+deps = ['gpudev', 'ethdev']\ndiff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in\nindex 096ebbaf0d..db2ca9b6ed 100644\n--- a/doc/api/doxy-api.conf.in\n+++ b/doc/api/doxy-api.conf.in\n@@ -41,6 +41,7 @@ INPUT                   = @TOPDIR@/doc/api/doxy-api-index.md \\\n                           @TOPDIR@/lib/eventdev \\\n                           @TOPDIR@/lib/fib \\\n                           @TOPDIR@/lib/flow_classify \\\n+                          @TOPDIR@/lib/gpudev \\\n                           @TOPDIR@/lib/graph \\\n                           @TOPDIR@/lib/gro \\\n                           @TOPDIR@/lib/gso \\\ndiff --git a/doc/guides/conf.py b/doc/guides/conf.py\nindex 0494b0efe7..e6ce929bc8 100644\n--- a/doc/guides/conf.py\n+++ b/doc/guides/conf.py\n@@ -152,6 +152,9 @@ def generate_overview_table(output_filename, table_id, section, table_name, titl\n         name = ini_filename[:-4]\n         name = name.replace('_vf', 'vf')\n         pmd_names.append(name)\n+    if not pmd_names:\n+        # Add an empty column if table is empty (required by RST syntax)\n+        pmd_names.append(' ')\n \n     # Pad the table header names.\n     max_header_len = len(max(pmd_names, key=len))\n@@ -393,6 +396,11 @@ def setup(app):\n                             'Features',\n                             'Features availability in bbdev drivers',\n                             'Feature')\n+    table_file = dirname(__file__) + '/gpus/overview_feature_table.txt'\n+    generate_overview_table(table_file, 1,\n+                            'Features',\n+                            'Features availability in GPU drivers',\n+                            'Feature')\n \n     if LooseVersion(sphinx_version) < LooseVersion('1.3.1'):\n         print('Upgrade sphinx to version >= 1.3.1 for '\ndiff --git a/doc/guides/gpus/features/default.ini b/doc/guides/gpus/features/default.ini\nnew file mode 100644\nindex 0000000000..ec7a545eb7\n--- /dev/null\n+++ b/doc/guides/gpus/features/default.ini\n@@ -0,0 +1,10 @@\n+;\n+; Features of GPU drivers.\n+;\n+; This file defines the features that are valid for inclusion in\n+; the other driver files and also the order that they appear in\n+; the features table in the documentation. The feature description\n+; string should not exceed feature_str_len defined in conf.py.\n+;\n+[Features]\n+Get device info                =\ndiff --git a/doc/guides/gpus/index.rst b/doc/guides/gpus/index.rst\nnew file mode 100644\nindex 0000000000..1878423239\n--- /dev/null\n+++ b/doc/guides/gpus/index.rst\n@@ -0,0 +1,11 @@\n+.. SPDX-License-Identifier: BSD-3-Clause\n+   Copyright (c) 2021 NVIDIA Corporation & Affiliates\n+\n+General-Purpose Graphics Processing Unit Drivers\n+================================================\n+\n+.. toctree::\n+   :maxdepth: 2\n+   :numbered:\n+\n+   overview\ndiff --git a/doc/guides/gpus/overview.rst b/doc/guides/gpus/overview.rst\nnew file mode 100644\nindex 0000000000..4830348818\n--- /dev/null\n+++ b/doc/guides/gpus/overview.rst\n@@ -0,0 +1,10 @@\n+.. SPDX-License-Identifier: BSD-3-Clause\n+   Copyright (c) 2021 NVIDIA Corporation & Affiliates\n+\n+Overview of GPU Drivers\n+=======================\n+\n+General-Purpose computing on Graphics Processing Unit (GPGPU)\n+is the use of GPU to perform parallel computation.\n+\n+.. include:: overview_feature_table.txt\ndiff --git a/doc/guides/index.rst b/doc/guides/index.rst\nindex 919825992e..5eb5bd9c9a 100644\n--- a/doc/guides/index.rst\n+++ b/doc/guides/index.rst\n@@ -22,6 +22,7 @@ DPDK documentation\n    vdpadevs/index\n    regexdevs/index\n    dmadevs/index\n+   gpus/index\n    eventdevs/index\n    rawdevs/index\n    mempool/index\ndiff --git a/doc/guides/prog_guide/gpudev.rst b/doc/guides/prog_guide/gpudev.rst\nnew file mode 100644\nindex 0000000000..6ea7239159\n--- /dev/null\n+++ b/doc/guides/prog_guide/gpudev.rst\n@@ -0,0 +1,36 @@\n+.. SPDX-License-Identifier: BSD-3-Clause\n+   Copyright (c) 2021 NVIDIA Corporation & Affiliates\n+\n+General-Purpose Graphics Processing Unit Library\n+================================================\n+\n+When mixing networking activity with task processing on a GPU device,\n+there may be the need to put in communication the CPU with the device\n+in order to manage the memory, synchronize operations, exchange info, etc..\n+\n+By means of the generic GPU interface provided by this library,\n+it is possible to allocate a chunk of GPU memory and use it\n+to create a DPDK mempool with external mbufs having the payload\n+on the GPU memory, enabling any network interface card\n+(which support this feature like Mellanox NIC)\n+to directly transmit and receive packets using GPU memory.\n+\n+Additionally, this library provides a number of functions\n+to enhance the dialog between CPU and GPU.\n+\n+Out of scope of this library is to provide a wrapper for GPU specific libraries\n+(e.g. CUDA Toolkit or OpenCL), thus it is not possible to launch workload\n+on the device or create GPU specific objects\n+(e.g. CUDA Driver context or CUDA Streams in case of NVIDIA GPUs).\n+\n+\n+Features\n+--------\n+\n+This library provides a number of features:\n+\n+- Interoperability with device-specific library through generic handlers.\n+\n+\n+API Overview\n+------------\ndiff --git a/doc/guides/prog_guide/index.rst b/doc/guides/prog_guide/index.rst\nindex 20e5155cf4..7090b5589a 100644\n--- a/doc/guides/prog_guide/index.rst\n+++ b/doc/guides/prog_guide/index.rst\n@@ -28,6 +28,7 @@ Programmer's Guide\n     compressdev\n     regexdev\n     dmadev\n+    gpudev\n     rte_security\n     rawdev\n     link_bonding_poll_mode_drv_lib\ndiff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst\nindex 8da19c613a..9cf59e73bb 100644\n--- a/doc/guides/rel_notes/release_21_11.rst\n+++ b/doc/guides/rel_notes/release_21_11.rst\n@@ -101,6 +101,10 @@ New Features\n   Added ``rte_eth_macaddrs_get`` to allow user to retrieve all Ethernet\n   addresses assigned to given ethernet port.\n \n+* **Introduced GPU device class with first features:**\n+\n+  * Device information\n+\n * **Added new RSS offload types for IPv4/L4 checksum in RSS flow.**\n \n   Added macros ETH_RSS_IPV4_CHKSUM and ETH_RSS_L4_CHKSUM, now IPv4 and\ndiff --git a/drivers/gpu/meson.build b/drivers/gpu/meson.build\nnew file mode 100644\nindex 0000000000..e51ad3381b\n--- /dev/null\n+++ b/drivers/gpu/meson.build\n@@ -0,0 +1,4 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright (c) 2021 NVIDIA Corporation & Affiliates\n+\n+drivers = []\ndiff --git a/drivers/meson.build b/drivers/meson.build\nindex 34c0276487..d5f4e1c1f2 100644\n--- a/drivers/meson.build\n+++ b/drivers/meson.build\n@@ -19,6 +19,7 @@ subdirs = [\n         'vdpa',           # depends on common, bus and mempool.\n         'event',          # depends on common, bus, mempool and net.\n         'baseband',       # depends on common and bus.\n+        'gpu',            # depends on common and bus.\n ]\n \n if meson.is_cross_build()\ndiff --git a/lib/gpudev/gpudev.c b/lib/gpudev/gpudev.c\nnew file mode 100644\nindex 0000000000..aeb021f2cc\n--- /dev/null\n+++ b/lib/gpudev/gpudev.c\n@@ -0,0 +1,249 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2021 NVIDIA Corporation & Affiliates\n+ */\n+\n+#include <rte_eal.h>\n+#include <rte_string_fns.h>\n+#include <rte_errno.h>\n+#include <rte_log.h>\n+\n+#include \"rte_gpudev.h\"\n+#include \"gpudev_driver.h\"\n+\n+/* Logging */\n+RTE_LOG_REGISTER_DEFAULT(gpu_logtype, NOTICE);\n+#define GPU_LOG(level, ...) \\\n+\trte_log(RTE_LOG_ ## level, gpu_logtype, RTE_FMT(\"gpu: \" \\\n+\t\tRTE_FMT_HEAD(__VA_ARGS__, ) \"\\n\", RTE_FMT_TAIL(__VA_ARGS__, )))\n+\n+/* Set any driver error as EPERM */\n+#define GPU_DRV_RET(function) \\\n+\t((function != 0) ? -(rte_errno = EPERM) : (rte_errno = 0))\n+\n+/* Array of devices */\n+static struct rte_gpu *gpus;\n+/* Number of currently valid devices */\n+static int16_t gpu_max;\n+/* Number of currently valid devices */\n+static int16_t gpu_count;\n+\n+int\n+rte_gpu_init(size_t dev_max)\n+{\n+\tif (dev_max == 0 || dev_max > INT16_MAX) {\n+\t\tGPU_LOG(ERR, \"invalid array size\");\n+\t\trte_errno = EINVAL;\n+\t\treturn -rte_errno;\n+\t}\n+\n+\t/* No lock, it must be called before or during first probing. */\n+\tif (gpus != NULL) {\n+\t\tGPU_LOG(ERR, \"already initialized\");\n+\t\trte_errno = EBUSY;\n+\t\treturn -rte_errno;\n+\t}\n+\n+\tgpus = calloc(dev_max, sizeof(struct rte_gpu));\n+\tif (gpus == NULL) {\n+\t\tGPU_LOG(ERR, \"cannot initialize library\");\n+\t\trte_errno = ENOMEM;\n+\t\treturn -rte_errno;\n+\t}\n+\n+\tgpu_max = dev_max;\n+\treturn 0;\n+}\n+\n+uint16_t\n+rte_gpu_count_avail(void)\n+{\n+\treturn gpu_count;\n+}\n+\n+bool\n+rte_gpu_is_valid(int16_t dev_id)\n+{\n+\tif (dev_id >= 0 && dev_id < gpu_max &&\n+\t\tgpus[dev_id].state == RTE_GPU_STATE_INITIALIZED)\n+\t\treturn true;\n+\treturn false;\n+}\n+\n+int16_t\n+rte_gpu_find_next(int16_t dev_id)\n+{\n+\tif (dev_id < 0)\n+\t\tdev_id = 0;\n+\twhile (dev_id < gpu_max &&\n+\t\t\tgpus[dev_id].state == RTE_GPU_STATE_UNUSED)\n+\t\tdev_id++;\n+\n+\tif (dev_id >= gpu_max)\n+\t\treturn RTE_GPU_ID_NONE;\n+\treturn dev_id;\n+}\n+\n+static int16_t\n+gpu_find_free_id(void)\n+{\n+\tint16_t dev_id;\n+\n+\tfor (dev_id = 0; dev_id < gpu_max; dev_id++) {\n+\t\tif (gpus[dev_id].state == RTE_GPU_STATE_UNUSED)\n+\t\t\treturn dev_id;\n+\t}\n+\treturn RTE_GPU_ID_NONE;\n+}\n+\n+static struct rte_gpu *\n+gpu_get_by_id(int16_t dev_id)\n+{\n+\tif (!rte_gpu_is_valid(dev_id))\n+\t\treturn NULL;\n+\treturn &gpus[dev_id];\n+}\n+\n+struct rte_gpu *\n+rte_gpu_get_by_name(const char *name)\n+{\n+\tint16_t dev_id;\n+\tstruct rte_gpu *dev;\n+\n+\tif (name == NULL) {\n+\t\trte_errno = EINVAL;\n+\t\treturn NULL;\n+\t}\n+\n+\tRTE_GPU_FOREACH(dev_id) {\n+\t\tdev = &gpus[dev_id];\n+\t\tif (strncmp(name, dev->name, RTE_DEV_NAME_MAX_LEN) == 0)\n+\t\t\treturn dev;\n+\t}\n+\treturn NULL;\n+}\n+\n+struct rte_gpu *\n+rte_gpu_allocate(const char *name)\n+{\n+\tint16_t dev_id;\n+\tstruct rte_gpu *dev;\n+\n+\tif (rte_eal_process_type() != RTE_PROC_PRIMARY) {\n+\t\tGPU_LOG(ERR, \"only primary process can allocate device\");\n+\t\trte_errno = EPERM;\n+\t\treturn NULL;\n+\t}\n+\tif (name == NULL) {\n+\t\tGPU_LOG(ERR, \"allocate device without a name\");\n+\t\trte_errno = EINVAL;\n+\t\treturn NULL;\n+\t}\n+\n+\t/* implicit initialization of library before adding first device */\n+\tif (gpus == NULL && rte_gpu_init(RTE_GPU_DEFAULT_MAX) < 0)\n+\t\treturn NULL;\n+\n+\tif (rte_gpu_get_by_name(name) != NULL) {\n+\t\tGPU_LOG(ERR, \"device with name %s already exists\", name);\n+\t\trte_errno = EEXIST;\n+\t\treturn NULL;\n+\t}\n+\tdev_id = gpu_find_free_id();\n+\tif (dev_id == RTE_GPU_ID_NONE) {\n+\t\tGPU_LOG(ERR, \"reached maximum number of devices\");\n+\t\trte_errno = ENOENT;\n+\t\treturn NULL;\n+\t}\n+\n+\tdev = &gpus[dev_id];\n+\tmemset(dev, 0, sizeof(*dev));\n+\n+\tif (rte_strscpy(dev->name, name, RTE_DEV_NAME_MAX_LEN) < 0) {\n+\t\tGPU_LOG(ERR, \"device name too long: %s\", name);\n+\t\trte_errno = ENAMETOOLONG;\n+\t\treturn NULL;\n+\t}\n+\tdev->info.name = dev->name;\n+\tdev->info.dev_id = dev_id;\n+\tdev->info.numa_node = -1;\n+\n+\tgpu_count++;\n+\tGPU_LOG(DEBUG, \"new device %s (id %d) of total %d\",\n+\t\t\tname, dev_id, gpu_count);\n+\treturn dev;\n+}\n+\n+void\n+rte_gpu_complete_new(struct rte_gpu *dev)\n+{\n+\tif (dev == NULL)\n+\t\treturn;\n+\n+\tdev->state = RTE_GPU_STATE_INITIALIZED;\n+}\n+\n+int\n+rte_gpu_release(struct rte_gpu *dev)\n+{\n+\tif (dev == NULL) {\n+\t\trte_errno = ENODEV;\n+\t\treturn -rte_errno;\n+\t}\n+\n+\tGPU_LOG(DEBUG, \"free device %s (id %d)\",\n+\t\t\tdev->info.name, dev->info.dev_id);\n+\tdev->state = RTE_GPU_STATE_UNUSED;\n+\tgpu_count--;\n+\n+\treturn 0;\n+}\n+\n+int\n+rte_gpu_close(int16_t dev_id)\n+{\n+\tint firsterr, binerr;\n+\tint *lasterr = &firsterr;\n+\tstruct rte_gpu *dev;\n+\n+\tdev = gpu_get_by_id(dev_id);\n+\tif (dev == NULL) {\n+\t\tGPU_LOG(ERR, \"close invalid device ID %d\", dev_id);\n+\t\trte_errno = ENODEV;\n+\t\treturn -rte_errno;\n+\t}\n+\n+\tif (dev->ops.dev_close != NULL) {\n+\t\t*lasterr = GPU_DRV_RET(dev->ops.dev_close(dev));\n+\t\tif (*lasterr != 0)\n+\t\t\tlasterr = &binerr;\n+\t}\n+\n+\t*lasterr = rte_gpu_release(dev);\n+\n+\trte_errno = -firsterr;\n+\treturn firsterr;\n+}\n+\n+int\n+rte_gpu_info_get(int16_t dev_id, struct rte_gpu_info *info)\n+{\n+\tstruct rte_gpu *dev;\n+\n+\tdev = gpu_get_by_id(dev_id);\n+\tif (dev == NULL) {\n+\t\tGPU_LOG(ERR, \"query invalid device ID %d\", dev_id);\n+\t\trte_errno = ENODEV;\n+\t\treturn -rte_errno;\n+\t}\n+\tif (info == NULL) {\n+\t\tGPU_LOG(ERR, \"query without storage\");\n+\t\trte_errno = EINVAL;\n+\t\treturn -rte_errno;\n+\t}\n+\n+\tif (dev->ops.dev_info_get == NULL) {\n+\t\t*info = dev->info;\n+\t\treturn 0;\n+\t}\n+\treturn GPU_DRV_RET(dev->ops.dev_info_get(dev, info));\n+}\ndiff --git a/lib/gpudev/gpudev_driver.h b/lib/gpudev/gpudev_driver.h\nnew file mode 100644\nindex 0000000000..9e096e3b64\n--- /dev/null\n+++ b/lib/gpudev/gpudev_driver.h\n@@ -0,0 +1,67 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2021 NVIDIA Corporation & Affiliates\n+ */\n+\n+/*\n+ * This header file must be included only by drivers.\n+ * It is considered internal, i.e. hidden for the application.\n+ * The prefix rte_ is used to avoid namespace clash in drivers.\n+ */\n+\n+#ifndef RTE_GPUDEV_DRIVER_H\n+#define RTE_GPUDEV_DRIVER_H\n+\n+#include <stdint.h>\n+\n+#include <rte_dev.h>\n+\n+#include \"rte_gpudev.h\"\n+\n+/* Flags indicate current state of device. */\n+enum rte_gpu_state {\n+\tRTE_GPU_STATE_UNUSED,        /* not initialized */\n+\tRTE_GPU_STATE_INITIALIZED,   /* initialized */\n+};\n+\n+struct rte_gpu;\n+typedef int (rte_gpu_close_t)(struct rte_gpu *dev);\n+typedef int (rte_gpu_info_get_t)(struct rte_gpu *dev, struct rte_gpu_info *info);\n+\n+struct rte_gpu_ops {\n+\t/* Get device info. If NULL, info is just copied. */\n+\trte_gpu_info_get_t *dev_info_get;\n+\t/* Close device. */\n+\trte_gpu_close_t *dev_close;\n+};\n+\n+struct rte_gpu {\n+\t/* Backing device. */\n+\tstruct rte_device *device;\n+\t/* Unique identifier name. */\n+\tchar name[RTE_DEV_NAME_MAX_LEN]; /* Updated by this library. */\n+\t/* Device info structure. */\n+\tstruct rte_gpu_info info;\n+\t/* Driver functions. */\n+\tstruct rte_gpu_ops ops;\n+\t/* Current state (used or not) in the running process. */\n+\tenum rte_gpu_state state; /* Updated by this library. */\n+\t/* Driver-specific private data for the running process. */\n+\tvoid *process_private;\n+} __rte_cache_aligned;\n+\n+__rte_internal\n+struct rte_gpu *rte_gpu_get_by_name(const char *name);\n+\n+/* First step of initialization */\n+__rte_internal\n+struct rte_gpu *rte_gpu_allocate(const char *name);\n+\n+/* Last step of initialization. */\n+__rte_internal\n+void rte_gpu_complete_new(struct rte_gpu *dev);\n+\n+/* Last step of removal. */\n+__rte_internal\n+int rte_gpu_release(struct rte_gpu *dev);\n+\n+#endif /* RTE_GPUDEV_DRIVER_H */\ndiff --git a/lib/gpudev/meson.build b/lib/gpudev/meson.build\nnew file mode 100644\nindex 0000000000..608154817b\n--- /dev/null\n+++ b/lib/gpudev/meson.build\n@@ -0,0 +1,10 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright (c) 2021 NVIDIA Corporation & Affiliates\n+\n+headers = files(\n+        'rte_gpudev.h',\n+)\n+\n+sources = files(\n+        'gpudev.c',\n+)\ndiff --git a/lib/gpudev/rte_gpudev.h b/lib/gpudev/rte_gpudev.h\nnew file mode 100644\nindex 0000000000..eb7cfa8c59\n--- /dev/null\n+++ b/lib/gpudev/rte_gpudev.h\n@@ -0,0 +1,168 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2021 NVIDIA Corporation & Affiliates\n+ */\n+\n+#ifndef RTE_GPUDEV_H\n+#define RTE_GPUDEV_H\n+\n+#include <stddef.h>\n+#include <stdint.h>\n+#include <stdbool.h>\n+\n+#include <rte_compat.h>\n+\n+/**\n+ * @file\n+ * Generic library to interact with GPU computing device.\n+ *\n+ * The API is not thread-safe.\n+ * Device management must be done by a single thread.\n+ *\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ */\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/** Maximum number of devices if rte_gpu_init() is not called. */\n+#define RTE_GPU_DEFAULT_MAX 32\n+\n+/** Empty device ID. */\n+#define RTE_GPU_ID_NONE -1\n+\n+/** Store device info. */\n+struct rte_gpu_info {\n+\t/** Unique identifier name. */\n+\tconst char *name;\n+\t/** Device ID. */\n+\tint16_t dev_id;\n+\t/** Total processors available on device. */\n+\tuint32_t processor_count;\n+\t/** Total memory available on device. */\n+\tsize_t total_memory;\n+\t/* Local NUMA memory ID. -1 if unknown. */\n+\tint16_t numa_node;\n+};\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Initialize the device array before probing devices.\n+ * If not called, the maximum of probed devices is RTE_GPU_DEFAULT_MAX.\n+ *\n+ * @param dev_max\n+ *   Maximum number of devices.\n+ *\n+ * @return\n+ *   0 on success, -rte_errno otherwise:\n+ *   - ENOMEM if out of memory\n+ *   - EINVAL if 0 size\n+ *   - EBUSY if already initialized\n+ */\n+__rte_experimental\n+int rte_gpu_init(size_t dev_max);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Return the number of GPU detected and associated to DPDK.\n+ *\n+ * @return\n+ *   The number of available computing devices.\n+ */\n+__rte_experimental\n+uint16_t rte_gpu_count_avail(void);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Check if the device is valid and initialized in DPDK.\n+ *\n+ * @param dev_id\n+ *   The input device ID.\n+ *\n+ * @return\n+ *   - True if dev_id is a valid and initialized computing device.\n+ *   - False otherwise.\n+ */\n+__rte_experimental\n+bool rte_gpu_is_valid(int16_t dev_id);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Get the ID of the next valid GPU initialized in DPDK.\n+ *\n+ * @param dev_id\n+ *   The initial device ID to start the research.\n+ *\n+ * @return\n+ *   Next device ID corresponding to a valid and initialized computing device,\n+ *   RTE_GPU_ID_NONE if there is none.\n+ */\n+__rte_experimental\n+int16_t rte_gpu_find_next(int16_t dev_id);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Macro to iterate over all valid GPU devices.\n+ *\n+ * @param dev_id\n+ *   The ID of the next possible valid device, usually 0 to iterate all.\n+ */\n+#define RTE_GPU_FOREACH(dev_id) \\\n+\tfor (dev_id = rte_gpu_find_next(0); \\\n+\t     dev_id > 0; \\\n+\t     dev_id = rte_gpu_find_next(dev_id + 1))\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Close device.\n+ * All resources are released.\n+ *\n+ * @param dev_id\n+ *   Device ID to close.\n+ *\n+ * @return\n+ *   0 on success, -rte_errno otherwise:\n+ *   - ENODEV if invalid dev_id\n+ *   - EPERM if driver error\n+ */\n+__rte_experimental\n+int rte_gpu_close(int16_t dev_id);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Return device specific info.\n+ *\n+ * @param dev_id\n+ *   Device ID to get info.\n+ * @param info\n+ *   Memory structure to fill with the info.\n+ *\n+ * @return\n+ *   0 on success, -rte_errno otherwise:\n+ *   - ENODEV if invalid dev_id\n+ *   - EINVAL if NULL info\n+ *   - EPERM if driver error\n+ */\n+__rte_experimental\n+int rte_gpu_info_get(int16_t dev_id, struct rte_gpu_info *info);\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* RTE_GPUDEV_H */\ndiff --git a/lib/gpudev/version.map b/lib/gpudev/version.map\nnew file mode 100644\nindex 0000000000..6ac6b327e2\n--- /dev/null\n+++ b/lib/gpudev/version.map\n@@ -0,0 +1,20 @@\n+EXPERIMENTAL {\n+\tglobal:\n+\n+\t# added in 21.11\n+\trte_gpu_close;\n+\trte_gpu_count_avail;\n+\trte_gpu_find_next;\n+\trte_gpu_info_get;\n+\trte_gpu_init;\n+\trte_gpu_is_valid;\n+};\n+\n+INTERNAL {\n+\tglobal:\n+\n+\trte_gpu_allocate;\n+\trte_gpu_complete_new;\n+\trte_gpu_get_by_name;\n+\trte_gpu_release;\n+};\ndiff --git a/lib/meson.build b/lib/meson.build\nindex 499d26060f..8537a5ab80 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -34,6 +34,7 @@ libraries = [\n         'distributor',\n         'efd',\n         'eventdev',\n+        'gpudev',\n         'gro',\n         'gso',\n         'ip_frag',\n",
    "prefixes": [
        "v5",
        "1/9"
    ]
}