get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45601,
    "url": "http://patches.dpdk.org/api/patches/45601/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180928164039.2380-4-thomas@monjalon.net/",
    "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": "<20180928164039.2380-4-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180928164039.2380-4-thomas@monjalon.net",
    "date": "2018-09-28T16:40:39",
    "name": "[v2,3/3] eal: allow probing a device again",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4b9c98fe81185068e6af6cf8932b1e7d3f49127b",
    "submitter": {
        "id": 685,
        "url": "http://patches.dpdk.org/api/people/685/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas@monjalon.net"
    },
    "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/20180928164039.2380-4-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 1580,
            "url": "http://patches.dpdk.org/api/series/1580/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1580",
            "date": "2018-09-28T16:40:37",
            "name": "eal: allow hotplug to skip an already probed device",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/1580/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/45601/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/45601/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9D5DA1B494;\n\tFri, 28 Sep 2018 18:41:01 +0200 (CEST)",
            "from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com\n\t[66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 33CB61B468\n\tfor <dev@dpdk.org>; Fri, 28 Sep 2018 18:40:51 +0200 (CEST)",
            "from compute1.internal (compute1.nyi.internal [10.202.2.41])\n\tby mailout.nyi.internal (Postfix) with ESMTP id B1CB221FC7;\n\tFri, 28 Sep 2018 12:40:49 -0400 (EDT)",
            "from mailfrontend2 ([10.202.2.163])\n\tby compute1.internal (MEProxy); Fri, 28 Sep 2018 12:40:50 -0400",
            "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n\tby mail.messagingengine.com (Postfix) with ESMTPA id 69ED5102D6;\n\tFri, 28 Sep 2018 12:40:48 -0400 (EDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n\tcc:content-transfer-encoding:date:from:in-reply-to:message-id\n\t:mime-version:references:subject:to:x-me-sender:x-me-sender\n\t:x-sasl-enc; s=mesmtp; bh=+ULyQTGIGoAxbiOhA83OYKru5u0PnJ1yWj9NUd\n\tWSdso=; b=LcE97/06oTfymmd0BS+gmxwEFqjHK6ZrEu3cYCmjL8blIY8Pju/WAH\n\tMxCC1m5xZmkEpa68w2garAIYP/Pkx8uu4NkzzOrFtL9+6FvSlrVmn5RrlXBI7Kqc\n\tIuAMyw0gmnlY+jQO30Blq1MFFdw/a6e/5Myd9WtF/UMxMfAKce70o=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:content-transfer-encoding:date:from\n\t:in-reply-to:message-id:mime-version:references:subject:to\n\t:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=+ULyQTGIGoAxbiOhA\n\t83OYKru5u0PnJ1yWj9NUdWSdso=; b=KQb1cl5+pOxjCGimf5kWIquXYSFwfpR2T\n\ttYDWW3cJg3iLH0c03hbPDMubUqjTLQGAAH/Jd3FdzdGkn+rhP6R9I7L+0HhxN93w\n\tyrcRjy2fOOt3f4Zd/YgsgqQ/jhFrxDdvD96EcfaEi3Y0umhR5OPilJytgTGbwpTB\n\txbeFuYaZtTqQfIa+hSUpaiSsehTr8LuJUXIWDJPCI313lL3BlCuY4AM+co1IYyST\n\t1uw04QX26C5cvr0vTlEIqVCHWWGZ1WZzoaMeZ80EIYQ3gFAhvCPvTzpNhssbFK98\n\tpR/LRFOTpHjuKXTepap5UTYsPPlJNfqc7FCUffYuQfoLcAODRpyIg=="
        ],
        "X-ME-Proxy": "<xmx:kVmuW76Lo28rm7RwrNKJKrWjuo_OlJh0SqXpJcWu7bwRsnKkOB3rhQ>\n\t<xmx:kVmuWynjpPRV6kV7I5ki5djrHjYaHPgmmZlSpVBpJZpC8zD4e09Qsw>\n\t<xmx:kVmuWx40orUqgszvbkUR2a0kHFDwOKvyYhmbpXWHSDMHi7iMxVwHDw>\n\t<xmx:kVmuW1za6WUTYVJHOMqKQd9-KBDh_H-yVNT30gvkRGEEkutKM-LYdw>\n\t<xmx:kVmuWyIztzzs1Q2SBrCDuIsPdJj1vDslTqxbTB0vmT_QSPntkd2BwA>\n\t<xmx:kVmuWwnH_gCr1AH4KLc0GBhV_mS4l8n51ronNBXYSHX8eh2FXr93ag>",
        "X-ME-Sender": "<xms:kVmuW1G7jOAX4UKPml6Ug-tUk9U3bFYEzYjVcxgXWfm6LzV3w6qTFQ>",
        "From": "Thomas Monjalon <thomas@monjalon.net>",
        "To": "dev@dpdk.org",
        "Cc": "gaetan.rivet@6wind.com, ophirmu@mellanox.com, qi.z.zhang@intel.com,\n\tferruh.yigit@intel.com",
        "Date": "Fri, 28 Sep 2018 18:40:39 +0200",
        "Message-Id": "<20180928164039.2380-4-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.19.0",
        "In-Reply-To": "<20180928164039.2380-1-thomas@monjalon.net>",
        "References": "<20180907230958.21402-1-thomas@monjalon.net>\n\t<20180928164039.2380-1-thomas@monjalon.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 3/3] eal: allow probing a device again",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "In the devargs syntax for device representors, it is possible to add\nseveral devices at once: -w dbdf,representor=[0-3]\nIt will become a more frequent case when introducing wildcards\nand ranges in the new devargs syntax.\n\nIf a devargs string is provided for probing, and updated with a bigger\nrange for a new probing, then we do not want it to fail because\npart of this range was already probed previously.\nThere can be new ports to create from an existing rte_device.\n\nThat's why the checks for an already probed device\nare moved as PMD responsibility.\nOnly the PMD knows the ports attached to one rte_device.\n\nIn the case of vdev, a global check is kept in insert_vdev(),\nassuming that a vdev will always have only one port.\nIn the case of NXP buses, the probing is done only once (no hotplug),\nthough a check is added at bus level for consistency.\n\nAs another consequence of being able to probe in several steps,\nthe field rte_device.devargs must not be considered as a full\nrepresentation of the rte_device, but only the latest probing args.\nAnyway, the field rte_device.devargs is used only for probing.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n drivers/bus/dpaa/dpaa_bus.c                |  3 +++\n drivers/bus/fslmc/fslmc_bus.c              |  3 +++\n drivers/bus/ifpga/ifpga_bus.c              | 13 ++++++-----\n drivers/bus/pci/pci_common.c               | 15 +++++++------\n drivers/bus/vdev/vdev.c                    |  5 +++++\n drivers/bus/vmbus/vmbus_common.c           | 25 +++++++++++-----------\n drivers/common/qat/Makefile                |  3 ++-\n drivers/common/qat/meson.build             |  1 +\n drivers/common/qat/qat_device.c            |  3 +++\n drivers/compress/octeontx/otx_zip_pmd.c    |  3 +++\n drivers/crypto/virtio/Makefile             |  1 +\n drivers/crypto/virtio/meson.build          |  1 +\n drivers/crypto/virtio/virtio_cryptodev.c   |  3 +++\n drivers/event/octeontx/ssovf_probe.c       |  6 ++++++\n drivers/event/skeleton/Makefile            |  1 +\n drivers/event/skeleton/meson.build         |  1 +\n drivers/mempool/octeontx/Makefile          |  1 +\n drivers/mempool/octeontx/meson.build       |  2 ++\n drivers/mempool/octeontx/octeontx_fpavf.c  |  3 +++\n drivers/net/ark/Makefile                   |  1 +\n drivers/net/ark/meson.build                |  1 +\n drivers/net/avf/Makefile                   |  1 +\n drivers/net/avp/Makefile                   |  1 +\n drivers/net/avp/meson.build                |  1 +\n drivers/net/axgbe/Makefile                 |  1 +\n drivers/net/axgbe/meson.build              |  2 ++\n drivers/net/bnx2x/Makefile                 |  1 +\n drivers/net/bnx2x/meson.build              |  1 +\n drivers/net/bnxt/Makefile                  |  1 +\n drivers/net/bnxt/meson.build               |  1 +\n drivers/net/cxgbe/Makefile                 |  1 +\n drivers/net/cxgbe/meson.build              |  2 ++\n drivers/net/e1000/Makefile                 |  1 +\n drivers/net/e1000/meson.build              |  2 ++\n drivers/net/enic/Makefile                  |  1 +\n drivers/net/enic/meson.build               |  2 ++\n drivers/net/fm10k/Makefile                 |  1 +\n drivers/net/fm10k/meson.build              |  2 ++\n drivers/net/i40e/i40e_ethdev.c             |  3 +++\n drivers/net/ifc/ifcvf_vdpa.c               |  3 +++\n drivers/net/ixgbe/ixgbe_ethdev.c           |  3 +++\n drivers/net/liquidio/Makefile              |  1 +\n drivers/net/liquidio/meson.build           |  1 +\n drivers/net/mlx4/mlx4.c                    |  4 ++++\n drivers/net/mlx5/mlx5.c                    |  4 ++++\n drivers/net/netvsc/hn_ethdev.c             |  9 +++++---\n drivers/net/nfp/Makefile                   |  1 +\n drivers/net/nfp/meson.build                |  1 +\n drivers/net/nfp/nfp_net.c                  |  3 +++\n drivers/net/octeontx/Makefile              |  3 +--\n drivers/net/octeontx/base/meson.build      |  2 +-\n drivers/net/octeontx/base/octeontx_pkivf.c |  3 +++\n drivers/net/octeontx/base/octeontx_pkovf.c |  3 +++\n drivers/net/qede/Makefile                  |  1 +\n drivers/net/qede/meson.build               |  2 ++\n drivers/net/szedata2/Makefile              |  1 +\n drivers/net/szedata2/meson.build           |  1 +\n drivers/net/szedata2/rte_eth_szedata2.c    |  3 +++\n drivers/net/thunderx/Makefile              |  1 +\n drivers/net/thunderx/meson.build           |  2 ++\n drivers/raw/ifpga_rawdev/ifpga_rawdev.c    |  3 +++\n lib/librte_eal/common/eal_common_dev.c     |  5 -----\n lib/librte_eal/common/include/rte_dev.h    |  2 +-\n lib/librte_ethdev/rte_ethdev_pci.h         |  3 +++\n lib/librte_eventdev/rte_eventdev_pmd_pci.h |  3 +++\n 65 files changed, 152 insertions(+), 36 deletions(-)",
    "diff": "diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c\nindex 49cd04dbb..5be9da0fa 100644\n--- a/drivers/bus/dpaa/dpaa_bus.c\n+++ b/drivers/bus/dpaa/dpaa_bus.c\n@@ -553,6 +553,9 @@ rte_dpaa_bus_probe(void)\n \t\t\tif (ret)\n \t\t\t\tcontinue;\n \n+\t\t\tif (rte_dev_is_probed(&dev->device))\n+\t\t\t\tcontinue;\n+\n \t\t\tif (!drv->probe ||\n \t\t\t    (dev->device.devargs &&\n \t\t\t    dev->device.devargs->policy == RTE_DEV_BLACKLISTED))\ndiff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c\nindex bfe81e236..9011eb74c 100644\n--- a/drivers/bus/fslmc/fslmc_bus.c\n+++ b/drivers/bus/fslmc/fslmc_bus.c\n@@ -384,6 +384,9 @@ rte_fslmc_probe(void)\n \t\t\tif (!drv->probe)\n \t\t\t\tcontinue;\n \n+\t\t\tif (rte_dev_is_probed(&dev->device))\n+\t\t\t\tcontinue;\n+\n \t\t\tif (dev->device.devargs &&\n \t\t\t  dev->device.devargs->policy == RTE_DEV_BLACKLISTED) {\n \t\t\t\tDPAA2_BUS_LOG(DEBUG, \"%s Blacklisted, skipping\",\ndiff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c\nindex 5ce886d13..a10f54f7b 100644\n--- a/drivers/bus/ifpga/ifpga_bus.c\n+++ b/drivers/bus/ifpga/ifpga_bus.c\n@@ -5,6 +5,7 @@\n #include <string.h>\n #include <inttypes.h>\n #include <stdint.h>\n+#include <stdbool.h>\n #include <stdlib.h>\n #include <stdio.h>\n #include <sys/queue.h>\n@@ -272,16 +273,22 @@ ifpga_probe_one_driver(struct rte_afu_driver *drv,\n \t\t\tstruct rte_afu_device *afu_dev)\n {\n \tint ret;\n+\tbool already_probed;\n \n \tif (!rte_afu_match(drv, afu_dev))\n \t\t/* Match of device and driver failed */\n \t\treturn 1;\n \n+\talready_probed = rte_dev_is_probed(&afu_dev->device);\n+\n \t/* reference driver structure */\n-\tafu_dev->driver = drv;\n+\tif (!already_probed)\n+\t\tafu_dev->driver = drv;\n \n \t/* call the driver probe() function */\n \tret = drv->probe(afu_dev);\n+\tif (already_probed)\n+\t\treturn ret; /* no rollback if already succeeded earlier */\n \tif (ret)\n \t\tafu_dev->driver = NULL;\n \telse\n@@ -299,10 +306,6 @@ ifpga_probe_all_drivers(struct rte_afu_device *afu_dev)\n \tif (afu_dev == NULL)\n \t\treturn -1;\n \n-\t/* Check if a driver is already loaded */\n-\tif (rte_dev_is_probed(&afu_dev->device))\n-\t\treturn 0;\n-\n \tTAILQ_FOREACH(drv, &ifpga_afu_drv_list, next) {\n \t\tif (ifpga_probe_one_driver(drv, afu_dev)) {\n \t\t\tret = -1;\ndiff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c\nindex d95410e19..46f65b415 100644\n--- a/drivers/bus/pci/pci_common.c\n+++ b/drivers/bus/pci/pci_common.c\n@@ -6,6 +6,7 @@\n #include <string.h>\n #include <inttypes.h>\n #include <stdint.h>\n+#include <stdbool.h>\n #include <stdlib.h>\n #include <stdio.h>\n #include <sys/queue.h>\n@@ -123,6 +124,7 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,\n \t\t\t struct rte_pci_device *dev)\n {\n \tint ret;\n+\tbool already_probed;\n \tstruct rte_pci_addr *loc;\n \n \tif ((dr == NULL) || (dev == NULL))\n@@ -153,6 +155,8 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,\n \t\tdev->device.numa_node = 0;\n \t}\n \n+\talready_probed = rte_dev_is_probed(&dev->device);\n+\n \tRTE_LOG(INFO, EAL, \"  probe driver: %x:%x %s\\n\", dev->id.vendor_id,\n \t\tdev->id.device_id, dr->driver.name);\n \n@@ -161,9 +165,10 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,\n \t * This needs to be before rte_pci_map_device(), as it enables to use\n \t * driver flags for adjusting configuration.\n \t */\n-\tdev->driver = dr;\n+\tif (!already_probed)\n+\t\tdev->driver = dr;\n \n-\tif (dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING) {\n+\tif (!already_probed && (dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING)) {\n \t\t/* map resources for devices that use igb_uio */\n \t\tret = rte_pci_map_device(dev);\n \t\tif (ret != 0) {\n@@ -174,6 +179,8 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,\n \n \t/* call the driver probe() function */\n \tret = dr->probe(dr, dev);\n+\tif (already_probed)\n+\t\treturn ret; /* no rollback if already succeeded earlier */\n \tif (ret) {\n \t\tdev->driver = NULL;\n \t\tif ((dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING) &&\n@@ -244,10 +251,6 @@ pci_probe_all_drivers(struct rte_pci_device *dev)\n \tif (dev == NULL)\n \t\treturn -1;\n \n-\t/* Check if a driver is already loaded */\n-\tif (rte_dev_is_probed(&dev->device))\n-\t\treturn 0;\n-\n \tFOREACH_DRIVER_ON_PCIBUS(dr) {\n \t\trc = rte_pci_probe_one_driver(dr, dev);\n \t\tif (rc < 0)\ndiff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c\nindex 514d9d5c6..05a006d15 100644\n--- a/drivers/bus/vdev/vdev.c\n+++ b/drivers/bus/vdev/vdev.c\n@@ -225,6 +225,11 @@ insert_vdev(const char *name, const char *args, struct rte_vdev_device **p_dev)\n \tdev->device.name = devargs->name;\n \n \tif (find_vdev(name)) {\n+\t\t/*\n+\t\t * A vdev is expected to have only one port.\n+\t\t * So there is no reason to try probing again,\n+\t\t * even with new arguments.\n+\t\t */\n \t\tret = -EEXIST;\n \t\tgoto fail;\n \t}\ndiff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c\nindex 48a219f73..eff5c01f5 100644\n--- a/drivers/bus/vmbus/vmbus_common.c\n+++ b/drivers/bus/vmbus/vmbus_common.c\n@@ -3,6 +3,7 @@\n  * All Rights Reserved.\n  */\n \n+#include <stdbool.h>\n #include <string.h>\n #include <unistd.h>\n #include <dirent.h>\n@@ -93,6 +94,7 @@ vmbus_probe_one_driver(struct rte_vmbus_driver *dr,\n \t\t       struct rte_vmbus_device *dev)\n {\n \tchar guid[RTE_UUID_STRLEN];\n+\tbool already_probed;\n \tint ret;\n \n \tif (!vmbus_match(dr, dev))\n@@ -104,13 +106,16 @@ vmbus_probe_one_driver(struct rte_vmbus_driver *dr,\n \n \t/* TODO add blacklisted */\n \n-\t/* map resources for device */\n-\tret = rte_vmbus_map_device(dev);\n-\tif (ret != 0)\n-\t\treturn ret;\n+\talready_probed = rte_dev_is_probed(&dev->device);\n+\tif (!already_probed) {\n+\t\t/* map resources for device */\n+\t\tret = rte_vmbus_map_device(dev);\n+\t\tif (ret != 0)\n+\t\t\treturn ret;\n \n-\t/* reference driver structure */\n-\tdev->driver = dr;\n+\t\t/* reference driver structure */\n+\t\tdev->driver = dr;\n+\t}\n \n \tif (dev->device.numa_node < 0) {\n \t\tVMBUS_LOG(WARNING, \"  Invalid NUMA socket, default to 0\");\n@@ -120,6 +125,8 @@ vmbus_probe_one_driver(struct rte_vmbus_driver *dr,\n \t/* call the driver probe() function */\n \tVMBUS_LOG(INFO, \"  probe driver: %s\", dr->driver.name);\n \tret = dr->probe(dr, dev);\n+\tif (already_probed)\n+\t\treturn ret; /* no rollback if already succeeded earlier */\n \tif (ret) {\n \t\tdev->driver = NULL;\n \t\trte_vmbus_unmap_device(dev);\n@@ -142,12 +149,6 @@ vmbus_probe_all_drivers(struct rte_vmbus_device *dev)\n \tstruct rte_vmbus_driver *dr;\n \tint rc;\n \n-\t/* Check if a driver is already loaded */\n-\tif (rte_dev_is_probed(&dev->device)) {\n-\t\tVMBUS_LOG(DEBUG, \"VMBUS driver already loaded\");\n-\t\treturn 0;\n-\t}\n-\n \tFOREACH_DRIVER_ON_VMBUS(dr) {\n \t\trc = vmbus_probe_one_driver(dr, dev);\n \t\tif (rc < 0) /* negative is an error */\ndiff --git a/drivers/common/qat/Makefile b/drivers/common/qat/Makefile\nindex c68a032a5..294da4927 100644\n--- a/drivers/common/qat/Makefile\n+++ b/drivers/common/qat/Makefile\n@@ -8,6 +8,8 @@ QAT_CRYPTO_DIR := $(RTE_SDK)/drivers/crypto/qat\n QAT_COMPRESS_DIR := $(RTE_SDK)/drivers/compress/qat\n VPATH=$(QAT_CRYPTO_DIR):$(QAT_COMPRESS_DIR)\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n+\n # external library include paths\n CFLAGS += -I$(SRCDIR)/qat_adf\n CFLAGS += -I$(SRCDIR)\n@@ -16,7 +18,6 @@ CFLAGS += -I$(QAT_COMPRESS_DIR)\n \n \n ifeq ($(CONFIG_RTE_LIBRTE_COMPRESSDEV),y)\n-\tCFLAGS += -DALLOW_EXPERIMENTAL_API\n \tLDLIBS += -lrte_compressdev\n \tSRCS-y += qat_comp.c\n \tSRCS-y += qat_comp_pmd.c\ndiff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build\nindex 80b6b25a8..584642917 100644\n--- a/drivers/common/qat/meson.build\n+++ b/drivers/common/qat/meson.build\n@@ -12,3 +12,4 @@ qat_sources = files('qat_common.c',\n qat_includes = [include_directories('.', 'qat_adf')]\n qat_ext_deps = []\n qat_cflags = []\n+allow_experimental_apis = true\ndiff --git a/drivers/common/qat/qat_device.c b/drivers/common/qat/qat_device.c\nindex f32d72358..da33faa9e 100644\n--- a/drivers/common/qat/qat_device.c\n+++ b/drivers/common/qat/qat_device.c\n@@ -194,6 +194,9 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \t\t\tpci_dev->addr.devid,\n \t\t\tpci_dev->addr.function);\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \tqat_pci_dev = qat_pci_device_allocate(pci_dev);\n \tif (qat_pci_dev == NULL)\n \t\treturn -ENODEV;\ndiff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c\nindex 9d13f9331..9894bb97c 100644\n--- a/drivers/compress/octeontx/otx_zip_pmd.c\n+++ b/drivers/compress/octeontx/otx_zip_pmd.c\n@@ -569,6 +569,9 @@ zip_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \t\t\t(unsigned int)pci_dev->id.vendor_id,\n \t\t\t(unsigned int)pci_dev->id.device_id);\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \trte_pci_device_name(&pci_dev->addr, compressdev_name,\n \t\t\t    sizeof(compressdev_name));\n \ndiff --git a/drivers/crypto/virtio/Makefile b/drivers/crypto/virtio/Makefile\nindex be7b828fe..26c4edc2c 100644\n--- a/drivers/crypto/virtio/Makefile\n+++ b/drivers/crypto/virtio/Makefile\n@@ -14,6 +14,7 @@ LIB = librte_pmd_virtio_crypto.a\n CFLAGS += -I$(RTE_SDK)/lib/librte_vhost\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n \n EXPORT_MAP := rte_pmd_virtio_crypto_version.map\n \ndiff --git a/drivers/crypto/virtio/meson.build b/drivers/crypto/virtio/meson.build\nindex b15b3f9fa..cb7b5ab99 100644\n--- a/drivers/crypto/virtio/meson.build\n+++ b/drivers/crypto/virtio/meson.build\n@@ -6,3 +6,4 @@ deps += 'bus_pci'\n name = 'virtio_crypto'\n sources = files('virtio_cryptodev.c', 'virtio_pci.c',\n \t\t'virtio_rxtx.c', 'virtqueue.c')\n+allow_experimental_apis = true\ndiff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c\nindex 568b5a406..f0fb2fe1e 100644\n--- a/drivers/crypto/virtio/virtio_cryptodev.c\n+++ b/drivers/crypto/virtio/virtio_cryptodev.c\n@@ -1439,6 +1439,9 @@ crypto_virtio_pci_probe(\n \t\t\tpci_dev->addr.devid,\n \t\t\tpci_dev->addr.function);\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \trte_pci_device_name(&pci_dev->addr, name, sizeof(name));\n \n \treturn crypto_virtio_create(name, pci_dev, &init_params);\ndiff --git a/drivers/event/octeontx/ssovf_probe.c b/drivers/event/octeontx/ssovf_probe.c\nindex b3db596d4..602012024 100644\n--- a/drivers/event/octeontx/ssovf_probe.c\n+++ b/drivers/event/octeontx/ssovf_probe.c\n@@ -150,6 +150,9 @@ ssowvf_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \tif (pci_dev->mem_resource[0].addr == NULL ||\n \t\t\tpci_dev->mem_resource[2].addr == NULL ||\n \t\t\tpci_dev->mem_resource[4].addr == NULL) {\n@@ -230,6 +233,9 @@ ssovf_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \tif (pci_dev->mem_resource[0].addr == NULL ||\n \t\t\tpci_dev->mem_resource[2].addr == NULL) {\n \t\tmbox_log_err(\"Empty bars %p %p\",\ndiff --git a/drivers/event/skeleton/Makefile b/drivers/event/skeleton/Makefile\nindex 0f7f07eaf..fd75b1dd6 100644\n--- a/drivers/event/skeleton/Makefile\n+++ b/drivers/event/skeleton/Makefile\n@@ -9,6 +9,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_skeleton_event.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += $(WERROR_FLAGS)\n LDLIBS += -lrte_eal -lrte_eventdev\n LDLIBS += -lrte_pci -lrte_bus_pci\ndiff --git a/drivers/event/skeleton/meson.build b/drivers/event/skeleton/meson.build\nindex acfe15653..773bed4ae 100644\n--- a/drivers/event/skeleton/meson.build\n+++ b/drivers/event/skeleton/meson.build\n@@ -3,3 +3,4 @@\n \n sources = files('skeleton_eventdev.c')\n deps += ['bus_pci', 'bus_vdev']\n+allow_experimental_apis = true\ndiff --git a/drivers/mempool/octeontx/Makefile b/drivers/mempool/octeontx/Makefile\nindex a3e1dce88..b9c9e0268 100644\n--- a/drivers/mempool/octeontx/Makefile\n+++ b/drivers/mempool/octeontx/Makefile\n@@ -9,6 +9,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_mempool_octeontx.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += $(WERROR_FLAGS)\n CFLAGS += -I$(RTE_SDK)/drivers/common/octeontx/\n EXPORT_MAP := rte_mempool_octeontx_version.map\ndiff --git a/drivers/mempool/octeontx/meson.build b/drivers/mempool/octeontx/meson.build\nindex 3baaf7db2..cdf5bbe24 100644\n--- a/drivers/mempool/octeontx/meson.build\n+++ b/drivers/mempool/octeontx/meson.build\n@@ -5,4 +5,6 @@ sources = files('octeontx_fpavf.c',\n \t\t'rte_mempool_octeontx.c'\n )\n \n+allow_experimental_apis = true\n+\n deps += ['mbuf', 'bus_pci', 'common_octeontx']\ndiff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c\nindex 4cf387e8f..a9998f8c3 100644\n--- a/drivers/mempool/octeontx/octeontx_fpavf.c\n+++ b/drivers/mempool/octeontx/octeontx_fpavf.c\n@@ -764,6 +764,9 @@ fpavf_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \tif (pci_dev->mem_resource[0].addr == NULL) {\n \t\tfpavf_log_err(\"Empty bars %p \", pci_dev->mem_resource[0].addr);\n \t\treturn -ENODEV;\ndiff --git a/drivers/net/ark/Makefile b/drivers/net/ark/Makefile\nindex 2e232be85..a873a774a 100644\n--- a/drivers/net/ark/Makefile\n+++ b/drivers/net/ark/Makefile\n@@ -8,6 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_ark.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += -O3 -I./\n CFLAGS += $(WERROR_FLAGS) -Werror\n \ndiff --git a/drivers/net/ark/meson.build b/drivers/net/ark/meson.build\nindex 99151bba1..a5886cd01 100644\n--- a/drivers/net/ark/meson.build\n+++ b/drivers/net/ark/meson.build\n@@ -11,3 +11,4 @@ sources = files('ark_ddm.c',\n \t'ark_pktgen.c',\n \t'ark_rqp.c',\n \t'ark_udm.c')\n+allow_experimental_apis = true\ndiff --git a/drivers/net/avf/Makefile b/drivers/net/avf/Makefile\nindex 3f815bbc4..fec88ea38 100644\n--- a/drivers/net/avf/Makefile\n+++ b/drivers/net/avf/Makefile\n@@ -8,6 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_avf.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += -O3\n LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring\n LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash\ndiff --git a/drivers/net/avp/Makefile b/drivers/net/avp/Makefile\nindex c9db667f3..6fcdc05f5 100644\n--- a/drivers/net/avp/Makefile\n+++ b/drivers/net/avp/Makefile\n@@ -8,6 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_avp.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)\n LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring\ndiff --git a/drivers/net/avp/meson.build b/drivers/net/avp/meson.build\nindex 6076c31b9..4c282ebe2 100644\n--- a/drivers/net/avp/meson.build\n+++ b/drivers/net/avp/meson.build\n@@ -3,3 +3,4 @@\n \n sources = files('avp_ethdev.c')\n install_headers('rte_avp_common.h', 'rte_avp_fifo.h')\n+allow_experimental_apis = true\ndiff --git a/drivers/net/axgbe/Makefile b/drivers/net/axgbe/Makefile\nindex 72215aeda..1bc0412b4 100644\n--- a/drivers/net/axgbe/Makefile\n+++ b/drivers/net/axgbe/Makefile\n@@ -8,6 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_axgbe.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n \ndiff --git a/drivers/net/axgbe/meson.build b/drivers/net/axgbe/meson.build\nindex 548ffff7a..c865b739f 100644\n--- a/drivers/net/axgbe/meson.build\n+++ b/drivers/net/axgbe/meson.build\n@@ -17,3 +17,5 @@ cflags += '-Wno-cast-qual'\n if arch_subdir == 'x86'\n \tsources += files('axgbe_rxtx_vec_sse.c')\n endif\n+\n+allow_experimental_apis = true\ndiff --git a/drivers/net/bnx2x/Makefile b/drivers/net/bnx2x/Makefile\nindex 55d1ad6e0..82ad0ead9 100644\n--- a/drivers/net/bnx2x/Makefile\n+++ b/drivers/net/bnx2x/Makefile\n@@ -9,6 +9,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_bnx2x.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n CFLAGS += -DZLIB_CONST\ndiff --git a/drivers/net/bnx2x/meson.build b/drivers/net/bnx2x/meson.build\nindex e3c688869..734499ceb 100644\n--- a/drivers/net/bnx2x/meson.build\n+++ b/drivers/net/bnx2x/meson.build\n@@ -12,3 +12,4 @@ sources = files('bnx2x.c',\n \t'bnx2x_vfpf.c',\n \t'ecore_sp.c',\n \t'elink.c')\n+allow_experimental_apis = true\ndiff --git a/drivers/net/bnxt/Makefile b/drivers/net/bnxt/Makefile\nindex 8be3cb0e4..ce84ec64d 100644\n--- a/drivers/net/bnxt/Makefile\n+++ b/drivers/net/bnxt/Makefile\n@@ -15,6 +15,7 @@ EXPORT_MAP := rte_pmd_bnxt_version.map\n \n LIBABIVER := 2\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring\ndiff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build\nindex e130f2712..d1f50cb6d 100644\n--- a/drivers/net/bnxt/meson.build\n+++ b/drivers/net/bnxt/meson.build\n@@ -18,3 +18,4 @@ sources = files('bnxt_cpr.c',\n \t'bnxt_util.c',\n \t'bnxt_vnic.c',\n \t'rte_pmd_bnxt.c')\n+allow_experimental_apis = true\ndiff --git a/drivers/net/cxgbe/Makefile b/drivers/net/cxgbe/Makefile\nindex 68466f13e..36388a746 100644\n--- a/drivers/net/cxgbe/Makefile\n+++ b/drivers/net/cxgbe/Makefile\n@@ -13,6 +13,7 @@ CFLAGS += -I$(SRCDIR)/base/\n CFLAGS += -I$(SRCDIR)\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n \n EXPORT_MAP := rte_pmd_cxgbe_version.map\n \ndiff --git a/drivers/net/cxgbe/meson.build b/drivers/net/cxgbe/meson.build\nindex c51af26e9..d8c3b9e5c 100644\n--- a/drivers/net/cxgbe/meson.build\n+++ b/drivers/net/cxgbe/meson.build\n@@ -14,3 +14,5 @@ sources = files('cxgbe_ethdev.c',\n \t'base/t4_hw.c',\n \t'base/t4vf_hw.c')\n includes += include_directories('base')\n+\n+allow_experimental_apis = true\ndiff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile\nindex 9c87e883b..825234dc8 100644\n--- a/drivers/net/e1000/Makefile\n+++ b/drivers/net/e1000/Makefile\n@@ -8,6 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_e1000.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring\ndiff --git a/drivers/net/e1000/meson.build b/drivers/net/e1000/meson.build\nindex cf456995c..997013de3 100644\n--- a/drivers/net/e1000/meson.build\n+++ b/drivers/net/e1000/meson.build\n@@ -15,3 +15,5 @@ sources = files(\n )\n \n includes += include_directories('base')\n+\n+allow_experimental_apis = true\ndiff --git a/drivers/net/enic/Makefile b/drivers/net/enic/Makefile\nindex 7c6c29cc0..bebed0dd5 100644\n--- a/drivers/net/enic/Makefile\n+++ b/drivers/net/enic/Makefile\n@@ -13,6 +13,7 @@ EXPORT_MAP := rte_pmd_enic_version.map\n \n LIBABIVER := 1\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += -I$(SRCDIR)/base/\n CFLAGS += -I$(SRCDIR)\n CFLAGS += -O3\ndiff --git a/drivers/net/enic/meson.build b/drivers/net/enic/meson.build\nindex bfd4e2373..4df6bd457 100644\n--- a/drivers/net/enic/meson.build\n+++ b/drivers/net/enic/meson.build\n@@ -17,3 +17,5 @@ sources = files(\n \t)\n deps += ['hash']\n includes += include_directories('base')\n+\n+allow_experimental_apis = true\ndiff --git a/drivers/net/fm10k/Makefile b/drivers/net/fm10k/Makefile\nindex d657dff8a..a53a3ece6 100644\n--- a/drivers/net/fm10k/Makefile\n+++ b/drivers/net/fm10k/Makefile\n@@ -8,6 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_fm10k.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n \ndiff --git a/drivers/net/fm10k/meson.build b/drivers/net/fm10k/meson.build\nindex 2772ea4df..a99aecfa7 100644\n--- a/drivers/net/fm10k/meson.build\n+++ b/drivers/net/fm10k/meson.build\n@@ -14,3 +14,5 @@ if arch_subdir == 'x86'\n endif\n \n includes += include_directories('base')\n+\n+allow_experimental_apis = true\ndiff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex 24d73f2ff..67f29f282 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -633,6 +633,9 @@ eth_i40e_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \tstruct rte_eth_devargs eth_da = { .nb_representor_ports = 0 };\n \tint i, retval;\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \tif (pci_dev->device.devargs) {\n \t\tretval = rte_eth_devargs_parse(pci_dev->device.devargs->args,\n \t\t\t\t&eth_da);\ndiff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c\nindex 88d814037..192368395 100644\n--- a/drivers/net/ifc/ifcvf_vdpa.c\n+++ b/drivers/net/ifc/ifcvf_vdpa.c\n@@ -682,6 +682,9 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \tlist = rte_zmalloc(\"ifcvf\", sizeof(*list), 0);\n \tif (list == NULL)\n \t\tgoto error;\ndiff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c\nindex cee886754..8a6d5f972 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.c\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.c\n@@ -1735,6 +1735,9 @@ eth_ixgbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \tstruct rte_eth_devargs eth_da;\n \tint i, retval;\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \tif (pci_dev->device.devargs) {\n \t\tretval = rte_eth_devargs_parse(pci_dev->device.devargs->args,\n \t\t\t\t&eth_da);\ndiff --git a/drivers/net/liquidio/Makefile b/drivers/net/liquidio/Makefile\nindex f1092851a..19a9f8fe6 100644\n--- a/drivers/net/liquidio/Makefile\n+++ b/drivers/net/liquidio/Makefile\n@@ -9,6 +9,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_lio.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)/base -I$(SRCDIR)\n LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring\ndiff --git a/drivers/net/liquidio/meson.build b/drivers/net/liquidio/meson.build\nindex 9ae48e213..091114349 100644\n--- a/drivers/net/liquidio/meson.build\n+++ b/drivers/net/liquidio/meson.build\n@@ -6,3 +6,4 @@ sources = files('base/lio_23xx_vf.c',\n \t'lio_ethdev.c',\n \t'lio_rxtx.c')\n includes += include_directories('base')\n+allow_experimental_apis = true\ndiff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c\nindex 3de7bc53e..c3acb469a 100644\n--- a/drivers/net/mlx4/mlx4.c\n+++ b/drivers/net/mlx4/mlx4.c\n@@ -523,6 +523,10 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)\n \n \t(void)pci_drv;\n \tassert(pci_drv == &mlx4_driver);\n+\n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \tlist = mlx4_glue->get_device_list(&i);\n \tif (list == NULL) {\n \t\trte_errno = errno;\ndiff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex f5f3a3d19..b488910a8 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -1296,6 +1296,10 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \n \tassert(pci_drv == &mlx5_driver);\n \terrno = 0;\n+\n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \tibv_list = mlx5_glue->get_device_list(&ret);\n \tif (!ibv_list) {\n \t\trte_errno = errno ? errno : ENOSYS;\ndiff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c\nindex b67cce1ba..991a1a91a 100644\n--- a/drivers/net/netvsc/hn_ethdev.c\n+++ b/drivers/net/netvsc/hn_ethdev.c\n@@ -75,9 +75,6 @@ eth_dev_vmbus_allocate(struct rte_vmbus_device *dev, size_t private_data_size)\n \tstruct rte_eth_dev *eth_dev;\n \tconst char *name;\n \n-\tif (!dev)\n-\t\treturn NULL;\n-\n \tname = dev->device.name;\n \n \tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n@@ -824,6 +821,12 @@ static int eth_hn_probe(struct rte_vmbus_driver *drv __rte_unused,\n \n \tPMD_INIT_FUNC_TRACE();\n \n+\tif (!dev)\n+\t\treturn -EINVAL;\n+\n+\tif (rte_dev_is_probed(&dev->device))\n+\t\treturn -EEXIST;\n+\n \teth_dev = eth_dev_vmbus_allocate(dev, sizeof(struct hn_data));\n \tif (!eth_dev)\n \t\treturn -ENOMEM;\ndiff --git a/drivers/net/nfp/Makefile b/drivers/net/nfp/Makefile\nindex ab4e0a7d9..0188144da 100644\n--- a/drivers/net/nfp/Makefile\n+++ b/drivers/net/nfp/Makefile\n@@ -8,6 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_nfp.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n \ndiff --git a/drivers/net/nfp/meson.build b/drivers/net/nfp/meson.build\nindex 3ba37e279..1cae381fa 100644\n--- a/drivers/net/nfp/meson.build\n+++ b/drivers/net/nfp/meson.build\n@@ -14,3 +14,4 @@ sources = files('nfpcore/nfp_cpp_pcie_ops.c',\n \t'nfpcore/nfp_nsp_eth.c',\n \t'nfpcore/nfp_hwinfo.c',\n \t'nfp_net.c')\n+allow_experimental_apis = true\ndiff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c\nindex 168088c6d..c9438f655 100644\n--- a/drivers/net/nfp/nfp_net.c\n+++ b/drivers/net/nfp/nfp_net.c\n@@ -3121,6 +3121,9 @@ static int nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \tif (!dev)\n \t\treturn ret;\n \n+\tif (rte_dev_is_probed(&dev->device))\n+\t\treturn -EEXIST;\n+\n \t/*\n \t * When device bound to UIO, the device could be used, by mistake,\n \t * by two DPDK apps, and the UIO driver does not avoid it. This\ndiff --git a/drivers/net/octeontx/Makefile b/drivers/net/octeontx/Makefile\nindex 885f17684..060ba873d 100644\n--- a/drivers/net/octeontx/Makefile\n+++ b/drivers/net/octeontx/Makefile\n@@ -9,6 +9,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_octeontx.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += $(WERROR_FLAGS)\n CFLAGS += -I$(RTE_SDK)/drivers/common/octeontx/\n CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/\n@@ -44,8 +45,6 @@ else\n CFLAGS_octeontx_rxtx.o += -O3 -Ofast\n endif\n \n-CFLAGS_octeontx_ethdev.o += -DALLOW_EXPERIMENTAL_API\n-\n LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring\n LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_common_octeontx\n LDLIBS += -lrte_mempool_octeontx\ndiff --git a/drivers/net/octeontx/base/meson.build b/drivers/net/octeontx/base/meson.build\nindex 09f657abb..738164beb 100644\n--- a/drivers/net/octeontx/base/meson.build\n+++ b/drivers/net/octeontx/base/meson.build\n@@ -14,7 +14,7 @@ foreach d: depends\n endforeach\n \n base_lib = static_library('octeontx_base', sources,\n-\tc_args: cflags,\n+\tc_args: cflags + ['-DALLOW_EXPERIMENTAL_API'],\n \tdependencies: static_objs,\n )\n \ndiff --git a/drivers/net/octeontx/base/octeontx_pkivf.c b/drivers/net/octeontx/base/octeontx_pkivf.c\nindex 1babea0e8..4c8a0a345 100644\n--- a/drivers/net/octeontx/base/octeontx_pkivf.c\n+++ b/drivers/net/octeontx/base/octeontx_pkivf.c\n@@ -120,6 +120,9 @@ pkivf_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \treturn 0;\n }\n \ndiff --git a/drivers/net/octeontx/base/octeontx_pkovf.c b/drivers/net/octeontx/base/octeontx_pkovf.c\nindex 0a6d64b8e..19b1f3c65 100644\n--- a/drivers/net/octeontx/base/octeontx_pkovf.c\n+++ b/drivers/net/octeontx/base/octeontx_pkovf.c\n@@ -536,6 +536,9 @@ pkovf_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \tif (pci_dev->mem_resource[0].addr == NULL ||\n \t    pci_dev->mem_resource[2].addr == NULL) {\n \t\tocteontx_log_err(\"Empty bars %p %p\",\ndiff --git a/drivers/net/qede/Makefile b/drivers/net/qede/Makefile\nindex 488ca1d92..455f076f9 100644\n--- a/drivers/net/qede/Makefile\n+++ b/drivers/net/qede/Makefile\n@@ -10,6 +10,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_qede.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring\ndiff --git a/drivers/net/qede/meson.build b/drivers/net/qede/meson.build\nindex 6280073a5..1978c0b51 100644\n--- a/drivers/net/qede/meson.build\n+++ b/drivers/net/qede/meson.build\n@@ -10,3 +10,5 @@ sources = files(\n \t'qede_main.c',\n \t'qede_rxtx.c',\n )\n+\n+allow_experimental_apis = true\ndiff --git a/drivers/net/szedata2/Makefile b/drivers/net/szedata2/Makefile\nindex b77fae16d..6a9198bfd 100644\n--- a/drivers/net/szedata2/Makefile\n+++ b/drivers/net/szedata2/Makefile\n@@ -8,6 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_szedata2.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n LDLIBS += -lsze2\ndiff --git a/drivers/net/szedata2/meson.build b/drivers/net/szedata2/meson.build\nindex da3733743..157b32e15 100644\n--- a/drivers/net/szedata2/meson.build\n+++ b/drivers/net/szedata2/meson.build\n@@ -5,3 +5,4 @@ dep = cc.find_library('sze2', required: false)\n build = dep.found()\n ext_deps += dep\n sources = files('rte_eth_szedata2.c')\n+allow_experimental_apis = true\ndiff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c\nindex 8f92e72f2..0adc0ff4c 100644\n--- a/drivers/net/szedata2/rte_eth_szedata2.c\n+++ b/drivers/net/szedata2/rte_eth_szedata2.c\n@@ -1804,6 +1804,9 @@ static int szedata2_eth_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \n \tPMD_INIT_FUNC_TRACE();\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \tret = get_port_info(pci_dev, &port_count, port_info,\n \t\t\tSZEDATA2_MAX_PORTS);\n \tif (ret != 0)\ndiff --git a/drivers/net/thunderx/Makefile b/drivers/net/thunderx/Makefile\nindex e6bf49752..c08ef9277 100644\n--- a/drivers/net/thunderx/Makefile\n+++ b/drivers/net/thunderx/Makefile\n@@ -9,6 +9,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n #\n LIB = librte_pmd_thunderx_nicvf.a\n \n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n CFLAGS += $(WERROR_FLAGS)\n \n LDLIBS += -lm\ndiff --git a/drivers/net/thunderx/meson.build b/drivers/net/thunderx/meson.build\nindex 69819a97f..bcba1489f 100644\n--- a/drivers/net/thunderx/meson.build\n+++ b/drivers/net/thunderx/meson.build\n@@ -18,3 +18,5 @@ if cc.has_argument('-Wno-maybe-uninitialized')\n endif\n \n includes += include_directories('base')\n+\n+allow_experimental_apis = true\ndiff --git a/drivers/raw/ifpga_rawdev/ifpga_rawdev.c b/drivers/raw/ifpga_rawdev/ifpga_rawdev.c\nindex 3fed05781..cfaa0d39e 100644\n--- a/drivers/raw/ifpga_rawdev/ifpga_rawdev.c\n+++ b/drivers/raw/ifpga_rawdev/ifpga_rawdev.c\n@@ -378,6 +378,9 @@ ifpga_rawdev_create(struct rte_pci_device *pci_dev,\n \t\tgoto cleanup;\n \t}\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \tmemset(name, 0, sizeof(name));\n \tsnprintf(name, RTE_RAWDEV_NAME_MAX_LEN, \"IFPGA:%x:%02x.%x\",\n \t\tpci_dev->addr.bus, pci_dev->addr.devid, pci_dev->addr.function);\ndiff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c\nindex 907c5c481..cbd7a3419 100644\n--- a/lib/librte_eal/common/eal_common_dev.c\n+++ b/lib/librte_eal/common/eal_common_dev.c\n@@ -191,11 +191,6 @@ rte_dev_probe(const char *devargs)\n \t\tgoto err_devarg;\n \t}\n \n-\tif (rte_dev_is_probed(dev)) {\n-\t\tRTE_LOG(ERR, EAL, \"Device is already plugged\\n\");\n-\t\treturn -EEXIST;\n-\t}\n-\n \tret = da->bus->plug(dev);\n \tif (ret) {\n \t\tRTE_LOG(ERR, EAL, \"Driver cannot attach the device (%s)\\n\",\ndiff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h\nindex 5b16ee27b..6ba16f8b3 100644\n--- a/lib/librte_eal/common/include/rte_dev.h\n+++ b/lib/librte_eal/common/include/rte_dev.h\n@@ -158,7 +158,7 @@ struct rte_device {\n \tconst char *name;             /**< Device name */\n \tconst struct rte_driver *driver; /**< Driver associated after probing */\n \tint numa_node;                /**< NUMA node connection */\n-\tstruct rte_devargs *devargs;  /**< Device user arguments */\n+\tstruct rte_devargs *devargs;  /**< Arguments for latest probing */\n };\n \n /**\ndiff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h\nindex f652596f4..4080fa6f5 100644\n--- a/lib/librte_ethdev/rte_ethdev_pci.h\n+++ b/lib/librte_ethdev/rte_ethdev_pci.h\n@@ -167,6 +167,9 @@ rte_eth_dev_pci_generic_probe(struct rte_pci_device *pci_dev,\n \tstruct rte_eth_dev *eth_dev;\n \tint ret;\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \teth_dev = rte_eth_dev_pci_allocate(pci_dev, private_data_size);\n \tif (!eth_dev)\n \t\treturn -ENOMEM;\ndiff --git a/lib/librte_eventdev/rte_eventdev_pmd_pci.h b/lib/librte_eventdev/rte_eventdev_pmd_pci.h\nindex 8fb61386f..97fa2cc97 100644\n--- a/lib/librte_eventdev/rte_eventdev_pmd_pci.h\n+++ b/lib/librte_eventdev/rte_eventdev_pmd_pci.h\n@@ -50,6 +50,9 @@ rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv,\n \tif (devinit == NULL)\n \t\treturn -EINVAL;\n \n+\tif (rte_dev_is_probed(&pci_dev->device))\n+\t\treturn -EEXIST;\n+\n \trte_pci_device_name(&pci_dev->addr, eventdev_name,\n \t\t\tsizeof(eventdev_name));\n \n",
    "prefixes": [
        "v2",
        "3/3"
    ]
}