get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 10134,
    "url": "http://patches.dpdk.org/api/patches/10134/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1453912360-18179-3-git-send-email-ferruh.yigit@intel.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": "<1453912360-18179-3-git-send-email-ferruh.yigit@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1453912360-18179-3-git-send-email-ferruh.yigit@intel.com",
    "date": "2016-01-27T16:32:40",
    "name": "[dpdk-dev,2/2] kdp: add virtual PMD for kernel slow data path communication",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c6c26674191f786a0a23c77a304ce1626b174620",
    "submitter": {
        "id": 324,
        "url": "http://patches.dpdk.org/api/people/324/?format=api",
        "name": "Ferruh Yigit",
        "email": "ferruh.yigit@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1453912360-18179-3-git-send-email-ferruh.yigit@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/10134/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/10134/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 8EA8CBE7C;\n\tWed, 27 Jan 2016 17:33:32 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 49470BE7C\n\tfor <dev@dpdk.org>; Wed, 27 Jan 2016 17:33:29 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga101.jf.intel.com with ESMTP; 27 Jan 2016 08:33:10 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga001.fm.intel.com with ESMTP; 27 Jan 2016 08:33:08 -0800",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tu0RGX7Lp011540; Wed, 27 Jan 2016 16:33:07 GMT",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id u0RGX7NT018230;\n\tWed, 27 Jan 2016 16:33:07 GMT",
            "(from fyigit@localhost)\n\tby sivswdev01.ir.intel.com with  id u0RGX7kj018226;\n\tWed, 27 Jan 2016 16:33:07 GMT"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.22,355,1449561600\"; d=\"scan'208\";a=\"890329744\"",
        "From": "Ferruh Yigit <ferruh.yigit@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Wed, 27 Jan 2016 16:32:40 +0000",
        "Message-Id": "<1453912360-18179-3-git-send-email-ferruh.yigit@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1453912360-18179-1-git-send-email-ferruh.yigit@intel.com>",
        "References": "<1453912360-18179-1-git-send-email-ferruh.yigit@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 2/2] kdp: add virtual PMD for kernel slow data\n\tpath communication",
        "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": "This patch provides slow data path communication to the Linux kernel.\nPatch is based on librte_kni, and heavily re-uses it.\n\nThe main difference is librte_kni library converted into a PMD, to\nprovide ease of use for applications.\n\nNow any application can use slow path communication without any update\nin application, because of existing eal support for virtual PMD.\n\nAlso this PMD supports two methods to send packets to the Linux, first\none is custom FIFO implementation with help of KDP kernel module, second\none is Linux in-kernel tun/tap support. PMD first checks for KDP kernel\nmodule, if fails it tries to create and use a tap interface.\n\nWith FIFO method: PMD's rx_pkt_burst() get packets from FIFO,\nand tx_pkt_burst() puts packet to the FIFO.\nThe corresponding Linux virtual network device driver code\nalso gets/puts packets from FIFO as they are coming from hardware.\n\nWith tun/tap method: no external kernel module required, PMD reads from\nand writes packets to the tap interface file descriptor. Tap interface\nhas performance penalty against FIFO implementation.\n\nSigned-off-by: Ferruh Yigit <ferruh.yigit@intel.com>\n---\n config/common_linuxapp                  |   1 +\n doc/guides/nics/pcap_ring.rst           | 125 ++++++++-\n doc/guides/rel_notes/release_2_3.rst    |   6 +\n drivers/net/Makefile                    |   3 +-\n drivers/net/kdp/Makefile                |  61 ++++\n drivers/net/kdp/rte_eth_kdp.c           | 481 ++++++++++++++++++++++++++++++++\n drivers/net/kdp/rte_kdp.c               | 365 ++++++++++++++++++++++++\n drivers/net/kdp/rte_kdp.h               | 126 +++++++++\n drivers/net/kdp/rte_kdp_fifo.h          |  91 ++++++\n drivers/net/kdp/rte_kdp_tap.c           |  96 +++++++\n drivers/net/kdp/rte_pmd_kdp_version.map |   4 +\n lib/librte_eal/common/include/rte_log.h |   3 +-\n mk/rte.app.mk                           |   3 +-\n 13 files changed, 1359 insertions(+), 6 deletions(-)\n create mode 100644 drivers/net/kdp/Makefile\n create mode 100644 drivers/net/kdp/rte_eth_kdp.c\n create mode 100644 drivers/net/kdp/rte_kdp.c\n create mode 100644 drivers/net/kdp/rte_kdp.h\n create mode 100644 drivers/net/kdp/rte_kdp_fifo.h\n create mode 100644 drivers/net/kdp/rte_kdp_tap.c\n create mode 100644 drivers/net/kdp/rte_pmd_kdp_version.map",
    "diff": "diff --git a/config/common_linuxapp b/config/common_linuxapp\nindex 73c91d8..b9dec0c 100644\n--- a/config/common_linuxapp\n+++ b/config/common_linuxapp\n@@ -322,6 +322,7 @@ CONFIG_RTE_LIBRTE_PMD_NULL=y\n #\n # Compile KDP PMD\n #\n+CONFIG_RTE_LIBRTE_PMD_KDP=y\n CONFIG_RTE_KDP_KMOD=y\n CONFIG_RTE_KDP_PREEMPT_DEFAULT=y\n \ndiff --git a/doc/guides/nics/pcap_ring.rst b/doc/guides/nics/pcap_ring.rst\nindex 46aa3ac..78b7b61 100644\n--- a/doc/guides/nics/pcap_ring.rst\n+++ b/doc/guides/nics/pcap_ring.rst\n@@ -28,11 +28,11 @@\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-Libpcap and Ring Based Poll Mode Drivers\n-========================================\n+Software Poll Mode Drivers\n+==========================\n \n In addition to Poll Mode Drivers (PMDs) for physical and virtual hardware,\n-the DPDK also includes two pure-software PMDs. These two drivers are:\n+the DPDK also includes pure-software PMDs. These drivers are:\n \n *   A libpcap -based PMD (librte_pmd_pcap) that reads and writes packets using libpcap,\n     - both from files on disk, as well as from physical NIC devices using standard Linux kernel drivers.\n@@ -40,6 +40,10 @@ the DPDK also includes two pure-software PMDs. These two drivers are:\n *   A ring-based PMD (librte_pmd_ring) that allows a set of software FIFOs (that is, rte_ring)\n     to be accessed using the PMD APIs, as though they were physical NICs.\n \n+*   A slow data path PMD (librte_pmd_kdp) that allows send/get packets to/from OS network\n+    stack as it is a physical NIC.\n+\n+\n .. note::\n \n     The libpcap -based PMD is disabled by default in the build configuration files,\n@@ -211,6 +215,121 @@ Multiple devices may be specified, separated by commas.\n     Done.\n \n \n+Kernel Data Path PMD\n+~~~~~~~~~~~~~~~~~~~~\n+\n+Kernel Data Path (KDP) PMD is to communicate with OS network stack easily by application.\n+\n+.. code-block:: console\n+\n+        ./testpmd --vdev eth_kdp0 --vdev eth_kdp1 -- -i\n+        ...\n+        Configuring Port 0 (socket 0)\n+        Port 0: 00:00:00:00:00:00\n+        Configuring Port 1 (socket 0)\n+        Port 1: 00:00:00:00:00:00\n+        Checking link statuses...\n+        Port 0 Link Up - speed 10000 Mbps - full-duplex\n+        Port 1 Link Up - speed 10000 Mbps - full-duplex\n+        Done\n+\n+KDP PMD supports two type of communication:\n+\n+* Custom FIFO implementation\n+* tun/tap implementation\n+\n+Custom FIFO implementation gives more performance but requires KDP kernel module (rte_kdp.ko) inserted.\n+\n+By default FIFO communication has priority, if KDP kernel module is not inserted, tun/tap communication used.\n+\n+If KDP kernel module inserted, above testpmd command will create following virtual interfaces, these can be used as any interface.\n+\n+.. code-block:: console\n+\n+        # ifconfig kdp0; ifconfig kdp1\n+        kdp0: flags=4098<BROADCAST,MULTICAST>  mtu 1500\n+                ether 00:00:00:00:00:00  txqueuelen 1000  (Ethernet)\n+                RX packets 0  bytes 0 (0.0 B)\n+                RX errors 0  dropped 0  overruns 0  frame 0\n+                TX packets 0  bytes 0 (0.0 B)\n+                TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0\n+\n+        kdp1: flags=4098<BROADCAST,MULTICAST>  mtu 1500\n+                ether 00:00:00:00:00:00  txqueuelen 1000  (Ethernet)\n+                RX packets 0  bytes 0 (0.0 B)\n+                RX errors 0  dropped 0  overruns 0  frame 0\n+                TX packets 0  bytes 0 (0.0 B)\n+                TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0\n+\n+\n+With tun/tap communication method, following interfaces are created:\n+\n+.. code-block:: console\n+\n+        # ifconfig tap_kdp0; ifconfig tap_kdp1\n+        tap_kdp0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\n+                inet6 fe80::341f:afff:feb7:23db  prefixlen 64  scopeid 0x20<link>\n+                ether 36:1f:af:b7:23:db  txqueuelen 500  (Ethernet)\n+                RX packets 126624864  bytes 6184828655 (5.7 GiB)\n+                RX errors 0  dropped 0  overruns 0  frame 0\n+                TX packets 126236898  bytes 6150306636 (5.7 GiB)\n+                TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0\n+\n+        tap_kdp1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500\n+                inet6 fe80::f030:b4ff:fe94:b720  prefixlen 64  scopeid 0x20<link>\n+                ether f2:30:b4:94:b7:20  txqueuelen 500  (Ethernet)\n+                RX packets 126237370  bytes 6150329717 (5.7 GiB)\n+                RX errors 0  dropped 9  overruns 0  frame 0\n+                TX packets 126624896  bytes 6184826874 (5.7 GiB)\n+                TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0\n+\n+DPDK application can be used to forward packages between these interfaces:\n+\n+.. code-block:: console\n+\n+        In Linux:\n+        ip l add br0 type bridge\n+        ip l set tap_kdp0 master br0\n+        ip l set tap_kdp1 master br0\n+        ip l set br0 up\n+        ip l set tap_kdp0 up\n+        ip l set tap_kdp1 up\n+\n+\n+        In testpmd:\n+        testpmd> start\n+          io packet forwarding - CRC stripping disabled - packets/burst=32\n+          nb forwarding cores=1 - nb forwarding ports=2\n+          RX queues=1 - RX desc=128 - RX free threshold=0\n+          RX threshold registers: pthresh=0 hthresh=0 wthresh=0\n+          TX queues=1 - TX desc=512 - TX free threshold=0\n+          TX threshold registers: pthresh=0 hthresh=0 wthresh=0\n+          TX RS bit threshold=0 - TXQ flags=0x0\n+        testpmd> stop\n+        Telling cores to stop...\n+        Waiting for lcores to finish...\n+\n+          ---------------------- Forward statistics for port 0  ----------------------\n+          RX-packets: 973900         RX-dropped: 0             RX-total: 973900\n+          TX-packets: 973903         TX-dropped: 0             TX-total: 973903\n+          ----------------------------------------------------------------------------\n+\n+          ---------------------- Forward statistics for port 1  ----------------------\n+          RX-packets: 973903         RX-dropped: 0             RX-total: 973903\n+          TX-packets: 973900         TX-dropped: 0             TX-total: 973900\n+          ----------------------------------------------------------------------------\n+\n+          +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++\n+          RX-packets: 1947803        RX-dropped: 0             RX-total: 1947803\n+          TX-packets: 1947803        TX-dropped: 0             TX-total: 1947803\n+          ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n+\n+        Done.\n+\n+\n+\n+\n+\n Using the Poll Mode Driver from an Application\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n \ndiff --git a/doc/guides/rel_notes/release_2_3.rst b/doc/guides/rel_notes/release_2_3.rst\nindex 99de186..faf6a17 100644\n--- a/doc/guides/rel_notes/release_2_3.rst\n+++ b/doc/guides/rel_notes/release_2_3.rst\n@@ -4,6 +4,12 @@ DPDK Release 2.3\n New Features\n ------------\n \n+* **Added Slow Data Path support.**\n+\n+  * This is based on KNI work and in long term intends to replace it.\n+  * Added Kernel Data Path (KDP) kernel module.\n+  * Added KDP virtual PMD.\n+\n \n Resolved Issues\n ---------------\ndiff --git a/drivers/net/Makefile b/drivers/net/Makefile\nindex 6e4497e..0be06f5 100644\n--- a/drivers/net/Makefile\n+++ b/drivers/net/Makefile\n@@ -1,6 +1,6 @@\n #   BSD LICENSE\n #\n-#   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.\n+#   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.\n #   All rights reserved.\n #\n #   Redistribution and use in source and binary forms, with or without\n@@ -51,6 +51,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += szedata2\n DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio\n DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += vmxnet3\n DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += xenvirt\n+DIRS-$(CONFIG_RTE_LIBRTE_PMD_KDP) += kdp\n \n include $(RTE_SDK)/mk/rte.sharelib.mk\n include $(RTE_SDK)/mk/rte.subdir.mk\ndiff --git a/drivers/net/kdp/Makefile b/drivers/net/kdp/Makefile\nnew file mode 100644\nindex 0000000..035056e\n--- /dev/null\n+++ b/drivers/net/kdp/Makefile\n@@ -0,0 +1,61 @@\n+#   BSD LICENSE\n+#\n+#   Copyright(c) 2016 Intel Corporation. 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_pmd_kdp.a\n+\n+CFLAGS += -O3\n+CFLAGS += $(WERROR_FLAGS)\n+\n+EXPORT_MAP := rte_pmd_kdp_version.map\n+\n+LIBABIVER := 1\n+\n+#\n+# all source are stored in SRCS-y\n+#\n+SRCS-$(CONFIG_RTE_LIBRTE_PMD_KDP) += rte_eth_kdp.c\n+SRCS-$(CONFIG_RTE_LIBRTE_PMD_KDP) += rte_kdp.c\n+SRCS-$(CONFIG_RTE_LIBRTE_PMD_KDP) += rte_kdp_tap.c\n+\n+#\n+# Export include files\n+#\n+SYMLINK-y-include +=\n+\n+# this lib depends upon:\n+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_KDP) += lib/librte_mbuf\n+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_KDP) += lib/librte_ether\n+\n+include $(RTE_SDK)/mk/rte.lib.mk\ndiff --git a/drivers/net/kdp/rte_eth_kdp.c b/drivers/net/kdp/rte_eth_kdp.c\nnew file mode 100644\nindex 0000000..ac650d7\n--- /dev/null\n+++ b/drivers/net/kdp/rte_eth_kdp.c\n@@ -0,0 +1,481 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2016 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 <rte_ethdev.h>\n+#include <rte_dev.h>\n+#include <rte_kvargs.h>\n+\n+#include \"rte_kdp.h\"\n+\n+#define MAX_PACKET_SZ 2048\n+\n+struct kdp_queue {\n+\tstruct pmd_internals *internals;\n+\tstruct rte_mempool *mb_pool;\n+\n+\tuint64_t rx_pkts;\n+\tuint64_t rx_bytes;\n+\tuint64_t rx_err_pkts;\n+\tuint64_t tx_pkts;\n+\tuint64_t tx_bytes;\n+\tuint64_t tx_err_pkts;\n+};\n+\n+struct pmd_internals {\n+\tstruct rte_kdp *kdp;\n+\tstruct rte_kdp_tap *kdp_tap;\n+\n+\tstruct kdp_queue rx_queues[RTE_MAX_QUEUES_PER_PORT];\n+\tstruct kdp_queue tx_queues[RTE_MAX_QUEUES_PER_PORT];\n+};\n+\n+static struct ether_addr eth_addr = { .addr_bytes = {0} };\n+static const char *drivername = \"KDP PMD\";\n+static struct rte_eth_link pmd_link = {\n+\t\t.link_speed = 10000,\n+\t\t.link_duplex = ETH_LINK_FULL_DUPLEX,\n+\t\t.link_status = 0\n+};\n+\n+static uint16_t\n+eth_kdp_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)\n+{\n+\tstruct kdp_queue *kdp_q = q;\n+\tstruct pmd_internals *internals = kdp_q->internals;\n+\tuint16_t nb_pkts;\n+\n+\tnb_pkts = rte_kdp_rx_burst(internals->kdp, bufs, nb_bufs);\n+\n+\tkdp_q->rx_pkts += nb_pkts;\n+\tkdp_q->rx_err_pkts += nb_bufs - nb_pkts;\n+\n+\treturn nb_pkts;\n+}\n+\n+static uint16_t\n+eth_kdp_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)\n+{\n+\tstruct kdp_queue *kdp_q = q;\n+\tstruct pmd_internals *internals = kdp_q->internals;\n+\tuint16_t nb_pkts;\n+\n+\tnb_pkts =  rte_kdp_tx_burst(internals->kdp, bufs, nb_bufs);\n+\n+\tkdp_q->tx_pkts += nb_pkts;\n+\tkdp_q->tx_err_pkts += nb_bufs - nb_pkts;\n+\n+\treturn nb_pkts;\n+}\n+\n+static uint16_t\n+eth_kdp_tap_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)\n+{\n+\tstruct kdp_queue *kdp_q = q;\n+\tstruct pmd_internals *internals = kdp_q->internals;\n+\tstruct rte_kdp_tap *kdp_tap = internals->kdp_tap;\n+\tstruct rte_mbuf *m;\n+\tint ret;\n+\tunsigned i;\n+\n+\tfor (i = 0; i < nb_bufs; i++) {\n+\t\tm = rte_pktmbuf_alloc(kdp_q->mb_pool);\n+\t\tbufs[i] = m;\n+\t\tret = read(kdp_tap->tap_fd, rte_pktmbuf_mtod(m, void *),\n+\t\t\t\tMAX_PACKET_SZ);\n+\t\tif (ret < 0) {\n+\t\t\trte_pktmbuf_free(m);\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tm->nb_segs = 1;\n+\t\tm->next = NULL;\n+\t\tm->pkt_len = (uint16_t)ret;\n+\t\tm->data_len = (uint16_t)ret;\n+\t}\n+\n+\tkdp_q->rx_pkts += i;\n+\tkdp_q->rx_err_pkts += nb_bufs - i;\n+\n+\treturn i;\n+}\n+\n+static uint16_t\n+eth_kdp_tap_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)\n+{\n+\tstruct kdp_queue *kdp_q = q;\n+\tstruct pmd_internals *internals = kdp_q->internals;\n+\tstruct rte_kdp_tap *kdp_tap = internals->kdp_tap;\n+\tstruct rte_mbuf *m;\n+\tunsigned i;\n+\n+\tfor (i = 0; i < nb_bufs; i++) {\n+\t\tm = bufs[i];\n+\t\twrite(kdp_tap->tap_fd, rte_pktmbuf_mtod(m, void*),\n+\t\t\t\trte_pktmbuf_data_len(m));\n+\t\trte_pktmbuf_free(m);\n+\t}\n+\n+\tkdp_q->tx_pkts += i;\n+\tkdp_q->tx_err_pkts += nb_bufs - i;\n+\n+\treturn i;\n+}\n+\n+static int\n+kdp_start(struct rte_eth_dev *dev)\n+{\n+\tstruct pmd_internals *internals = dev->data->dev_private;\n+\tstruct rte_kdp_conf conf;\n+\tuint16_t port_id = dev->data->port_id;\n+\tint ret = 0;\n+\n+\tif (internals->kdp) {\n+\t\tsnprintf(conf.name, RTE_KDP_NAMESIZE, \"kdp%u\", port_id);\n+\t\tconf.force_bind = 0;\n+\t\tconf.group_id = port_id;\n+\t\tconf.mbuf_size = MAX_PACKET_SZ;\n+\n+\t\tret = rte_kdp_start(internals->kdp,\n+\t\t\t\tinternals->rx_queues[0].mb_pool,\n+\t\t\t\t&conf);\n+\t\tif (ret)\n+\t\t\tRTE_LOG(ERR, KDP, \"Fail to create kdp for port: %d\\n\",\n+\t\t\t\t\tport_id);\n+\t}\n+\n+\treturn ret;\n+}\n+\n+static int\n+eth_dev_start(struct rte_eth_dev *dev)\n+{\n+\tint ret;\n+\n+\tret = kdp_start(dev);\n+\tif (ret)\n+\t\treturn -1;\n+\n+\tdev->data->dev_link.link_status = 1;\n+\treturn 0;\n+}\n+\n+static void\n+eth_dev_stop(struct rte_eth_dev *dev)\n+{\n+\tstruct pmd_internals *internals = dev->data->dev_private;\n+\n+\trte_kdp_release(internals->kdp);\n+\tdev->data->dev_link.link_status = 0;\n+}\n+\n+static void\n+eth_dev_close(struct rte_eth_dev *dev __rte_unused)\n+{\n+\trte_kdp_close();\n+}\n+\n+static int\n+eth_dev_configure(struct rte_eth_dev *dev __rte_unused)\n+{\n+\treturn 0;\n+}\n+\n+static void\n+eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n+{\n+\tstruct rte_eth_dev_data *data = dev->data;\n+\n+\tdev_info->driver_name = data->drv_name;\n+\tdev_info->max_mac_addrs = 1;\n+\tdev_info->max_rx_pktlen = (uint32_t)-1;\n+\tdev_info->max_rx_queues = data->nb_rx_queues;\n+\tdev_info->max_tx_queues = data->nb_tx_queues;\n+\tdev_info->min_rx_bufsize = 0;\n+\tdev_info->pci_dev = NULL;\n+}\n+\n+static int\n+eth_rx_queue_setup(struct rte_eth_dev *dev,\n+\t\tuint16_t rx_queue_id __rte_unused,\n+\t\tuint16_t nb_rx_desc __rte_unused,\n+\t\tunsigned int socket_id __rte_unused,\n+\t\tconst struct rte_eth_rxconf *rx_conf __rte_unused,\n+\t\tstruct rte_mempool *mb_pool)\n+{\n+\tstruct pmd_internals *internals = dev->data->dev_private;\n+\tstruct kdp_queue *q;\n+\n+\tq = &internals->rx_queues[rx_queue_id];\n+\tq->internals = internals;\n+\tq->mb_pool = mb_pool;\n+\n+\tdev->data->rx_queues[rx_queue_id] = q;\n+\n+\treturn 0;\n+}\n+\n+static int\n+eth_tx_queue_setup(struct rte_eth_dev *dev,\n+\t\tuint16_t tx_queue_id,\n+\t\tuint16_t nb_tx_desc __rte_unused,\n+\t\tunsigned int socket_id __rte_unused,\n+\t\tconst struct rte_eth_txconf *tx_conf __rte_unused)\n+{\n+\tstruct pmd_internals *internals = dev->data->dev_private;\n+\tstruct kdp_queue *q;\n+\n+\tq = &internals->tx_queues[tx_queue_id];\n+\tq->internals = internals;\n+\n+\tdev->data->tx_queues[tx_queue_id] = q;\n+\n+\treturn 0;\n+}\n+\n+static void\n+eth_queue_release(void *q __rte_unused)\n+{\n+}\n+\n+static int\n+eth_link_update(struct rte_eth_dev *dev __rte_unused,\n+\t\tint wait_to_complete __rte_unused)\n+{\n+\treturn 0;\n+}\n+\n+static void\n+eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)\n+{\n+\tunsigned i, num_stats;\n+\tunsigned long rx_packets_total = 0, rx_bytes_total = 0;\n+\tunsigned long tx_packets_total = 0, tx_bytes_total = 0;\n+\tunsigned long tx_packets_err_total = 0;\n+\tstruct rte_eth_dev_data *data = dev->data;\n+\tstruct kdp_queue *q;\n+\n+\tnum_stats = RTE_MIN((unsigned)RTE_ETHDEV_QUEUE_STAT_CNTRS,\n+\t\t\tdata->nb_rx_queues);\n+\tfor (i = 0; i < num_stats; i++) {\n+\t\tq = data->rx_queues[i];\n+\t\tstats->q_ipackets[i] = q->rx_pkts;\n+\t\tstats->q_ibytes[i] = q->rx_bytes;\n+\t\trx_packets_total += stats->q_ipackets[i];\n+\t\trx_bytes_total += stats->q_ibytes[i];\n+\t}\n+\n+\tnum_stats = RTE_MIN((unsigned)RTE_ETHDEV_QUEUE_STAT_CNTRS,\n+\t\t\tdata->nb_tx_queues);\n+\tfor (i = 0; i < num_stats; i++) {\n+\t\tq = data->tx_queues[i];\n+\t\tstats->q_opackets[i] = q->tx_pkts;\n+\t\tstats->q_obytes[i] = q->tx_bytes;\n+\t\tstats->q_errors[i] = q->tx_err_pkts;\n+\t\ttx_packets_total += stats->q_opackets[i];\n+\t\ttx_bytes_total += stats->q_obytes[i];\n+\t\ttx_packets_err_total += stats->q_errors[i];\n+\t}\n+\n+\tstats->ipackets = rx_packets_total;\n+\tstats->ibytes = rx_bytes_total;\n+\tstats->opackets = tx_packets_total;\n+\tstats->obytes = tx_bytes_total;\n+\tstats->oerrors = tx_packets_err_total;\n+}\n+\n+static void\n+eth_stats_reset(struct rte_eth_dev *dev)\n+{\n+\tunsigned i;\n+\tstruct rte_eth_dev_data *data = dev->data;\n+\tstruct kdp_queue *q;\n+\n+\tfor (i = 0; i < data->nb_rx_queues; i++) {\n+\t\tq = data->rx_queues[i];\n+\t\tq->rx_pkts = 0;\n+\t\tq->rx_bytes = 0;\n+\t}\n+\tfor (i = 0; i < data->nb_tx_queues; i++) {\n+\t\tq = data->rx_queues[i];\n+\t\tq->tx_pkts = 0;\n+\t\tq->tx_bytes = 0;\n+\t\tq->tx_err_pkts = 0;\n+\t}\n+}\n+\n+static const struct eth_dev_ops ops = {\n+\t.dev_start = eth_dev_start,\n+\t.dev_stop = eth_dev_stop,\n+\t.dev_close = eth_dev_close,\n+\t.dev_configure = eth_dev_configure,\n+\t.dev_infos_get = eth_dev_info,\n+\t.rx_queue_setup = eth_rx_queue_setup,\n+\t.tx_queue_setup = eth_tx_queue_setup,\n+\t.rx_queue_release = eth_queue_release,\n+\t.tx_queue_release = eth_queue_release,\n+\t.link_update = eth_link_update,\n+\t.stats_get = eth_stats_get,\n+\t.stats_reset = eth_stats_reset,\n+};\n+\n+static struct rte_eth_dev *\n+eth_dev_kdp_create(const char *name, unsigned numa_node)\n+{\n+\tuint16_t nb_rx_queues = 1;\n+\tuint16_t nb_tx_queues = 1;\n+\tstruct rte_eth_dev_data *data = NULL;\n+\tstruct pmd_internals *internals = NULL;\n+\tstruct rte_eth_dev *eth_dev = NULL;\n+\n+\tif (name == NULL)\n+\t\treturn NULL;\n+\n+\tRTE_LOG(INFO, PMD, \"Creating kdp ethdev on numa socket %u\\n\",\n+\t\t\tnuma_node);\n+\n+\tdata = rte_zmalloc_socket(name, sizeof(*data), 0, numa_node);\n+\tif (data == NULL)\n+\t\tgoto error;\n+\n+\tinternals = rte_zmalloc_socket(name, sizeof(*internals), 0, numa_node);\n+\tif (internals == NULL)\n+\t\tgoto error;\n+\n+\t/* reserve an ethdev entry */\n+\teth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL);\n+\tif (eth_dev == NULL)\n+\t\tgoto error;\n+\n+\tdata->dev_private = internals;\n+\tdata->port_id = eth_dev->data->port_id;\n+\tmemmove(data->name, eth_dev->data->name, sizeof(data->name));\n+\tdata->nb_rx_queues = nb_rx_queues;\n+\tdata->nb_tx_queues = nb_tx_queues;\n+\tdata->dev_link = pmd_link;\n+\tdata->mac_addrs = &eth_addr;\n+\n+\teth_dev->data = data;\n+\teth_dev->dev_ops = &ops;\n+\teth_dev->driver = NULL;\n+\n+\tdata->dev_flags = RTE_ETH_DEV_DETACHABLE;\n+\tdata->kdrv = RTE_KDRV_NONE;\n+\tdata->drv_name = drivername;\n+\tdata->numa_node = numa_node;\n+\n+\treturn eth_dev;\n+\n+error:\n+\trte_free(data);\n+\trte_free(internals);\n+\n+\treturn NULL;\n+}\n+\n+static int\n+rte_pmd_kdp_devinit(const char *name, const char *params __rte_unused)\n+{\n+\tstruct rte_eth_dev *eth_dev = NULL;\n+\tstruct pmd_internals *internals;\n+\tstruct rte_kdp *kdp;\n+\tstruct rte_kdp_tap *kdp_tap = NULL;\n+\tuint16_t port_id;\n+\n+\tRTE_LOG(INFO, PMD, \"Initializing eth_kdp for %s\\n\", name);\n+\n+\teth_dev = eth_dev_kdp_create(name, rte_socket_id());\n+\tif (eth_dev == NULL)\n+\t\treturn -1;\n+\n+\tinternals = eth_dev->data->dev_private;\n+\tport_id = eth_dev->data->port_id;\n+\n+\tkdp = rte_kdp_init(port_id);\n+\tif (kdp == NULL)\n+\t\tkdp_tap = rte_kdp_tap_init(port_id);\n+\n+\tif (kdp == NULL && kdp_tap == NULL) {\n+\t\trte_eth_dev_release_port(eth_dev);\n+\t\trte_free(internals);\n+\n+\t\t/* Not return error to prevent panic in rte_eal_init()  */\n+\t\treturn 0;\n+\t}\n+\n+\tinternals->kdp = kdp;\n+\tinternals->kdp_tap = kdp_tap;\n+\n+\tif (kdp == NULL) {\n+\t\teth_dev->rx_pkt_burst = eth_kdp_tap_rx;\n+\t\teth_dev->tx_pkt_burst = eth_kdp_tap_tx;\n+\t} else {\n+\t\teth_dev->rx_pkt_burst = eth_kdp_rx;\n+\t\teth_dev->tx_pkt_burst = eth_kdp_tx;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int\n+rte_pmd_kdp_devuninit(const char *name)\n+{\n+\tstruct rte_eth_dev *eth_dev = NULL;\n+\n+\tif (name == NULL)\n+\t\treturn -EINVAL;\n+\n+\tRTE_LOG(INFO, PMD, \"Un-Initializing eth_kdp for %s\\n\", name);\n+\n+\t/* find the ethdev entry */\n+\teth_dev = rte_eth_dev_allocated(name);\n+\tif (eth_dev == NULL)\n+\t\treturn -1;\n+\n+\teth_dev_stop(eth_dev);\n+\n+\tif (eth_dev->data)\n+\t\trte_free(eth_dev->data->dev_private);\n+\trte_free(eth_dev->data);\n+\n+\trte_eth_dev_release_port(eth_dev);\n+\treturn 0;\n+}\n+\n+static struct rte_driver pmd_kdp_drv = {\n+\t.name = \"eth_kdp\",\n+\t.type = PMD_VDEV,\n+\t.init = rte_pmd_kdp_devinit,\n+\t.uninit = rte_pmd_kdp_devuninit,\n+};\n+\n+PMD_REGISTER_DRIVER(pmd_kdp_drv);\ndiff --git a/drivers/net/kdp/rte_kdp.c b/drivers/net/kdp/rte_kdp.c\nnew file mode 100644\nindex 0000000..604f697\n--- /dev/null\n+++ b/drivers/net/kdp/rte_kdp.c\n@@ -0,0 +1,365 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2016 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_EXEC_ENV_LINUXAPP\n+#error \"KDP is not supported\"\n+#endif\n+\n+#include <rte_spinlock.h>\n+#include <rte_ethdev.h>\n+#include <rte_memzone.h>\n+\n+#include \"rte_kdp.h\"\n+#include \"rte_kdp_fifo.h\"\n+\n+#define MAX_MBUF_BURST_NUM     32\n+\n+/* Maximum number of ring entries */\n+#define KDP_FIFO_COUNT_MAX     1024\n+#define KDP_FIFO_SIZE          (KDP_FIFO_COUNT_MAX * sizeof(void *) + \\\n+\t\t\t\t\tsizeof(struct rte_kdp_fifo))\n+\n+static volatile int kdp_fd = -1;\n+\n+static const struct rte_memzone *\n+kdp_memzone_reserve(const char *name, size_t len, int socket_id,\n+\t\tunsigned flags)\n+{\n+\tconst struct rte_memzone *mz = rte_memzone_lookup(name);\n+\n+\tif (mz == NULL)\n+\t\tmz = rte_memzone_reserve(name, len, socket_id, flags);\n+\n+\treturn mz;\n+}\n+\n+static int\n+slot_init(struct rte_kdp_memzone_slot *slot)\n+{\n+#define OBJNAMSIZ 32\n+\tchar obj_name[OBJNAMSIZ];\n+\tconst struct rte_memzone *mz;\n+\n+\t/* TX RING */\n+\tsnprintf(obj_name, OBJNAMSIZ, \"kdp_tx_%d\", slot->id);\n+\tmz = kdp_memzone_reserve(obj_name, KDP_FIFO_SIZE, SOCKET_ID_ANY, 0);\n+\tif (mz == NULL)\n+\t\tgoto kdp_fail;\n+\tslot->m_tx_q = mz;\n+\n+\t/* RX RING */\n+\tsnprintf(obj_name, OBJNAMSIZ, \"kdp_rx_%d\", slot->id);\n+\tmz = kdp_memzone_reserve(obj_name, KDP_FIFO_SIZE, SOCKET_ID_ANY, 0);\n+\tif (mz == NULL)\n+\t\tgoto kdp_fail;\n+\tslot->m_rx_q = mz;\n+\n+\t/* ALLOC RING */\n+\tsnprintf(obj_name, OBJNAMSIZ, \"kdp_alloc_%d\", slot->id);\n+\tmz = kdp_memzone_reserve(obj_name, KDP_FIFO_SIZE, SOCKET_ID_ANY, 0);\n+\tif (mz == NULL)\n+\t\tgoto kdp_fail;\n+\tslot->m_alloc_q = mz;\n+\n+\t/* FREE RING */\n+\tsnprintf(obj_name, OBJNAMSIZ, \"kdp_free_%d\", slot->id);\n+\tmz = kdp_memzone_reserve(obj_name, KDP_FIFO_SIZE, SOCKET_ID_ANY, 0);\n+\tif (mz == NULL)\n+\t\tgoto kdp_fail;\n+\tslot->m_free_q = mz;\n+\n+\treturn 0;\n+\n+kdp_fail:\n+\treturn -1;\n+}\n+\n+static void\n+ring_init(struct rte_kdp *kdp)\n+{\n+\tstruct rte_kdp_memzone_slot *slot = kdp->slot;\n+\tconst struct rte_memzone *mz;\n+\n+\t/* TX RING */\n+\tmz = slot->m_tx_q;\n+\tkdp->tx_q = mz->addr;\n+\tkdp_fifo_init(kdp->tx_q, KDP_FIFO_COUNT_MAX);\n+\n+\t/* RX RING */\n+\tmz = slot->m_rx_q;\n+\tkdp->rx_q = mz->addr;\n+\tkdp_fifo_init(kdp->rx_q, KDP_FIFO_COUNT_MAX);\n+\n+\t/* ALLOC RING */\n+\tmz = slot->m_alloc_q;\n+\tkdp->alloc_q = mz->addr;\n+\tkdp_fifo_init(kdp->alloc_q, KDP_FIFO_COUNT_MAX);\n+\n+\t/* FREE RING */\n+\tmz = slot->m_free_q;\n+\tkdp->free_q = mz->addr;\n+\tkdp_fifo_init(kdp->free_q, KDP_FIFO_COUNT_MAX);\n+}\n+\n+/* Shall be called before any allocation happens */\n+struct rte_kdp *\n+rte_kdp_init(uint16_t port_id)\n+{\n+\tstruct rte_kdp_memzone_slot *slot = NULL;\n+\tstruct rte_kdp *kdp = NULL;\n+\tint ret;\n+\n+\t/* Check FD and open */\n+\tif (kdp_fd < 0) {\n+\t\tkdp_fd = open(\"/dev/kdp\", O_RDWR);\n+\t\tif (kdp_fd < 0) {\n+\t\t\tRTE_LOG(ERR, KDP, \"Can not open /dev/kdp\\n\");\n+\t\t\treturn NULL;\n+\t\t}\n+\t}\n+\n+\tslot = rte_malloc(NULL, sizeof(struct rte_kdp_memzone_slot), 0);\n+\tif (slot == NULL)\n+\t\tgoto kdp_fail;\n+\tslot->id = port_id;\n+\n+\tkdp = rte_malloc(NULL, sizeof(struct rte_kdp), 0);\n+\tif (kdp == NULL)\n+\t\tgoto kdp_fail;\n+\tkdp->slot = slot;\n+\n+\tret = slot_init(slot);\n+\tif (ret < 0)\n+\t\tgoto kdp_fail;\n+\n+\tring_init(kdp);\n+\n+\treturn kdp;\n+\n+kdp_fail:\n+\trte_free(slot);\n+\trte_free(kdp);\n+\tRTE_LOG(ERR, KDP, \"Unable to allocate memory\\n\");\n+\treturn NULL;\n+}\n+\n+static void\n+kdp_allocate_mbufs(struct rte_kdp *kdp)\n+{\n+\tint i, ret;\n+\tstruct rte_mbuf *pkts[MAX_MBUF_BURST_NUM];\n+\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pool) !=\n+\t\t\t offsetof(struct rte_kdp_mbuf, pool));\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_addr) !=\n+\t\t\t offsetof(struct rte_kdp_mbuf, buf_addr));\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, next) !=\n+\t\t\t offsetof(struct rte_kdp_mbuf, next));\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_off) !=\n+\t\t\t offsetof(struct rte_kdp_mbuf, data_off));\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_len) !=\n+\t\t\t offsetof(struct rte_kdp_mbuf, data_len));\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pkt_len) !=\n+\t\t\t offsetof(struct rte_kdp_mbuf, pkt_len));\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, ol_flags) !=\n+\t\t\t offsetof(struct rte_kdp_mbuf, ol_flags));\n+\n+\t/* Check if pktmbuf pool has been configured */\n+\tif (kdp->pktmbuf_pool == NULL) {\n+\t\tRTE_LOG(ERR, KDP, \"No valid mempool for allocating mbufs\\n\");\n+\t\treturn;\n+\t}\n+\n+\tfor (i = 0; i < MAX_MBUF_BURST_NUM; i++) {\n+\t\tpkts[i] = rte_pktmbuf_alloc(kdp->pktmbuf_pool);\n+\t\tif (unlikely(pkts[i] == NULL)) {\n+\t\t\t/* Out of memory */\n+\t\t\tRTE_LOG(ERR, KDP, \"Out of memory\\n\");\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\t/* No pkt mbuf alocated */\n+\tif (i <= 0)\n+\t\treturn;\n+\n+\tret = kdp_fifo_put(kdp->alloc_q, (void **)pkts, i);\n+\n+\t/* Check if any mbufs not put into alloc_q, and then free them */\n+\tif (ret >= 0 && ret < i && ret < MAX_MBUF_BURST_NUM) {\n+\t\tint j;\n+\n+\t\tfor (j = ret; j < i; j++)\n+\t\t\trte_pktmbuf_free(pkts[j]);\n+\t}\n+}\n+\n+int\n+rte_kdp_start(struct rte_kdp *kdp, struct rte_mempool *pktmbuf_pool,\n+\t      const struct rte_kdp_conf *conf)\n+{\n+\tstruct rte_kdp_memzone_slot *slot = kdp->slot;\n+\tstruct rte_kdp_device_info dev_info;\n+\tchar mz_name[RTE_MEMZONE_NAMESIZE];\n+\tconst struct rte_memzone *mz;\n+\tint ret;\n+\n+\tif (!kdp || !pktmbuf_pool || !conf || !conf->name[0])\n+\t\treturn -1;\n+\n+\tsnprintf(kdp->name, RTE_KDP_NAMESIZE, \"%s\", conf->name);\n+\tkdp->pktmbuf_pool = pktmbuf_pool;\n+\tkdp->group_id = conf->group_id;\n+\n+\tmemset(&dev_info, 0, sizeof(dev_info));\n+\tdev_info.core_id = conf->core_id;\n+\tdev_info.force_bind = conf->force_bind;\n+\tdev_info.group_id = conf->group_id;\n+\tdev_info.mbuf_size = conf->mbuf_size;\n+\tsnprintf(dev_info.name, RTE_KDP_NAMESIZE, \"%s\", conf->name);\n+\n+\tdev_info.tx_phys = slot->m_tx_q->phys_addr;\n+\tdev_info.rx_phys = slot->m_rx_q->phys_addr;\n+\tdev_info.alloc_phys = slot->m_alloc_q->phys_addr;\n+\tdev_info.free_phys = slot->m_free_q->phys_addr;\n+\n+\t/* MBUF mempool */\n+\tsnprintf(mz_name, sizeof(mz_name), RTE_MEMPOOL_OBJ_NAME,\n+\t\tpktmbuf_pool->name);\n+\tmz = rte_memzone_lookup(mz_name);\n+\tif (mz == NULL)\n+\t\tgoto kdp_fail;\n+\tdev_info.mbuf_va = mz->addr;\n+\tdev_info.mbuf_phys = mz->phys_addr;\n+\n+\tret = ioctl(kdp_fd, RTE_KDP_IOCTL_CREATE, &dev_info);\n+\tif (ret < 0)\n+\t\tgoto kdp_fail;\n+\n+\tkdp->in_use = 1;\n+\n+\t/* Allocate mbufs and then put them into alloc_q */\n+\tkdp_allocate_mbufs(kdp);\n+\n+\treturn 0;\n+\n+kdp_fail:\n+\treturn -1;\n+}\n+\n+static void\n+kdp_free_mbufs(struct rte_kdp *kdp)\n+{\n+\tint i, ret;\n+\tstruct rte_mbuf *pkts[MAX_MBUF_BURST_NUM];\n+\n+\tret = kdp_fifo_get(kdp->free_q, (void **)pkts, MAX_MBUF_BURST_NUM);\n+\tif (likely(ret > 0)) {\n+\t\tfor (i = 0; i < ret; i++)\n+\t\t\trte_pktmbuf_free(pkts[i]);\n+\t}\n+}\n+\n+unsigned\n+rte_kdp_tx_burst(struct rte_kdp *kdp, struct rte_mbuf **mbufs, unsigned num)\n+{\n+\tunsigned ret = kdp_fifo_put(kdp->rx_q, (void **)mbufs, num);\n+\n+\t/* Get mbufs from free_q and then free them */\n+\tkdp_free_mbufs(kdp);\n+\n+\treturn ret;\n+}\n+\n+unsigned\n+rte_kdp_rx_burst(struct rte_kdp *kdp, struct rte_mbuf **mbufs, unsigned num)\n+{\n+\tunsigned ret = kdp_fifo_get(kdp->tx_q, (void **)mbufs, num);\n+\n+\t/* If buffers removed, allocate mbufs and then put them into alloc_q */\n+\tif (ret)\n+\t\tkdp_allocate_mbufs(kdp);\n+\n+\treturn ret;\n+}\n+\n+static void\n+kdp_free_fifo(struct rte_kdp_fifo *fifo)\n+{\n+\tint ret;\n+\tstruct rte_mbuf *pkt;\n+\n+\tdo {\n+\t\tret = kdp_fifo_get(fifo, (void **)&pkt, 1);\n+\t\tif (ret)\n+\t\t\trte_pktmbuf_free(pkt);\n+\t} while (ret);\n+}\n+\n+int\n+rte_kdp_release(struct rte_kdp *kdp)\n+{\n+\tstruct rte_kdp_device_info dev_info;\n+\n+\tif (!kdp || !kdp->in_use)\n+\t\treturn -1;\n+\n+\tsnprintf(dev_info.name, sizeof(dev_info.name), \"%s\", kdp->name);\n+\tif (ioctl(kdp_fd, RTE_KDP_IOCTL_RELEASE, &dev_info) < 0) {\n+\t\tRTE_LOG(ERR, KDP, \"Fail to release kdp device\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\t/* mbufs in all fifo should be released, except request/response */\n+\tkdp_free_fifo(kdp->tx_q);\n+\tkdp_free_fifo(kdp->rx_q);\n+\tkdp_free_fifo(kdp->alloc_q);\n+\tkdp_free_fifo(kdp->free_q);\n+\n+\trte_free(kdp->slot);\n+\n+\t/* Memset the KDP struct */\n+\tmemset(kdp, 0, sizeof(struct rte_kdp));\n+\n+\treturn 0;\n+}\n+\n+void\n+rte_kdp_close(void)\n+{\n+\tif (kdp_fd < 0)\n+\t\treturn;\n+\n+\tclose(kdp_fd);\n+\tkdp_fd = -1;\n+}\ndiff --git a/drivers/net/kdp/rte_kdp.h b/drivers/net/kdp/rte_kdp.h\nnew file mode 100644\nindex 0000000..b9db048\n--- /dev/null\n+++ b/drivers/net/kdp/rte_kdp.h\n@@ -0,0 +1,126 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2016 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_KDP_H_\n+#define _RTE_KDP_H_\n+\n+#include <fcntl.h>\n+#include <unistd.h>\n+\n+#include <sys/ioctl.h>\n+\n+#include <rte_malloc.h>\n+#include <rte_mbuf.h>\n+#include <rte_memcpy.h>\n+#include <rte_memory.h>\n+#include <rte_mempool.h>\n+\n+#include <exec-env/rte_kdp_common.h>\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/**\n+ * KDP memzone pool slot\n+ */\n+struct rte_kdp_memzone_slot {\n+\tuint32_t id;\n+\n+\t/* Memzones */\n+\tconst struct rte_memzone *m_tx_q;      /**< TX queue */\n+\tconst struct rte_memzone *m_rx_q;      /**< RX queue */\n+\tconst struct rte_memzone *m_alloc_q;   /**< Allocated mbufs queue */\n+\tconst struct rte_memzone *m_free_q;    /**< To be freed mbufs queue */\n+};\n+\n+/**\n+ * KDP context\n+ */\n+struct rte_kdp {\n+\tchar name[RTE_KDP_NAMESIZE];        /**< KDP interface name */\n+\tstruct rte_mempool *pktmbuf_pool;   /**< pkt mbuf mempool */\n+\tstruct rte_kdp_memzone_slot *slot;\n+\tuint16_t group_id;                  /**< Group ID of KDP devices */\n+\n+\tstruct rte_kdp_fifo *tx_q;          /**< TX queue */\n+\tstruct rte_kdp_fifo *rx_q;          /**< RX queue */\n+\tstruct rte_kdp_fifo *alloc_q;       /**< Allocated mbufs queue */\n+\tstruct rte_kdp_fifo *free_q;        /**< To be freed mbufs queue */\n+\n+\tuint8_t in_use;                     /**< kdp in use */\n+};\n+\n+struct rte_kdp_tap {\n+\tchar name[RTE_KDP_NAMESIZE];\n+\tint tap_fd;\n+};\n+\n+/**\n+ * Structure for configuring KDP device.\n+ */\n+struct rte_kdp_conf {\n+\t/*\n+\t * KDP name which will be used in relevant network device.\n+\t * Let the name as short as possible, as it will be part of\n+\t * memzone name.\n+\t */\n+\tchar name[RTE_KDP_NAMESIZE];\n+\tuint32_t core_id;   /* Core ID to bind kernel thread on */\n+\tuint16_t group_id;\n+\tunsigned mbuf_size;\n+\n+\tuint8_t force_bind; /* Flag to bind kernel thread */\n+};\n+\n+struct rte_kdp_tap *rte_kdp_tap_init(uint16_t port_id);\n+struct rte_kdp *rte_kdp_init(uint16_t port_id);\n+\n+int rte_kdp_start(struct rte_kdp *kdp, struct rte_mempool *pktmbuf_pool,\n+\t      const struct rte_kdp_conf *conf);\n+\n+unsigned rte_kdp_rx_burst(struct rte_kdp *kdp,\n+\t\tstruct rte_mbuf **mbufs, unsigned num);\n+\n+unsigned rte_kdp_tx_burst(struct rte_kdp *kdp,\n+\t\tstruct rte_mbuf **mbufs, unsigned num);\n+\n+int rte_kdp_release(struct rte_kdp *kdp);\n+\n+void rte_kdp_close(void);\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* _RTE_KDP_H_ */\ndiff --git a/drivers/net/kdp/rte_kdp_fifo.h b/drivers/net/kdp/rte_kdp_fifo.h\nnew file mode 100644\nindex 0000000..1a7e063\n--- /dev/null\n+++ b/drivers/net/kdp/rte_kdp_fifo.h\n@@ -0,0 +1,91 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2016 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+/**\n+ * Initializes the kdp fifo structure\n+ */\n+static void\n+kdp_fifo_init(struct rte_kdp_fifo *fifo, unsigned size)\n+{\n+\t/* Ensure size is power of 2 */\n+\tif (size & (size - 1))\n+\t\trte_panic(\"KDP fifo size must be power of 2\\n\");\n+\n+\tfifo->write = 0;\n+\tfifo->read = 0;\n+\tfifo->len = size;\n+\tfifo->elem_size = sizeof(void *);\n+}\n+\n+/**\n+ * Adds num elements into the fifo. Return the number actually written\n+ */\n+static inline unsigned\n+kdp_fifo_put(struct rte_kdp_fifo *fifo, void **data, unsigned num)\n+{\n+\tunsigned i = 0;\n+\tunsigned fifo_write = fifo->write;\n+\tunsigned fifo_read = fifo->read;\n+\tunsigned new_write = fifo_write;\n+\n+\tfor (i = 0; i < num; i++) {\n+\t\tnew_write = (new_write + 1) & (fifo->len - 1);\n+\n+\t\tif (new_write == fifo_read)\n+\t\t\tbreak;\n+\t\tfifo->buffer[fifo_write] = data[i];\n+\t\tfifo_write = new_write;\n+\t}\n+\tfifo->write = fifo_write;\n+\treturn i;\n+}\n+\n+/**\n+ * Get up to num elements from the fifo. Return the number actully read\n+ */\n+static inline unsigned\n+kdp_fifo_get(struct rte_kdp_fifo *fifo, void **data, unsigned num)\n+{\n+\tunsigned i = 0;\n+\tunsigned new_read = fifo->read;\n+\tunsigned fifo_write = fifo->write;\n+\tfor (i = 0; i < num; i++) {\n+\t\tif (new_read == fifo_write)\n+\t\t\tbreak;\n+\n+\t\tdata[i] = fifo->buffer[new_read];\n+\t\tnew_read = (new_read + 1) & (fifo->len - 1);\n+\t}\n+\tfifo->read = new_read;\n+\treturn i;\n+}\ndiff --git a/drivers/net/kdp/rte_kdp_tap.c b/drivers/net/kdp/rte_kdp_tap.c\nnew file mode 100644\nindex 0000000..f07ba98\n--- /dev/null\n+++ b/drivers/net/kdp/rte_kdp_tap.c\n@@ -0,0 +1,96 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2016 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 <string.h>\n+\n+#include <sys/socket.h>\n+#include <linux/if.h>\n+#include <linux/if_tun.h>\n+\n+#include \"rte_kdp.h\"\n+\n+static int\n+tap_create(char *name)\n+{\n+\tstruct ifreq ifr;\n+\tint fd, ret;\n+\n+\tfd = open(\"/dev/net/tun\", O_RDWR);\n+\tif (fd < 0)\n+\t\treturn fd;\n+\n+\tmemset(&ifr, 0, sizeof(ifr));\n+\n+\t/* TAP device without packet information */\n+\tifr.ifr_flags = IFF_TAP | IFF_NO_PI;\n+\n+\tif (name && *name)\n+\t\tsnprintf(ifr.ifr_name, IFNAMSIZ, \"%s\", name);\n+\n+\tret = ioctl(fd, TUNSETIFF, (void *)&ifr);\n+\tif (ret < 0) {\n+\t\tclose(fd);\n+\t\treturn ret;\n+\t}\n+\n+\tif (name)\n+\t\tsnprintf(name, IFNAMSIZ, \"%s\", ifr.ifr_name);\n+\n+\treturn fd;\n+}\n+\n+struct rte_kdp_tap *\n+rte_kdp_tap_init(uint16_t port_id)\n+{\n+\tstruct rte_kdp_tap *kdp_tap = NULL;\n+\tint flags;\n+\n+\tkdp_tap = rte_malloc(NULL, sizeof(struct rte_kdp_tap), 0);\n+\tif (kdp_tap == NULL)\n+\t\tgoto error;\n+\n+\tsnprintf(kdp_tap->name, IFNAMSIZ, \"tap_kdp%u\", port_id);\n+\tkdp_tap->tap_fd = tap_create(kdp_tap->name);\n+\tif (kdp_tap->tap_fd < 0)\n+\t\tgoto error;\n+\n+\tflags = fcntl(kdp_tap->tap_fd, F_GETFL, 0);\n+\tfcntl(kdp_tap->tap_fd, F_SETFL, flags | O_NONBLOCK);\n+\n+\treturn kdp_tap;\n+\n+error:\n+\trte_free(kdp_tap);\n+\treturn NULL;\n+}\n+\ndiff --git a/drivers/net/kdp/rte_pmd_kdp_version.map b/drivers/net/kdp/rte_pmd_kdp_version.map\nnew file mode 100644\nindex 0000000..0812bb1\n--- /dev/null\n+++ b/drivers/net/kdp/rte_pmd_kdp_version.map\n@@ -0,0 +1,4 @@\n+DPDK_2.3 {\n+\n+\tlocal: *;\n+};\ndiff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h\nindex 2e47e7f..5a0048b 100644\n--- a/lib/librte_eal/common/include/rte_log.h\n+++ b/lib/librte_eal/common/include/rte_log.h\n@@ -1,7 +1,7 @@\n /*-\n  *   BSD LICENSE\n  *\n- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.\n  *   All rights reserved.\n  *\n  *   Redistribution and use in source and binary forms, with or without\n@@ -79,6 +79,7 @@ extern struct rte_logs rte_logs;\n #define RTE_LOGTYPE_PIPELINE 0x00008000 /**< Log related to pipeline. */\n #define RTE_LOGTYPE_MBUF    0x00010000 /**< Log related to mbuf. */\n #define RTE_LOGTYPE_CRYPTODEV 0x00020000 /**< Log related to cryptodev. */\n+#define RTE_LOGTYPE_KDP     0x00080000 /**< Log related to KDP. */\n \n /* these log types can be used in an application */\n #define RTE_LOGTYPE_USER1   0x01000000 /**< User-defined log type 1. */\ndiff --git a/mk/rte.app.mk b/mk/rte.app.mk\nindex 8ecab41..eb18972 100644\n--- a/mk/rte.app.mk\n+++ b/mk/rte.app.mk\n@@ -1,6 +1,6 @@\n #   BSD LICENSE\n #\n-#   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.\n+#   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.\n #   Copyright(c) 2014-2015 6WIND S.A.\n #   All rights reserved.\n #\n@@ -154,6 +154,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lrte_pmd_pcap\n _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET)  += -lrte_pmd_af_packet\n _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL)       += -lrte_pmd_null\n _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)        += -lrte_pmd_qat\n+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_KDP)        += -lrte_pmd_kdp\n \n # AESNI MULTI BUFFER is dependent on the IPSec_MB library\n _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -lrte_pmd_aesni_mb\n",
    "prefixes": [
        "dpdk-dev",
        "2/2"
    ]
}