get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 3478,
    "url": "https://patches.dpdk.org/api/patches/3478/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1424314187-25177-14-git-send-email-mukawa@igel.co.jp/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1424314187-25177-14-git-send-email-mukawa@igel.co.jp>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1424314187-25177-14-git-send-email-mukawa@igel.co.jp",
    "date": "2015-02-19T02:49:44",
    "name": "[dpdk-dev,v9,13/14] eal/pci: Add rte_eal_dev_attach/detach() functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6331436fb890a64113297017d56e3cb56a4e03b4",
    "submitter": {
        "id": 64,
        "url": "https://patches.dpdk.org/api/people/64/?format=api",
        "name": "Tetsuya Mukawa",
        "email": "mukawa@igel.co.jp"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1424314187-25177-14-git-send-email-mukawa@igel.co.jp/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/3478/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/3478/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 2CEF0B584;\n\tThu, 19 Feb 2015 03:51:14 +0100 (CET)",
            "from mail-pa0-f53.google.com (mail-pa0-f53.google.com\n\t[209.85.220.53]) by dpdk.org (Postfix) with ESMTP id D2607B52F\n\tfor <dev@dpdk.org>; Thu, 19 Feb 2015 03:50:36 +0100 (CET)",
            "by paceu11 with SMTP id eu11so5964840pac.7\n\tfor <dev@dpdk.org>; Wed, 18 Feb 2015 18:50:36 -0800 (PST)",
            "from localhost.localdomain (napt.igel.co.jp. [219.106.231.132])\n\tby mx.google.com with ESMTPSA id\n\tiy1sm17860786pbb.14.2015.02.18.18.50.33\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 18 Feb 2015 18:50:35 -0800 (PST)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=6Ns43m29S01MKj7sxN96SUZTcDI8bMqpeQ//1gFWEpU=;\n\tb=RRav8DR/GHD9nohuVHCz4+9QPXQ41vdeV+bv8AFVdKkMjFIS9MHAt/aorHdlzw/8A1\n\tVsLuCuBg5XsLV+n7r1jCB3692Jc6wrHAFPfP7433w21Jwuz11vMsTAUkOu+RkB2PSO7y\n\ti/DbRi8WLtRcBBo1C4b/2PkLP6ol6YOPXNJ1u9dKVs7cbpzT30ddtmMeFbCS54RjVior\n\t6iwP9VtcBUVxTp/o0GWphS8FHFedazXtJWJrtBrgn+dmPLjP8THxqsKUsw3+bU8e5Mr9\n\t0xy/QAqQp2rbqtYX0yRgORNbcTwnGnT8mNhRFXm0E4uO1sW8gNXGBPD7nDLm/p50Yeid\n\tfKQw==",
        "X-Gm-Message-State": "ALoCoQnB0r195gkjr21BLxezzibvX7MPw0Bscgmueg7hnTfGD0C5/Xz3kzjI2D2Ydb6dvsNarRlD",
        "X-Received": "by 10.68.237.131 with SMTP id vc3mr3525197pbc.129.1424314236202; \n\tWed, 18 Feb 2015 18:50:36 -0800 (PST)",
        "From": "Tetsuya Mukawa <mukawa@igel.co.jp>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 19 Feb 2015 11:49:44 +0900",
        "Message-Id": "<1424314187-25177-14-git-send-email-mukawa@igel.co.jp>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1424314187-25177-1-git-send-email-mukawa@igel.co.jp>",
        "References": "<1424060073-23484-12-git-send-email-mukawa@igel.co.jp>\n\t<1424314187-25177-1-git-send-email-mukawa@igel.co.jp>",
        "Subject": "[dpdk-dev] [PATCH v9 13/14] eal/pci: Add\n\trte_eal_dev_attach/detach() functions",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "These functions are used for attaching or detaching a port.\nWhen rte_eal_dev_attach() is called, the function tries to realize the\ndevice name as pci address. If this is done successfully,\nrte_eal_dev_attach() will attach physical device port. If not, attaches\nvirtual devive port.\nWhen rte_eal_dev_detach() is called, the function gets the device type\nof this port to know whether the port is come from physical or virtual.\nAnd then specific detaching function will be called.\n\nv9:\n- Fix comments.\n- Use strcmp() instead of strncmp().\n- Remove RTE_EAL_INVOKE_TYPE_PROBE/CLOSE.\n- Change definition of rte_dev_uninit_t.\n  (Thanks to Thomas Monjalon and Maxime Leroy)\nv8:\n- Add missing symbol in version map.\n  (Thanks to Qiu, Michael and Iremonger, Bernard)\nv7:\n- Fix typo of warning messages.\n  (Thanks to Qiu, Michael)\nv5:\n- Change function names like below.\n  rte_eal_dev_find_and_invoke() to rte_eal_vdev_find_and_invoke().\n  rte_eal_dev_invoke() to rte_eal_vdev_invoke().\n- Add code to handle a return value of rte_eal_devargs_remove().\n- Fix pci address format in rte_eal_dev_detach().\nv4:\n- Fix comment.\n- Add error checking.\n- Fix indent of 'if' statement.\n- Change function name.\n\nSigned-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>\n---\n lib/librte_eal/common/eal_common_dev.c          | 307 ++++++++++++++++++++++++\n lib/librte_eal/common/eal_private.h             |  11 +\n lib/librte_eal/common/include/rte_dev.h         |  33 +++\n lib/librte_eal/linuxapp/eal/Makefile            |   1 +\n lib/librte_eal/linuxapp/eal/eal_pci.c           |   6 +-\n lib/librte_eal/linuxapp/eal/rte_eal_version.map |   2 +\n 6 files changed, 357 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c\nindex eae5656..4976bb9 100644\n--- a/lib/librte_eal/common/eal_common_dev.c\n+++ b/lib/librte_eal/common/eal_common_dev.c\n@@ -32,10 +32,13 @@\n  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n  */\n \n+#include <stdio.h>\n+#include <limits.h>\n #include <string.h>\n #include <inttypes.h>\n #include <sys/queue.h>\n \n+#include <rte_ethdev.h>\n #include <rte_dev.h>\n #include <rte_devargs.h>\n #include <rte_debug.h>\n@@ -107,3 +110,307 @@ rte_eal_dev_init(void)\n \t}\n \treturn 0;\n }\n+\n+/* So far, DPDK hotplug function only supports linux */\n+#ifdef RTE_LIBRTE_EAL_HOTPLUG\n+static int\n+rte_eal_vdev_find_and_init(const char *name)\n+{\n+\tstruct rte_devargs *devargs;\n+\tstruct rte_driver *driver;\n+\n+\tif (name == NULL)\n+\t\treturn -EINVAL;\n+\n+\t/* find the specified device and call init function */\n+\tTAILQ_FOREACH(devargs, &devargs_list, next) {\n+\n+\t\tif (devargs->type != RTE_DEVTYPE_VIRTUAL)\n+\t\t\tcontinue;\n+\n+\t\tif (strcmp(name, devargs->virtual.drv_name))\n+\t\t\tcontinue;\n+\n+\t\tTAILQ_FOREACH(driver, &dev_driver_list, next) {\n+\t\t\tif (driver->type != PMD_VDEV)\n+\t\t\t\tcontinue;\n+\n+\t\t\t/*\n+\t\t\t * search a driver prefix in virtual device name.\n+\t\t\t * For example, if the driver is pcap PMD, driver->name\n+\t\t\t * will be \"eth_pcap\", but devargs->virtual.drv_name\n+\t\t\t * will be \"eth_pcapN\". So use strncmp to compare.\n+\t\t\t */\n+\t\t\tif (!strncmp(driver->name, devargs->virtual.drv_name,\n+\t\t\t    strlen(driver->name))) {\n+\t\t\t\tdriver->init(devargs->virtual.drv_name,\n+\t\t\t\t\t\tdevargs->args);\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\n+\t\tif (driver == NULL) {\n+\t\t\tRTE_LOG(WARNING, EAL, \"no driver found for %s\\n\",\n+\t\t\t\t  devargs->virtual.drv_name);\n+\t\t}\n+\t\treturn 0;\n+\t}\n+\treturn 1;\n+}\n+\n+static int\n+rte_eal_vdev_find_and_uninit(const char *name)\n+{\n+\tstruct rte_devargs *devargs;\n+\tstruct rte_driver *driver;\n+\n+\tif (name == NULL)\n+\t\treturn -EINVAL;\n+\n+\t/* find the specified device and call uninit function */\n+\tTAILQ_FOREACH(devargs, &devargs_list, next) {\n+\n+\t\tif (devargs->type != RTE_DEVTYPE_VIRTUAL)\n+\t\t\tcontinue;\n+\n+\t\tif (strcmp(name, devargs->virtual.drv_name))\n+\t\t\tcontinue;\n+\n+\t\tTAILQ_FOREACH(driver, &dev_driver_list, next) {\n+\t\t\tif (driver->type != PMD_VDEV)\n+\t\t\t\tcontinue;\n+\n+\t\t\t/*\n+\t\t\t * search a driver prefix in virtual device name.\n+\t\t\t * For example, if the driver is pcap PMD, driver->name\n+\t\t\t * will be \"eth_pcap\", but devargs->virtual.drv_name\n+\t\t\t * will be \"eth_pcapN\". So use strncmp to compare.\n+\t\t\t */\n+\t\t\tif (!strncmp(driver->name, devargs->virtual.drv_name,\n+\t\t\t    strlen(driver->name))) {\n+\t\t\t\tdriver->uninit(devargs->virtual.drv_name);\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\n+\t\tif (driver == NULL) {\n+\t\t\tRTE_LOG(WARNING, EAL, \"no driver found for %s\\n\",\n+\t\t\t\t  devargs->virtual.drv_name);\n+\t\t}\n+\t\treturn 0;\n+\t}\n+\treturn 1;\n+}\n+\n+/* attach the new physical device, then store port_id of the device */\n+static int\n+rte_eal_dev_attach_pdev(struct rte_pci_addr *addr, uint8_t *port_id)\n+{\n+\tuint8_t new_port_id;\n+\tstruct rte_eth_dev devs[RTE_MAX_ETHPORTS];\n+\n+\tif ((addr == NULL) || (port_id == NULL))\n+\t\tgoto err;\n+\n+\t/* save current port status */\n+\tif (rte_eth_dev_save(devs, sizeof(devs)))\n+\t\tgoto err;\n+\t/* re-construct pci_device_list */\n+\tif (rte_eal_pci_scan())\n+\t\tgoto err;\n+\t/* invoke probe func of the driver can handle the new device */\n+\tif (rte_eal_pci_probe_one(addr))\n+\t\tgoto err;\n+\t/* get port_id enabled by above procedures */\n+\tif (rte_eth_dev_get_changed_port(devs, &new_port_id))\n+\t\tgoto err;\n+\n+\t*port_id = new_port_id;\n+\treturn 0;\n+err:\n+\tRTE_LOG(ERR, EAL, \"Driver, cannot attach the device\\n\");\n+\treturn -1;\n+}\n+\n+/* detach the new physical device, then store pci_addr of the device */\n+static int\n+rte_eal_dev_detach_pdev(uint8_t port_id, struct rte_pci_addr *addr)\n+{\n+\tstruct rte_pci_addr freed_addr;\n+\tstruct rte_pci_addr vp;\n+\n+\tif (addr == NULL)\n+\t\tgoto err;\n+\n+\t/* check whether the driver supports detach feature, or not */\n+\tif (rte_eth_dev_is_detachable(port_id))\n+\t\tgoto err;\n+\n+\t/* get pci address by port id */\n+\tif (rte_eth_dev_get_addr_by_port(port_id, &freed_addr))\n+\t\tgoto err;\n+\n+\t/* Zerod pci addr means the port comes from virtual device */\n+\tvp.domain = vp.bus = vp.devid = vp.function = 0;\n+\tif (rte_eal_compare_pci_addr(&vp, &freed_addr) == 0)\n+\t\tgoto err;\n+\n+\t/* invoke close func of the driver,\n+\t * also remove the device from pci_device_list */\n+\tif (rte_eal_pci_close_one(&freed_addr))\n+\t\tgoto err;\n+\n+\t*addr = freed_addr;\n+\treturn 0;\n+err:\n+\tRTE_LOG(ERR, EAL, \"Driver, cannot detach the device\\n\");\n+\treturn -1;\n+}\n+\n+static void\n+get_vdev_name(char *vdevargs)\n+{\n+\tchar *sep;\n+\n+\tif (vdevargs == NULL)\n+\t\treturn;\n+\n+\t/* set the first ',' to '\\0' to split name and arguments */\n+\tsep = strchr(vdevargs, ',');\n+\tif (sep != NULL)\n+\t\tsep[0] = '\\0';\n+}\n+\n+/* attach the new virtual device, then store port_id of the device */\n+static int\n+rte_eal_dev_attach_vdev(const char *vdevargs, uint8_t *port_id)\n+{\n+\tchar *args;\n+\tuint8_t new_port_id;\n+\tstruct rte_eth_dev devs[RTE_MAX_ETHPORTS];\n+\n+\tif ((vdevargs == NULL) || (port_id == NULL))\n+\t\tgoto err0;\n+\n+\targs = strdup(vdevargs);\n+\tif (args == NULL)\n+\t\tgoto err0;\n+\n+\t/* save current port status */\n+\tif (rte_eth_dev_save(devs, sizeof(devs)))\n+\t\tgoto err1;\n+\t/* add the vdevargs to devargs_list */\n+\tif (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, args))\n+\t\tgoto err1;\n+\t/* parse vdevargs, then retrieve device name */\n+\tget_vdev_name(args);\n+\t/* walk around dev_driver_list to find the driver of the device,\n+\t * then invoke probe function o the driver */\n+\tif (rte_eal_vdev_find_and_init(args))\n+\t\tgoto err2;\n+\t/* get port_id enabled by above procedures */\n+\tif (rte_eth_dev_get_changed_port(devs, &new_port_id))\n+\t\tgoto err2;\n+\n+\tfree(args);\n+\t*port_id = new_port_id;\n+\treturn 0;\n+err2:\n+\trte_eal_devargs_remove(RTE_DEVTYPE_VIRTUAL, args);\n+err1:\n+\tfree(args);\n+err0:\n+\tRTE_LOG(ERR, EAL, \"Driver, cannot attach the device\\n\");\n+\treturn -1;\n+}\n+\n+/* detach the new virtual device, then store the name of the device */\n+static int\n+rte_eal_dev_detach_vdev(uint8_t port_id, char *vdevname)\n+{\n+\tchar name[RTE_ETH_NAME_MAX_LEN];\n+\n+\tif (vdevname == NULL)\n+\t\tgoto err;\n+\n+\t/* check whether the driver supports detach feature, or not */\n+\tif (rte_eth_dev_is_detachable(port_id))\n+\t\tgoto err;\n+\n+\t/* get device name by port id */\n+\tif (rte_eth_dev_get_name_by_port(port_id, name))\n+\t\tgoto err;\n+\t/* walk around dev_driver_list to find the driver of the device,\n+\t * then invoke close function o the driver */\n+\tif (rte_eal_vdev_find_and_uninit(name))\n+\t\tgoto err;\n+\t/* remove the vdevname from devargs_list */\n+\tif (rte_eal_devargs_remove(RTE_DEVTYPE_VIRTUAL, name))\n+\t\tgoto err;\n+\n+\tstrncpy(vdevname, name, sizeof(name));\n+\treturn 0;\n+err:\n+\tRTE_LOG(ERR, EAL, \"Driver, cannot detach the device\\n\");\n+\treturn -1;\n+}\n+\n+/* attach the new device, then store port_id of the device */\n+int\n+rte_eal_dev_attach(const char *devargs, uint8_t *port_id)\n+{\n+\tstruct rte_pci_addr addr;\n+\n+\tif ((devargs == NULL) || (port_id == NULL))\n+\t\treturn -EINVAL;\n+\n+\tif (eal_parse_pci_DomBDF(devargs, &addr) == 0)\n+\t\treturn rte_eal_dev_attach_pdev(&addr, port_id);\n+\telse\n+\t\treturn rte_eal_dev_attach_vdev(devargs, port_id);\n+}\n+\n+/* detach the device, then store the name of the device */\n+int\n+rte_eal_dev_detach(uint8_t port_id, char *name)\n+{\n+\tstruct rte_pci_addr addr;\n+\tint ret;\n+\n+\tif (name == NULL)\n+\t\treturn -EINVAL;\n+\n+\tif (rte_eth_dev_get_device_type(port_id) == RTE_ETH_DEV_PCI) {\n+\t\tret = rte_eth_dev_get_addr_by_port(port_id, &addr);\n+\t\tif (ret < 0)\n+\t\t\treturn ret;\n+\n+\t\tret = rte_eal_dev_detach_pdev(port_id, &addr);\n+\t\tif (ret == 0)\n+\t\t\tsnprintf(name, RTE_ETH_NAME_MAX_LEN,\n+\t\t\t\t\"%04x:%02x:%02x.%d\",\n+\t\t\t\taddr.domain, addr.bus,\n+\t\t\t\taddr.devid, addr.function);\n+\n+\t\treturn ret;\n+\t} else\n+\t\treturn rte_eal_dev_detach_vdev(port_id, name);\n+}\n+#else /* RTE_LIBRTE_EAL_HOTPLUG */\n+int\n+rte_eal_dev_attach(const char *devargs __rte_unused,\n+\t\t\tuint8_t *port_id __rte_unused)\n+{\n+\tRTE_LOG(ERR, EAL, \"Hotplug support isn't enabled\\n\");\n+\treturn -1;\n+}\n+\n+/* detach the device, then store the name of the device */\n+int\n+rte_eal_dev_detach(uint8_t port_id __rte_unused,\n+\t\t\tchar *name __rte_unused)\n+{\n+\tRTE_LOG(ERR, EAL, \"Hotplug support isn't enabled\\n\");\n+\treturn -1;\n+}\n+#endif /* RTE_LIBRTE_EAL_HOTPLUG */\ndiff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h\nindex 4acf5a0..98b286a 100644\n--- a/lib/librte_eal/common/eal_private.h\n+++ b/lib/librte_eal/common/eal_private.h\n@@ -154,6 +154,17 @@ struct rte_pci_driver;\n struct rte_pci_device;\n \n /**\n+ * Scan the content of the PCI bus, and the devices in the devices\n+ * list\n+ *\n+ * This function is private to EAL.\n+ *\n+ * @return\n+ *  0 on success, negative on error\n+ */\n+int rte_eal_pci_scan(void);\n+\n+/**\n  * Mmap memory for single PCI device\n  *\n  * This function is private to EAL.\ndiff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h\nindex f7e3a10..a5ac770 100644\n--- a/lib/librte_eal/common/include/rte_dev.h\n+++ b/lib/librte_eal/common/include/rte_dev.h\n@@ -47,6 +47,7 @@ extern \"C\" {\n #endif\n \n #include <sys/queue.h>\n+#include <rte_pci.h>\n \n /** Double linked list of device drivers. */\n TAILQ_HEAD(rte_driver_list, rte_driver);\n@@ -57,6 +58,11 @@ TAILQ_HEAD(rte_driver_list, rte_driver);\n typedef int (rte_dev_init_t)(const char *name, const char *args);\n \n /**\n+ * Uninitilization function called for each device driver once.\n+ */\n+typedef int (rte_dev_uninit_t)(const char *name);\n+\n+/**\n  * Driver type enumeration\n  */\n enum pmd_type {\n@@ -72,6 +78,7 @@ struct rte_driver {\n \tenum pmd_type type;\t\t   /**< PMD Driver type */\n \tconst char *name;                   /**< Driver name. */\n \trte_dev_init_t *init;              /**< Device init. function. */\n+\trte_dev_uninit_t *uninit;          /**< Device uninit. function. */\n };\n \n /**\n@@ -93,6 +100,32 @@ void rte_eal_driver_register(struct rte_driver *driver);\n void rte_eal_driver_unregister(struct rte_driver *driver);\n \n /**\n+ * Attach a new device.\n+ *\n+ * @param devargs\n+ *   A pointer to a strings array describing the new device\n+ *   to be attached. The strings should be a pci address like\n+ *   '0000:01:00.0' or virtual device name like 'eth_pcap0'.\n+ * @param port_id\n+ *  A pointer to a port identifier actually attached.\n+ * @return\n+ *  0 on success and port_id is filled, negative on error\n+ */\n+int rte_eal_dev_attach(const char *devargs, uint8_t *port_id);\n+\n+/**\n+ * Detach a device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the device to detach.\n+ * @param addr\n+ *  A pointer to a device name actually detached.\n+ * @return\n+ *  0 on success and devname is filled, negative on error\n+ */\n+int rte_eal_dev_detach(uint8_t port_id, char *devname);\n+\n+/**\n  * Initalize all the registered drivers in this process\n  */\n int rte_eal_dev_init(void);\ndiff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile\nindex e117cec..b59b201 100644\n--- a/lib/librte_eal/linuxapp/eal/Makefile\n+++ b/lib/librte_eal/linuxapp/eal/Makefile\n@@ -45,6 +45,7 @@ CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include\n CFLAGS += -I$(RTE_SDK)/lib/librte_ring\n CFLAGS += -I$(RTE_SDK)/lib/librte_mempool\n CFLAGS += -I$(RTE_SDK)/lib/librte_malloc\n+CFLAGS += -I$(RTE_SDK)/lib/librte_mbuf\n CFLAGS += -I$(RTE_SDK)/lib/librte_ether\n CFLAGS += -I$(RTE_SDK)/lib/librte_ivshmem\n CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_ring\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c\nindex 4bdf51b..21d3e85 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_pci.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c\n@@ -441,8 +441,8 @@ error:\n  * Scan the content of the PCI bus, and the devices in the devices\n  * list\n  */\n-static int\n-pci_scan(void)\n+int\n+rte_eal_pci_scan(void)\n {\n \tstruct dirent *e;\n \tDIR *dir;\n@@ -774,7 +774,7 @@ rte_eal_pci_init(void)\n \tif (internal_config.no_pci)\n \t\treturn 0;\n \n-\tif (pci_scan() < 0) {\n+\tif (rte_eal_pci_scan() < 0) {\n \t\tRTE_LOG(ERR, EAL, \"%s(): Cannot scan PCI bus\\n\", __func__);\n \t\treturn -1;\n \t}\ndiff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map\nindex d36286e..ff46b3a 100644\n--- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map\n+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map\n@@ -21,6 +21,8 @@ DPDK_2.0 {\n \trte_eal_alarm_cancel;\n \trte_eal_alarm_set;\n \trte_eal_dev_init;\n+\trte_eal_dev_attach;\n+\trte_eal_dev_detach;\n \trte_eal_devargs_add;\n \trte_eal_devargs_dump;\n \trte_eal_devargs_type_count;\n",
    "prefixes": [
        "dpdk-dev",
        "v9",
        "13/14"
    ]
}