get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1546,
    "url": "https://patches.dpdk.org/api/patches/1546/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1416924682-24170-5-git-send-email-cunming.liang@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1416924682-24170-5-git-send-email-cunming.liang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1416924682-24170-5-git-send-email-cunming.liang@intel.com",
    "date": "2014-11-25T14:11:20",
    "name": "[dpdk-dev,RFC,4/6] bifurc: add driver to scan bifurcated netdev",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": true,
    "hash": "1d4d4407f4cd1c4645e8007ab50d81c7ef84c494",
    "submitter": {
        "id": 46,
        "url": "https://patches.dpdk.org/api/people/46/?format=api",
        "name": "Cunming Liang",
        "email": "cunming.liang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1416924682-24170-5-git-send-email-cunming.liang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/1546/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/1546/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 D0921590F;\n\tTue, 25 Nov 2014 15:01:43 +0100 (CET)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 24E00590F\n\tfor <dev@dpdk.org>; Tue, 25 Nov 2014 15:01:39 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga102.jf.intel.com with ESMTP; 25 Nov 2014 06:09:35 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga001.jf.intel.com with ESMTP; 25 Nov 2014 06:11:59 -0800",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id sAPEBv2D024012;\n\tTue, 25 Nov 2014 22:11:57 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid sAPEBtNs024242; Tue, 25 Nov 2014 22:11:57 +0800",
            "(from cliang18@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id sAPEBtXU024238; \n\tTue, 25 Nov 2014 22:11:55 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.07,455,1413270000\"; d=\"scan'208\";a=\"613751396\"",
        "From": "Cunming Liang <cunming.liang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 25 Nov 2014 22:11:20 +0800",
        "Message-Id": "<1416924682-24170-5-git-send-email-cunming.liang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1416924682-24170-1-git-send-email-cunming.liang@intel.com>",
        "References": "<1416924682-24170-1-git-send-email-cunming.liang@intel.com>",
        "Subject": "[dpdk-dev] [RFC PATCH 4/6] bifurc: add driver to scan bifurcated\n\tnetdev",
        "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": "Signed-off-by: Cunming Liang <cunming.liang@intel.com>\n---\n config/common_linuxapp         |   5 +\n lib/Makefile                   |   1 +\n lib/librte_bifurc/Makefile     |  58 +++++++++\n lib/librte_bifurc/rte_bifurc.c | 284 +++++++++++++++++++++++++++++++++++++++++\n lib/librte_bifurc/rte_bifurc.h |  90 +++++++++++++\n mk/rte.app.mk                  |   6 +\n 6 files changed, 444 insertions(+)\n create mode 100644 lib/librte_bifurc/Makefile\n create mode 100644 lib/librte_bifurc/rte_bifurc.c\n create mode 100644 lib/librte_bifurc/rte_bifurc.h",
    "diff": "diff --git a/config/common_linuxapp b/config/common_linuxapp\nindex 86a0d15..72fe0b1 100644\n--- a/config/common_linuxapp\n+++ b/config/common_linuxapp\n@@ -163,6 +163,11 @@ CONFIG_RTE_LIBRTE_IEEE1588=n\n CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=16\n \n #\n+# Compile bifurcate driver backed by AF_PACKET sockets (Linux only)\n+#\n+CONFIG_RTE_LIBRTE_BIFURC=y\n+\n+#\n # Support NIC bypass logic\n #\n CONFIG_RTE_NIC_BYPASS=n\ndiff --git a/lib/Makefile b/lib/Makefile\nindex 204ef11..c59ae5b 100644\n--- a/lib/Makefile\n+++ b/lib/Makefile\n@@ -69,6 +69,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += librte_pipeline\n ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)\n DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni\n DIRS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += librte_ivshmem\n+DIRS-$(CONFIG_RTE_LIBRTE_BIFURC) += librte_bifurc\n endif\n \n include $(RTE_SDK)/mk/rte.sharelib.mk\ndiff --git a/lib/librte_bifurc/Makefile b/lib/librte_bifurc/Makefile\nnew file mode 100644\nindex 0000000..c5c1894\n--- /dev/null\n+++ b/lib/librte_bifurc/Makefile\n@@ -0,0 +1,58 @@\n+#   BSD LICENSE\n+#\n+#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+#   All rights reserved.\n+#\n+#   Redistribution and use in source and binary forms, with or without\n+#   modification, are permitted provided that the following conditions\n+#   are met:\n+#\n+#     * Redistributions of source code must retain the above copyright\n+#       notice, this list of conditions and the following disclaimer.\n+#     * Redistributions in binary form must reproduce the above copyright\n+#       notice, this list of conditions and the following disclaimer in\n+#       the documentation and/or other materials provided with the\n+#       distribution.\n+#     * Neither the name of Intel Corporation nor the names of its\n+#       contributors may be used to endorse or promote products derived\n+#       from this software without specific prior written permission.\n+#\n+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+#   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+include $(RTE_SDK)/mk/rte.vars.mk\n+\n+#\n+# library name\n+#\n+LIB = librte_bifurc.a\n+\n+CFLAGS += -O3\n+CFLAGS += $(WERROR_FLAGS)\n+\n+#\n+# all source are stored in SRCS-y\n+#\n+SRCS-$(CONFIG_RTE_LIBRTE_BIFURC) += rte_bifurc.c\n+\n+#\n+# Export include files\n+#\n+SYMLINK-$(CONFIG_RTE_LIBRTE_BIFURC)-include += rte_bifurc.h\n+\n+\n+# this lib depends upon:\n+DEPDIRS-$(CONFIG_RTE_LIBRTE_BIFURC) += lib/librte_eal\n+DEPDIRS-$(CONFIG_RTE_LIBRTE_BIFURC) += lib/librte_ether\n+DEPDIRS-$(CONFIG_RTE_LIBRTE_BIFURC) += lib/librte_kvargs\n+\n+include $(RTE_SDK)/mk/rte.lib.mk\ndiff --git a/lib/librte_bifurc/rte_bifurc.c b/lib/librte_bifurc/rte_bifurc.c\nnew file mode 100644\nindex 0000000..8cb29e3\n--- /dev/null\n+++ b/lib/librte_bifurc/rte_bifurc.c\n@@ -0,0 +1,284 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Intel Corporation nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#include <linux/if_ether.h>\n+#include <linux/if_packet.h>\n+#include <arpa/inet.h>\n+#include <net/if.h>\n+#include <sys/types.h>\n+#include <sys/socket.h>\n+#include <sys/ioctl.h>\n+#include <sys/mman.h>\n+#include <unistd.h>\n+#include <poll.h>\n+#include <errno.h>\n+\n+#include <rte_eal.h>\n+#include <rte_malloc.h>\n+#include <rte_memzone.h>\n+#include <rte_mempool.h>\n+#include <rte_dev.h>\n+#include <rte_pci.h>\n+#include <rte_ethdev.h>\n+#include <rte_kvargs.h>\n+#include <rte_pci_bifurc.h>\n+#include \"rte_bifurc.h\"\n+\n+void\n+rte_bifurc_ethdev_get_info(struct rte_eth_dev *dev,\n+\t\t\t   struct rte_eth_dev_info *dev_info)\n+{\n+\tstruct bifurc_device *bif_dev = (struct bifurc_device *)dev->pci_dev;\n+\n+\tdev_info->if_index = bif_dev->if_index;\n+\tdev_info->max_mac_addrs = 1;\n+\tdev_info->max_rx_pktlen = (uint32_t)bif_dev->mtu;\n+\tdev_info->max_rx_queues = (uint32_t)bif_dev->nb_queues;\n+\tdev_info->max_tx_queues = (uint32_t)bif_dev->nb_queues;\n+\tdev_info->min_rx_bufsize = 0;\n+\tdev_info->pci_dev = NULL;\n+}\n+\n+static const char *valid_arguments[] = {\n+\tRTE_BIFURC_IFACE_ARG,\n+\tRTE_BIFURC_NUM_QPAIRS_ARG,\n+\tNULL,\n+};\n+\n+static int\n+bif_get_ifname(const char *key __rte_unused,\n+\t       const char *iface,\n+\t       void *extra_args)\n+{\n+\tchar *ifname = (char *)extra_args;\n+\tuint16_t ifnamelen;\n+\n+\tifnamelen = strlen(iface);\n+\tif (ifnamelen >= IFNAMSIZ) {\n+\t\tRTE_LOG(ERR, EAL,\n+\t\t\t\"I/F name too long (%s)\\n\", iface);\n+\t\treturn -1;\n+\t}\n+\n+\t/* request for ifindex */\n+\tmemcpy(ifname, iface, ifnamelen);\n+\tifname[ifnamelen] = '\\0';\n+\n+\treturn 0;\n+}\n+\n+static int\n+bif_get_qp(const char *key __rte_unused,\n+\t   const char *value,\n+\t   void *extra_args)\n+{\n+\tuint32_t qpairs = RTE_BIFURC_PMD_MAX_QPAIRS;\n+\tuint32_t *nb_qp = (uint32_t *)extra_args;\n+\n+\tqpairs = atoi(value);\n+\tif (qpairs < 1 ||\n+\t    qpairs > RTE_BIFURC_PMD_MAX_QPAIRS) {\n+\t\tRTE_LOG(ERR, EAL, \"invalid qpairs value\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\t*nb_qp = qpairs;\n+\n+\treturn 0;\n+}\n+\n+static struct bifurc_device *\n+rte_bifurc_alloc_dev(char *iface, struct rte_devargs *devargs)\n+{\n+\tstruct bifurc_device *dev = NULL;\n+\tuint16_t ifnamelen;\n+\tint sockfd = -1;\n+\n+\tif (iface == NULL || devargs == NULL)\n+\t\tgoto error;\n+\n+\tif (rte_eal_bifurc_open(&sockfd))\n+\t\tgoto error;\n+\n+\tifnamelen = strlen(iface);\n+\tif (ifnamelen >= IFNAMSIZ) {\n+\t\tRTE_LOG(ERR, EAL,\n+\t\t\t\"I/F name too long (%s)\\n\", iface);\n+\t\tgoto error;\n+\t}\n+\n+\t/* alloc dev and bind to af_packet socket */\n+\tdev = calloc(sizeof(*dev), 1);\n+\tif (dev == NULL)\n+\t\tgoto error;\n+\n+\tmemcpy(dev->iface_name, iface, ifnamelen);\n+\tdev->iface_name[ifnamelen] = '\\0';\n+\n+\tif (rte_eal_bifurc_get_ifinfo(sockfd, dev->iface_name, &dev->if_index,\n+\t\t\t\t      dev->hwaddr, &dev->mtu) != 0)\n+\t\tgoto error;\n+\n+\tif (rte_eal_bifurc_bind(sockfd, dev->if_index) != 0)\n+\t\tgoto error;\n+\n+\t/* update dev after bind success */\n+\tdev->fd = sockfd;\n+\n+\tif (rte_eal_bifurc_set_pci(sockfd, &dev->pci_dev) != 0)\n+\t\tgoto error;\n+\n+\t/* use iface name as pci_dev name */\n+\tsnprintf(dev->pci_dev.name, RTE_PCI_DEV_NAME_SIZE, \"%s\",\n+\t\t dev->iface_name);\n+\n+\tdev->pci_dev.devargs = devargs;\n+\n+\tTAILQ_INSERT_TAIL(&pci_device_list, &dev->pci_dev, next);\n+\n+\treturn dev;\n+\n+error:\n+\tif (sockfd >= 0)\n+\t\tclose(sockfd);\n+\tif (dev)\n+\t\tfree(dev);\n+\n+\treturn NULL;\n+}\n+\n+static void\n+rte_bifurc_free_dev(struct bifurc_device *dev)\n+{\n+\tstruct rte_pci_device *pci_dev = NULL;\n+\n+\tif (!dev)\n+\t\treturn;\n+\n+\tpci_dev = &dev->pci_dev;\n+\n+\t/* unmap the mapped device memory */\n+\trte_eal_bifurc_unmap(dev->fd, pci_dev->mem_resource[0].addr);\n+\n+\t/* return queues to kernel driver */\n+\trte_eal_bifurc_retire(dev->fd, dev->nb_queues, dev->qp_lower);\n+\n+\t/* free the rest */\n+\tif (pci_dev->devargs != NULL)\n+\t\tfree(pci_dev->devargs);\n+\n+\tclose(dev->fd);\n+\tfree(dev);\n+}\n+\n+void\n+rte_bifurc_ethdev_free(struct rte_eth_dev *dev)\n+{\n+\trte_bifurc_free_dev((struct bifurc_device *)dev->pci_dev);\n+}\n+\n+static int\n+rte_bifurc_dev_init(const char *name, const char *params)\n+{\n+\tstruct rte_devargs *devargs = NULL;\n+\tstruct rte_kvargs *kvlist;\n+\tstruct bifurc_device *dev = NULL;\n+\tunsigned nb_qp;\n+\tint ret = 0;\n+\tchar iface[IFNAMSIZ];\n+\n+\tRTE_LOG(INFO, PMD, \"Initializing %s vdev\\n\", name);\n+\n+\tkvlist = rte_kvargs_parse(params, valid_arguments);\n+\tif (kvlist == NULL)\n+\t\treturn -1;\n+\n+\t/*\n+\t * If iface argument is passed we open the NICs and use them for\n+\t * reading / writing\n+\t */\n+\t/* prepare dev info from kvlist  */\n+\tif (rte_kvargs_count(kvlist, RTE_BIFURC_NUM_QPAIRS_ARG))\n+\t\tret |= rte_kvargs_process(kvlist,\n+\t\t\t\t\t  RTE_BIFURC_NUM_QPAIRS_ARG,\n+\t\t\t\t\t  &bif_get_qp, &nb_qp);\n+\n+\tif (rte_kvargs_count(kvlist, RTE_BIFURC_IFACE_ARG))\n+\t\tret |= rte_kvargs_process(kvlist, RTE_BIFURC_IFACE_ARG,\n+\t\t\t\t\t  &bif_get_ifname, &iface);\n+\tif (ret)\n+\t\tgoto exit;\n+\n+\tdevargs = rte_eal_bifurc_get_devargs(name, params);\n+\tif (devargs == NULL) {\n+\t\tret = -1;\n+\t\tgoto exit;\n+\t}\n+\n+\tdev = rte_bifurc_alloc_dev(iface, devargs);\n+\tif (dev == NULL) {\n+\t\tprintf(\"no dev attach\\n\");\n+\t\tret = -1;\n+\t\tgoto exit;\n+\t}\n+\n+\tdev->nb_queues = nb_qp;\n+\tret = rte_eal_bifurc_split(dev->fd, &dev->nb_queues, &dev->qp_lower);\n+\tif (ret != 0)\n+\t\tgoto exit;\n+\n+\tif (rte_eal_bifurc_map(dev->fd,\n+\t\t\t       &(dev->pci_dev.mem_resource[0].addr),\n+\t\t\t       (uint32_t *)\n+\t\t\t       &(dev->pci_dev.mem_resource[0].len)))\n+\t\tgoto exit;\n+\n+\treturn 0;\n+exit:\n+\tif (devargs)\n+\t\trte_eal_bifurc_put_devargs(devargs);\n+\n+\tif (dev)\n+\t\trte_bifurc_free_dev(dev);\n+\n+\trte_kvargs_free(kvlist);\n+\treturn ret;\n+}\n+\n+static struct rte_driver bifurc_bus_drv = {\n+\t.name = RTE_BIFURC_DRV_NAME,\n+\t.type = PMD_VDEV,\n+\t.init = rte_bifurc_dev_init,\n+};\n+\n+PMD_REGISTER_DRIVER(bifurc_bus_drv);\ndiff --git a/lib/librte_bifurc/rte_bifurc.h b/lib/librte_bifurc/rte_bifurc.h\nnew file mode 100644\nindex 0000000..c0951a5\n--- /dev/null\n+++ b/lib/librte_bifurc/rte_bifurc.h\n@@ -0,0 +1,90 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Intel Corporation nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#ifndef _RTE_BIFURC_H_\n+#define _RTE_BIFURC_H_\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+#include <rte_pci_bifurc.h>\n+#include <rte_ethdev.h>\n+\n+#define RTE_BIFURC_DRV_NAME             \"rte_bifurc\"\n+#define RTE_BIFURC_IFACE_ARG\t\t\"iface\"\n+#define RTE_BIFURC_NUM_QPAIRS_ARG\t\"qpairs\"\n+#define RTE_BIFURC_PMD_MAX_QPAIRS       2\n+\n+#define RTE_BIFURC_IFNAMESIZ            16\n+#define RTE_BIFURC_HWADDR_LEN           6\n+\n+struct bifurc_device {\n+\tstruct rte_pci_device pci_dev;\n+\tchar iface_name[RTE_BIFURC_IFNAMESIZ];\n+\tint fd;\n+\tint if_index;\n+\tuint8_t hwaddr[RTE_BIFURC_HWADDR_LEN];\n+\tint mtu;\n+\tunsigned qp_lower;\n+\tunsigned nb_queues;\n+};\n+\n+void\n+rte_bifurc_ethdev_get_info(struct rte_eth_dev *dev,\n+\t\t\t   struct rte_eth_dev_info *dev_info);\n+\n+void\n+rte_bifurc_ethdev_free(struct rte_eth_dev *dev);\n+\n+static inline uint32_t\n+rte_bifurc_qp_base(struct rte_eth_dev *dev)\n+{\n+\tstruct bifurc_device *bif_dev =\n+\t\t(struct bifurc_device *)dev->pci_dev;\n+\treturn bif_dev->qp_lower;\n+}\n+\n+static inline void\n+rte_bifurc_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)\n+{\n+\tstruct bifurc_device *bif_dev =\n+\t\t(struct bifurc_device *)dev->pci_dev;\n+\tether_addr_copy((struct ether_addr *)bif_dev->hwaddr, mac_addr);\n+}\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* _RTE_BIFURC_H_ */\ndiff --git a/mk/rte.app.mk b/mk/rte.app.mk\nindex 59468b0..ea074ab 100644\n--- a/mk/rte.app.mk\n+++ b/mk/rte.app.mk\n@@ -219,6 +219,12 @@ ifeq ($(CONFIG_RTE_LIBRTE_PMD_AF_PACKET),y)\n LDLIBS += -lrte_pmd_af_packet\n endif\n \n+ifeq ($(CONFIG_RTE_LIBRTE_BIFURC),y)\n+ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)\n+LDLIBS += -lrte_bifurc\n+endif\n+endif\n+\n endif # plugins\n \n LDLIBS += $(EXECENV_LDLIBS)\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "4/6"
    ]
}