get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 77583,
    "url": "http://patches.dpdk.org/api/patches/77583/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200914081727.12215-2-david.marchand@redhat.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": "<20200914081727.12215-2-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200914081727.12215-2-david.marchand@redhat.com",
    "date": "2020-09-14T08:17:23",
    "name": "[1/5] bus/pci: switch to private kernel driver enum",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4b7567240c3f4544c1f6df34348cccb74756e970",
    "submitter": {
        "id": 1173,
        "url": "http://patches.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200914081727.12215-2-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 12177,
            "url": "http://patches.dpdk.org/api/series/12177/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12177",
            "date": "2020-09-14T08:17:22",
            "name": "20.11 announced cleanups",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/12177/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/77583/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/77583/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id ABA06A04C9;\n\tMon, 14 Sep 2020 10:18:02 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 815FF2C36;\n\tMon, 14 Sep 2020 10:18:02 +0200 (CEST)",
            "from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com\n [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 3CBBA160\n for <dev@dpdk.org>; Mon, 14 Sep 2020 10:18:00 +0200 (CEST)",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-555-r31mHegvNY-0Ra9fovwUjA-1; Mon, 14 Sep 2020 04:17:55 -0400",
            "from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com\n [10.5.11.15])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 039A01007B00;\n Mon, 14 Sep 2020 08:17:53 +0000 (UTC)",
            "from dmarchan.remote.csb (unknown [10.40.193.82])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 758E375138;\n Mon, 14 Sep 2020 08:17:43 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1600071479;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=2PvzxxQhOcIfD0ZpsvnH73enWtBuR8pb3306L48y/nc=;\n b=WoOomW+bjxbLoMqbawmLLGqQD1VytmGkzQ9mZEKWqjrab1Y1Ev9x9cHNy8TWkhjLJuJd0L\n +andastJxVkx/fvzISdvqw9Ayy7ayZ8CguqMxEkDBcWvXB/Ve9Nelh3h3XpTXukhGCGNUV\n 6RcDBJ3qC7XwJwU9fgHE5RSDxa1nhrY=",
        "X-MC-Unique": "r31mHegvNY-0Ra9fovwUjA-1",
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>,\n John McNamara <john.mcnamara@intel.com>,\n Marko Kovacevic <marko.kovacevic@intel.com>,\n Ferruh Yigit <ferruh.yigit@intel.com>,\n Ziyang Xuan <xuanziyang2@huawei.com>,\n Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>,\n Guoyang Zhou <zhouguoyang@huawei.com>,\n \"Wei Hu (Xavier)\" <xavier.huwei@huawei.com>,\n \"Min Hu (Connor)\" <humin29@huawei.com>,\n Yisen Zhuang <yisen.zhuang@huawei.com>,\n Shijith Thotton <sthotton@marvell.com>,\n Srisivasubramanian Srinivasan <srinivasan@marvell.com>,\n Heinrich Kuhn <heinrich.kuhn@netronome.com>,\n Maxime Coquelin <maxime.coquelin@redhat.com>,\n Chenbo Xia <chenbo.xia@intel.com>, Zhihong Wang <zhihong.wang@intel.com>",
        "Date": "Mon, 14 Sep 2020 10:17:23 +0200",
        "Message-Id": "<20200914081727.12215-2-david.marchand@redhat.com>",
        "In-Reply-To": "<20200914081727.12215-1-david.marchand@redhat.com>",
        "References": "<20200914081727.12215-1-david.marchand@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.15",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com",
        "X-Mimecast-Spam-Score": "0.002",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Type": "text/plain; charset=US-ASCII",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 1/5] bus/pci: switch to private kernel driver enum",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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": "The rte_kernel_driver enum actually only pointed at PCI drivers and is\nonly used in the PCI subsystem.\nRemove it from the generic device API and use a private enum in the PCI\ncode.\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n doc/guides/rel_notes/deprecation.rst    |  4 --\n doc/guides/rel_notes/release_20_11.rst  |  3 ++\n drivers/bus/pci/bsd/pci.c               | 17 ++++---\n drivers/bus/pci/linux/pci.c             | 64 ++++++++++++-------------\n drivers/bus/pci/linux/pci_uio.c         |  2 +-\n drivers/bus/pci/pci_common.c            | 16 +++----\n drivers/bus/pci/rte_bus_pci.h           | 11 ++++-\n drivers/bus/pci/windows/pci.c           |  6 +--\n drivers/net/hinic/base/hinic_pmd_hwif.c |  2 +-\n drivers/net/hns3/hns3_ethdev_vf.c       |  4 +-\n drivers/net/liquidio/lio_ethdev.c       |  4 +-\n drivers/net/nfp/nfp_net.c               |  2 +-\n drivers/net/virtio/virtio_pci.c         |  2 +-\n lib/librte_eal/include/rte_dev.h        | 12 -----\n 14 files changed, 72 insertions(+), 77 deletions(-)",
    "diff": "diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst\nindex f13248a0fe..d9357fa182 100644\n--- a/doc/guides/rel_notes/deprecation.rst\n+++ b/doc/guides/rel_notes/deprecation.rst\n@@ -124,10 +124,6 @@ Deprecation Notices\n   With this removal, there won't be a need for the mentioned workaround which\n   will be reverted.\n \n-* pci: The ``rte_kernel_driver`` enum defined in rte_dev.h will be made private\n-  to the PCI subsystem as it is used only by the PCI bus driver and PCI\n-  drivers.\n-\n * mbuf: Some fields will be converted to dynamic API in DPDK 20.11\n   in order to reserve more space for the dynamic fields, as explained in\n   `this presentation <https://www.youtube.com/watch?v=Ttl6MlhmzWY>`_.\ndiff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst\nindex 442b201678..bffbe31947 100644\n--- a/doc/guides/rel_notes/release_20_11.rst\n+++ b/doc/guides/rel_notes/release_20_11.rst\n@@ -87,6 +87,9 @@ API Changes\n * eal: The ``rte_logs`` struct and global symbol was made private\n   and is no longer part of the API.\n \n+* pci: Removed the ``rte_kernel_driver`` enum defined in rte_dev.h and\n+  replaced with a private enum in the PCI subsystem.\n+\n * ethdev: Removed the ``kdrv`` field in the ethdev ``rte_eth_dev_data``\n   structure as it gave no useful abstracted information to the applications.\n \ndiff --git a/drivers/bus/pci/bsd/pci.c b/drivers/bus/pci/bsd/pci.c\nindex 6ec27b4b5b..a07fc241fe 100644\n--- a/drivers/bus/pci/bsd/pci.c\n+++ b/drivers/bus/pci/bsd/pci.c\n@@ -65,7 +65,7 @@ rte_pci_map_device(struct rte_pci_device *dev)\n \n \t/* try mapping the NIC resources */\n \tswitch (dev->kdrv) {\n-\tcase RTE_KDRV_NIC_UIO:\n+\tcase RTE_PCI_KDRV_NIC_UIO:\n \t\t/* map resources for devices that use uio */\n \t\tret = pci_uio_map_resource(dev);\n \t\tbreak;\n@@ -85,7 +85,7 @@ rte_pci_unmap_device(struct rte_pci_device *dev)\n {\n \t/* try unmapping the NIC resources */\n \tswitch (dev->kdrv) {\n-\tcase RTE_KDRV_NIC_UIO:\n+\tcase RTE_PCI_KDRV_NIC_UIO:\n \t\t/* unmap resources for devices that use uio */\n \t\tpci_uio_unmap_resource(dev);\n \t\tbreak;\n@@ -255,7 +255,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)\n \tpci_name_set(dev);\n \n \t/* FreeBSD has only one pass through driver */\n-\tdev->kdrv = RTE_KDRV_NIC_UIO;\n+\tdev->kdrv = RTE_PCI_KDRV_NIC_UIO;\n \n \t/* parse resources */\n \tswitch (conf->pc_hdr & PCIM_HDRTYPE) {\n@@ -395,8 +395,7 @@ enum rte_iova_mode\n pci_device_iova_mode(const struct rte_pci_driver *pdrv __rte_unused,\n \t\t     const struct rte_pci_device *pdev)\n {\n-\t/* Supports only RTE_KDRV_NIC_UIO */\n-\tif (pdev->kdrv != RTE_KDRV_NIC_UIO)\n+\tif (pdev->kdrv != RTE_PCI_KDRV_NIC_UIO)\n \t\tRTE_LOG(DEBUG, EAL, \"Unsupported kernel driver? Defaulting to IOVA as 'PA'\\n\");\n \n \treturn RTE_IOVA_PA;\n@@ -548,7 +547,7 @@ rte_pci_ioport_map(struct rte_pci_device *dev, int bar,\n \n \tswitch (dev->kdrv) {\n #if defined(RTE_ARCH_X86)\n-\tcase RTE_KDRV_NIC_UIO:\n+\tcase RTE_PCI_KDRV_NIC_UIO:\n \t\tif (rte_eal_iopl_init() != 0) {\n \t\t\tRTE_LOG(ERR, EAL, \"%s(): insufficient ioport permissions for PCI device %s\\n\",\n \t\t\t\t__func__, dev->name);\n@@ -606,7 +605,7 @@ rte_pci_ioport_read(struct rte_pci_ioport *p,\n \t\tvoid *data, size_t len, off_t offset)\n {\n \tswitch (p->dev->kdrv) {\n-\tcase RTE_KDRV_NIC_UIO:\n+\tcase RTE_PCI_KDRV_NIC_UIO:\n \t\tpci_uio_ioport_read(p, data, len, offset);\n \t\tbreak;\n \tdefault:\n@@ -648,7 +647,7 @@ rte_pci_ioport_write(struct rte_pci_ioport *p,\n \t\tconst void *data, size_t len, off_t offset)\n {\n \tswitch (p->dev->kdrv) {\n-\tcase RTE_KDRV_NIC_UIO:\n+\tcase RTE_PCI_KDRV_NIC_UIO:\n \t\tpci_uio_ioport_write(p, data, len, offset);\n \t\tbreak;\n \tdefault:\n@@ -663,7 +662,7 @@ rte_pci_ioport_unmap(struct rte_pci_ioport *p)\n \n \tswitch (p->dev->kdrv) {\n #if defined(RTE_ARCH_X86)\n-\tcase RTE_KDRV_NIC_UIO:\n+\tcase RTE_PCI_KDRV_NIC_UIO:\n \t\tret = 0;\n \t\tbreak;\n #endif\ndiff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c\nindex a2198abf43..bf275947f4 100644\n--- a/drivers/bus/pci/linux/pci.c\n+++ b/drivers/bus/pci/linux/pci.c\n@@ -68,14 +68,14 @@ rte_pci_map_device(struct rte_pci_device *dev)\n \n \t/* try mapping the NIC resources using VFIO if it exists */\n \tswitch (dev->kdrv) {\n-\tcase RTE_KDRV_VFIO:\n+\tcase RTE_PCI_KDRV_VFIO:\n #ifdef VFIO_PRESENT\n \t\tif (pci_vfio_is_enabled())\n \t\t\tret = pci_vfio_map_resource(dev);\n #endif\n \t\tbreak;\n-\tcase RTE_KDRV_IGB_UIO:\n-\tcase RTE_KDRV_UIO_GENERIC:\n+\tcase RTE_PCI_KDRV_IGB_UIO:\n+\tcase RTE_PCI_KDRV_UIO_GENERIC:\n \t\tif (rte_eal_using_phys_addrs()) {\n \t\t\t/* map resources for devices that use uio */\n \t\t\tret = pci_uio_map_resource(dev);\n@@ -97,14 +97,14 @@ rte_pci_unmap_device(struct rte_pci_device *dev)\n {\n \t/* try unmapping the NIC resources using VFIO if it exists */\n \tswitch (dev->kdrv) {\n-\tcase RTE_KDRV_VFIO:\n+\tcase RTE_PCI_KDRV_VFIO:\n #ifdef VFIO_PRESENT\n \t\tif (pci_vfio_is_enabled())\n \t\t\tpci_vfio_unmap_resource(dev);\n #endif\n \t\tbreak;\n-\tcase RTE_KDRV_IGB_UIO:\n-\tcase RTE_KDRV_UIO_GENERIC:\n+\tcase RTE_PCI_KDRV_IGB_UIO:\n+\tcase RTE_PCI_KDRV_UIO_GENERIC:\n \t\t/* unmap resources for devices that use uio */\n \t\tpci_uio_unmap_resource(dev);\n \t\tbreak;\n@@ -323,15 +323,15 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)\n \n \tif (!ret) {\n \t\tif (!strcmp(driver, \"vfio-pci\"))\n-\t\t\tdev->kdrv = RTE_KDRV_VFIO;\n+\t\t\tdev->kdrv = RTE_PCI_KDRV_VFIO;\n \t\telse if (!strcmp(driver, \"igb_uio\"))\n-\t\t\tdev->kdrv = RTE_KDRV_IGB_UIO;\n+\t\t\tdev->kdrv = RTE_PCI_KDRV_IGB_UIO;\n \t\telse if (!strcmp(driver, \"uio_pci_generic\"))\n-\t\t\tdev->kdrv = RTE_KDRV_UIO_GENERIC;\n+\t\t\tdev->kdrv = RTE_PCI_KDRV_UIO_GENERIC;\n \t\telse\n-\t\t\tdev->kdrv = RTE_KDRV_UNKNOWN;\n+\t\t\tdev->kdrv = RTE_PCI_KDRV_UNKNOWN;\n \t} else {\n-\t\tdev->kdrv = RTE_KDRV_NONE;\n+\t\tdev->kdrv = RTE_PCI_KDRV_NONE;\n \t\treturn 0;\n \t}\n \t/* device is valid, add in list (sorted) */\n@@ -608,7 +608,7 @@ pci_device_iova_mode(const struct rte_pci_driver *pdrv,\n \tenum rte_iova_mode iova_mode = RTE_IOVA_DC;\n \n \tswitch (pdev->kdrv) {\n-\tcase RTE_KDRV_VFIO: {\n+\tcase RTE_PCI_KDRV_VFIO: {\n #ifdef VFIO_PRESENT\n \t\tstatic int is_vfio_noiommu_enabled = -1;\n \n@@ -626,8 +626,8 @@ pci_device_iova_mode(const struct rte_pci_driver *pdrv,\n \t\tbreak;\n \t}\n \n-\tcase RTE_KDRV_IGB_UIO:\n-\tcase RTE_KDRV_UIO_GENERIC:\n+\tcase RTE_PCI_KDRV_IGB_UIO:\n+\tcase RTE_PCI_KDRV_UIO_GENERIC:\n \t\tiova_mode = RTE_IOVA_PA;\n \t\tbreak;\n \n@@ -647,11 +647,11 @@ int rte_pci_read_config(const struct rte_pci_device *device,\n \tconst struct rte_intr_handle *intr_handle = &device->intr_handle;\n \n \tswitch (device->kdrv) {\n-\tcase RTE_KDRV_IGB_UIO:\n-\tcase RTE_KDRV_UIO_GENERIC:\n+\tcase RTE_PCI_KDRV_IGB_UIO:\n+\tcase RTE_PCI_KDRV_UIO_GENERIC:\n \t\treturn pci_uio_read_config(intr_handle, buf, len, offset);\n #ifdef VFIO_PRESENT\n-\tcase RTE_KDRV_VFIO:\n+\tcase RTE_PCI_KDRV_VFIO:\n \t\treturn pci_vfio_read_config(intr_handle, buf, len, offset);\n #endif\n \tdefault:\n@@ -671,11 +671,11 @@ int rte_pci_write_config(const struct rte_pci_device *device,\n \tconst struct rte_intr_handle *intr_handle = &device->intr_handle;\n \n \tswitch (device->kdrv) {\n-\tcase RTE_KDRV_IGB_UIO:\n-\tcase RTE_KDRV_UIO_GENERIC:\n+\tcase RTE_PCI_KDRV_IGB_UIO:\n+\tcase RTE_PCI_KDRV_UIO_GENERIC:\n \t\treturn pci_uio_write_config(intr_handle, buf, len, offset);\n #ifdef VFIO_PRESENT\n-\tcase RTE_KDRV_VFIO:\n+\tcase RTE_PCI_KDRV_VFIO:\n \t\treturn pci_vfio_write_config(intr_handle, buf, len, offset);\n #endif\n \tdefault:\n@@ -760,15 +760,15 @@ rte_pci_ioport_map(struct rte_pci_device *dev, int bar,\n \n \tswitch (dev->kdrv) {\n #ifdef VFIO_PRESENT\n-\tcase RTE_KDRV_VFIO:\n+\tcase RTE_PCI_KDRV_VFIO:\n \t\tif (pci_vfio_is_enabled())\n \t\t\tret = pci_vfio_ioport_map(dev, bar, p);\n \t\tbreak;\n #endif\n-\tcase RTE_KDRV_IGB_UIO:\n+\tcase RTE_PCI_KDRV_IGB_UIO:\n \t\tret = pci_uio_ioport_map(dev, bar, p);\n \t\tbreak;\n-\tcase RTE_KDRV_UIO_GENERIC:\n+\tcase RTE_PCI_KDRV_UIO_GENERIC:\n #if defined(RTE_ARCH_X86)\n \t\tret = pci_ioport_map(dev, bar, p);\n #else\n@@ -791,14 +791,14 @@ rte_pci_ioport_read(struct rte_pci_ioport *p,\n {\n \tswitch (p->dev->kdrv) {\n #ifdef VFIO_PRESENT\n-\tcase RTE_KDRV_VFIO:\n+\tcase RTE_PCI_KDRV_VFIO:\n \t\tpci_vfio_ioport_read(p, data, len, offset);\n \t\tbreak;\n #endif\n-\tcase RTE_KDRV_IGB_UIO:\n+\tcase RTE_PCI_KDRV_IGB_UIO:\n \t\tpci_uio_ioport_read(p, data, len, offset);\n \t\tbreak;\n-\tcase RTE_KDRV_UIO_GENERIC:\n+\tcase RTE_PCI_KDRV_UIO_GENERIC:\n \t\tpci_uio_ioport_read(p, data, len, offset);\n \t\tbreak;\n \tdefault:\n@@ -812,14 +812,14 @@ rte_pci_ioport_write(struct rte_pci_ioport *p,\n {\n \tswitch (p->dev->kdrv) {\n #ifdef VFIO_PRESENT\n-\tcase RTE_KDRV_VFIO:\n+\tcase RTE_PCI_KDRV_VFIO:\n \t\tpci_vfio_ioport_write(p, data, len, offset);\n \t\tbreak;\n #endif\n-\tcase RTE_KDRV_IGB_UIO:\n+\tcase RTE_PCI_KDRV_IGB_UIO:\n \t\tpci_uio_ioport_write(p, data, len, offset);\n \t\tbreak;\n-\tcase RTE_KDRV_UIO_GENERIC:\n+\tcase RTE_PCI_KDRV_UIO_GENERIC:\n \t\tpci_uio_ioport_write(p, data, len, offset);\n \t\tbreak;\n \tdefault:\n@@ -834,15 +834,15 @@ rte_pci_ioport_unmap(struct rte_pci_ioport *p)\n \n \tswitch (p->dev->kdrv) {\n #ifdef VFIO_PRESENT\n-\tcase RTE_KDRV_VFIO:\n+\tcase RTE_PCI_KDRV_VFIO:\n \t\tif (pci_vfio_is_enabled())\n \t\t\tret = pci_vfio_ioport_unmap(p);\n \t\tbreak;\n #endif\n-\tcase RTE_KDRV_IGB_UIO:\n+\tcase RTE_PCI_KDRV_IGB_UIO:\n \t\tret = pci_uio_ioport_unmap(p);\n \t\tbreak;\n-\tcase RTE_KDRV_UIO_GENERIC:\n+\tcase RTE_PCI_KDRV_UIO_GENERIC:\n #if defined(RTE_ARCH_X86)\n \t\tret = 0;\n #else\ndiff --git a/drivers/bus/pci/linux/pci_uio.c b/drivers/bus/pci/linux/pci_uio.c\nindex 097dc19225..a354920d5f 100644\n--- a/drivers/bus/pci/linux/pci_uio.c\n+++ b/drivers/bus/pci/linux/pci_uio.c\n@@ -248,7 +248,7 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,\n \t\tgoto error;\n \t}\n \n-\tif (dev->kdrv == RTE_KDRV_IGB_UIO)\n+\tif (dev->kdrv == RTE_PCI_KDRV_IGB_UIO)\n \t\tdev->intr_handle.type = RTE_INTR_HANDLE_UIO;\n \telse {\n \t\tdev->intr_handle.type = RTE_INTR_HANDLE_UIO_INTX;\ndiff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c\nindex a8e5fd52c1..dddf2b2aad 100644\n--- a/drivers/bus/pci/pci_common.c\n+++ b/drivers/bus/pci/pci_common.c\n@@ -465,7 +465,7 @@ pci_hot_unplug_handler(struct rte_device *dev)\n \n \tswitch (pdev->kdrv) {\n #ifdef HAVE_VFIO_DEV_REQ_INTERFACE\n-\tcase RTE_KDRV_VFIO:\n+\tcase RTE_PCI_KDRV_VFIO:\n \t\t/*\n \t\t * vfio kernel module guaranty the pci device would not be\n \t\t * deleted until the user space release the resource, so no\n@@ -476,9 +476,9 @@ pci_hot_unplug_handler(struct rte_device *dev)\n \t\t\t\t\t       RTE_DEV_EVENT_REMOVE);\n \t\tbreak;\n #endif\n-\tcase RTE_KDRV_IGB_UIO:\n-\tcase RTE_KDRV_UIO_GENERIC:\n-\tcase RTE_KDRV_NIC_UIO:\n+\tcase RTE_PCI_KDRV_IGB_UIO:\n+\tcase RTE_PCI_KDRV_UIO_GENERIC:\n+\tcase RTE_PCI_KDRV_NIC_UIO:\n \t\t/* BARs resource is invalid, remap it to be safe. */\n \t\tret = pci_uio_remap_resource(pdev);\n \t\tbreak;\n@@ -552,7 +552,7 @@ pci_dma_map(struct rte_device *dev, void *addr, uint64_t iova, size_t len)\n \t *  In case driver don't provides any specific mapping\n \t *  try fallback to VFIO.\n \t */\n-\tif (pdev->kdrv == RTE_KDRV_VFIO)\n+\tif (pdev->kdrv == RTE_PCI_KDRV_VFIO)\n \t\treturn rte_vfio_container_dma_map\n \t\t\t\t(RTE_VFIO_DEFAULT_CONTAINER_FD, (uintptr_t)addr,\n \t\t\t\t iova, len);\n@@ -575,7 +575,7 @@ pci_dma_unmap(struct rte_device *dev, void *addr, uint64_t iova, size_t len)\n \t *  In case driver don't provides any specific mapping\n \t *  try fallback to VFIO.\n \t */\n-\tif (pdev->kdrv == RTE_KDRV_VFIO)\n+\tif (pdev->kdrv == RTE_PCI_KDRV_VFIO)\n \t\treturn rte_vfio_container_dma_unmap\n \t\t\t\t(RTE_VFIO_DEFAULT_CONTAINER_FD, (uintptr_t)addr,\n \t\t\t\t iova, len);\n@@ -622,8 +622,8 @@ rte_pci_get_iommu_class(void)\n \t\t\tiommu_no_va = pci_device_iommu_support_va(dev)\n \t\t\t\t\t? 0 : 1;\n \n-\t\tif (dev->kdrv == RTE_KDRV_UNKNOWN ||\n-\t\t    dev->kdrv == RTE_KDRV_NONE)\n+\t\tif (dev->kdrv == RTE_PCI_KDRV_UNKNOWN ||\n+\t\t    dev->kdrv == RTE_PCI_KDRV_NONE)\n \t\t\tcontinue;\n \t\tFOREACH_DRIVER_ON_PCIBUS(drv) {\n \t\t\tenum rte_iova_mode dev_iova_mode;\ndiff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h\nindex 29bea6d70d..ff6f072470 100644\n--- a/drivers/bus/pci/rte_bus_pci.h\n+++ b/drivers/bus/pci/rte_bus_pci.h\n@@ -51,6 +51,15 @@ TAILQ_HEAD(rte_pci_driver_list, rte_pci_driver);\n \n struct rte_devargs;\n \n+enum rte_pci_kernel_driver {\n+\tRTE_PCI_KDRV_UNKNOWN = 0,\n+\tRTE_PCI_KDRV_IGB_UIO,\n+\tRTE_PCI_KDRV_VFIO,\n+\tRTE_PCI_KDRV_UIO_GENERIC,\n+\tRTE_PCI_KDRV_NIC_UIO,\n+\tRTE_PCI_KDRV_NONE,\n+};\n+\n /**\n  * A structure describing a PCI device.\n  */\n@@ -64,7 +73,7 @@ struct rte_pci_device {\n \tstruct rte_intr_handle intr_handle; /**< Interrupt handle */\n \tstruct rte_pci_driver *driver;      /**< PCI driver used in probing */\n \tuint16_t max_vfs;                   /**< sriov enable if not zero */\n-\tenum rte_kernel_driver kdrv;        /**< Kernel driver passthrough */\n+\tenum rte_pci_kernel_driver kdrv;    /**< Kernel driver passthrough */\n \tchar name[PCI_PRI_STR_SIZE+1];      /**< PCI location (ASCII) */\n \tstruct rte_intr_handle vfio_req_intr_handle;\n \t\t\t\t/**< Handler of VFIO request interrupt */\ndiff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c\nindex c80bd55716..9e5c8fafb0 100644\n--- a/drivers/bus/pci/windows/pci.c\n+++ b/drivers/bus/pci/windows/pci.c\n@@ -211,7 +211,7 @@ get_device_resource_info(HDEVINFO dev_info,\n \tBOOL  res;\n \n \tswitch (dev->kdrv) {\n-\tcase RTE_KDRV_NONE:\n+\tcase RTE_PCI_KDRV_NONE:\n \t\t/* Get NUMA node using DEVPKEY_Device_Numa_Node */\n \t\tres = SetupDiGetDevicePropertyW(dev_info, dev_info_data,\n \t\t\t&DEVPKEY_Device_Numa_Node, &property_type,\n@@ -223,7 +223,7 @@ get_device_resource_info(HDEVINFO dev_info,\n \t\t\treturn -1;\n \t\t}\n \t\tdev->device.numa_node = numa_node;\n-\t\t/* mem_resource - Unneeded for RTE_KDRV_NONE */\n+\t\t/* mem_resource - Unneeded for RTE_PCI_KDRV_NONE */\n \t\tdev->mem_resource[0].phys_addr = 0;\n \t\tdev->mem_resource[0].len = 0;\n \t\tdev->mem_resource[0].addr = NULL;\n@@ -292,7 +292,7 @@ get_kernel_driver_type(struct rte_pci_device *dev)\n \t * If another kernel driver is supported the relevant checking\n \t * functions should be here\n \t */\n-\tdev->kdrv = RTE_KDRV_NONE;\n+\tdev->kdrv = RTE_PCI_KDRV_NONE;\n }\n \n static int\ndiff --git a/drivers/net/hinic/base/hinic_pmd_hwif.c b/drivers/net/hinic/base/hinic_pmd_hwif.c\nindex d7fc1af707..26fa1e27d4 100644\n--- a/drivers/net/hinic/base/hinic_pmd_hwif.c\n+++ b/drivers/net/hinic/base/hinic_pmd_hwif.c\n@@ -280,7 +280,7 @@ void hinic_set_msix_state(void *hwdev, u16 msix_idx, enum hinic_msix_state flag)\n \t/* vfio-pci does not mmap msi-x vector table to user space,\n \t * we can not access the space when kernel driver is vfio-pci\n \t */\n-\tif (hw->pcidev_hdl->kdrv == RTE_KDRV_VFIO)\n+\tif (hw->pcidev_hdl->kdrv == RTE_PCI_KDRV_VFIO)\n \t\treturn;\n \n \tmask_bits = readl(hwif->intr_regs_base + offset);\ndiff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c\nindex 1d2941f0e3..63089d0bd4 100644\n--- a/drivers/net/hns3/hns3_ethdev_vf.c\n+++ b/drivers/net/hns3/hns3_ethdev_vf.c\n@@ -2425,8 +2425,8 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)\n \t\t * UIO enables msix by writing the pcie configuration space\n \t\t * vfio_pci enables msix in rte_intr_enable.\n \t\t */\n-\t\tif (pci_dev->kdrv == RTE_KDRV_IGB_UIO ||\n-\t\t    pci_dev->kdrv == RTE_KDRV_UIO_GENERIC) {\n+\t\tif (pci_dev->kdrv == RTE_PCI_KDRV_IGB_UIO ||\n+\t\t    pci_dev->kdrv == RTE_PCI_KDRV_UIO_GENERIC) {\n \t\t\tif (hns3vf_enable_msix(pci_dev, true))\n \t\t\t\thns3_err(hw, \"Failed to enable msix\");\n \t\t}\ndiff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c\nindex 2258838c4c..2c2b27e62a 100644\n--- a/drivers/net/liquidio/lio_ethdev.c\n+++ b/drivers/net/liquidio/lio_ethdev.c\n@@ -1563,7 +1563,7 @@ lio_dev_close(struct rte_eth_dev *eth_dev)\n \t/* Reset ioq regs */\n \tlio_dev->fn_list.setup_device_regs(lio_dev);\n \n-\tif (lio_dev->pci_dev->kdrv == RTE_KDRV_IGB_UIO) {\n+\tif (lio_dev->pci_dev->kdrv == RTE_PCI_KDRV_IGB_UIO) {\n \t\tcn23xx_vf_ask_pf_to_do_flr(lio_dev);\n \t\trte_delay_ms(LIO_PCI_FLR_WAIT);\n \t}\n@@ -2012,7 +2012,7 @@ lio_first_time_init(struct lio_device *lio_dev,\n \t\tgoto error;\n \n \t/* Request and wait for device reset. */\n-\tif (pdev->kdrv == RTE_KDRV_IGB_UIO) {\n+\tif (pdev->kdrv == RTE_PCI_KDRV_IGB_UIO) {\n \t\tcn23xx_vf_ask_pf_to_do_flr(lio_dev);\n \t\t/* FLR wait time doubled as a precaution. */\n \t\trte_delay_ms(LIO_PCI_FLR_WAIT * 2);\ndiff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c\nindex 99946279db..1cf949a9ab 100644\n--- a/drivers/net/nfp/nfp_net.c\n+++ b/drivers/net/nfp/nfp_net.c\n@@ -3614,7 +3614,7 @@ static int nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \t * interface. Here we avoid this telling to the CPP init code to\n \t * use a lock file if UIO is being used.\n \t */\n-\tif (dev->kdrv == RTE_KDRV_VFIO)\n+\tif (dev->kdrv == RTE_PCI_KDRV_VFIO)\n \t\tcpp = nfp_cpp_from_device_name(dev, 0);\n \telse\n \t\tcpp = nfp_cpp_from_device_name(dev, 1);\ndiff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c\nindex 29a354bf76..9915eabf68 100644\n--- a/drivers/net/virtio/virtio_pci.c\n+++ b/drivers/net/virtio/virtio_pci.c\n@@ -704,7 +704,7 @@ vtpci_init(struct rte_pci_device *dev, struct virtio_hw *hw)\n \tPMD_INIT_LOG(INFO, \"trying with legacy virtio pci.\");\n \tif (rte_pci_ioport_map(dev, 0, VTPCI_IO(hw)) < 0) {\n \t\trte_pci_unmap_device(dev);\n-\t\tif (dev->kdrv == RTE_KDRV_UNKNOWN &&\n+\t\tif (dev->kdrv == RTE_PCI_KDRV_UNKNOWN &&\n \t\t    (!dev->device.devargs ||\n \t\t     dev->device.devargs->bus !=\n \t\t     rte_bus_find_by_name(\"pci\"))) {\ndiff --git a/lib/librte_eal/include/rte_dev.h b/lib/librte_eal/include/rte_dev.h\nindex c8d985fb5c..53c8bc6fab 100644\n--- a/lib/librte_eal/include/rte_dev.h\n+++ b/lib/librte_eal/include/rte_dev.h\n@@ -54,18 +54,6 @@ typedef void (*rte_dev_event_cb_fn)(const char *device_name,\n \t\treturn; \\\n } while (0)\n \n-/**\n- * Device driver.\n- */\n-enum rte_kernel_driver {\n-\tRTE_KDRV_UNKNOWN = 0,\n-\tRTE_KDRV_IGB_UIO,\n-\tRTE_KDRV_VFIO,\n-\tRTE_KDRV_UIO_GENERIC,\n-\tRTE_KDRV_NIC_UIO,\n-\tRTE_KDRV_NONE,\n-};\n-\n /**\n  * Device policies.\n  */\n",
    "prefixes": [
        "1/5"
    ]
}