get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2504,
    "url": "https://patches.dpdk.org/api/patches/2504/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1422242440-28948-4-git-send-email-huawei.xie@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": "<1422242440-28948-4-git-send-email-huawei.xie@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1422242440-28948-4-git-send-email-huawei.xie@intel.com",
    "date": "2015-01-26T03:20:29",
    "name": "[dpdk-dev,RFC,v2,03/14] rename vhost-net-cdev.h to vhost-net.h",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b4740f062f14a7014aedb4d4ef1527cddd2a611a",
    "submitter": {
        "id": 16,
        "url": "https://patches.dpdk.org/api/people/16/?format=api",
        "name": "Huawei Xie",
        "email": "huawei.xie@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1422242440-28948-4-git-send-email-huawei.xie@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2504/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2504/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 E38095A97;\n\tMon, 26 Jan 2015 04:21:26 +0100 (CET)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 239B85A9C\n\tfor <dev@dpdk.org>; Mon, 26 Jan 2015 04:21:07 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga103.fm.intel.com with ESMTP; 25 Jan 2015 19:14:58 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 25 Jan 2015 19:20:57 -0800",
            "from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com\n\t[10.239.29.90])\n\tby shvmail01.sh.intel.com with ESMTP id t0Q3KuT0013353;\n\tMon, 26 Jan 2015 11:20:56 +0800",
            "from shecgisg003.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t0Q3KsJ7029004; Mon, 26 Jan 2015 11:20:56 +0800",
            "(from hxie5@localhost)\n\tby shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t0Q3KrGM029000; \n\tMon, 26 Jan 2015 11:20:53 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.09,466,1418112000\"; d=\"scan'208\";a=\"656346795\"",
        "From": "Huawei Xie <huawei.xie@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon, 26 Jan 2015 11:20:29 +0800",
        "Message-Id": "<1422242440-28948-4-git-send-email-huawei.xie@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1422242440-28948-1-git-send-email-huawei.xie@intel.com>",
        "References": "<1422242440-28948-1-git-send-email-huawei.xie@intel.com>",
        "Subject": "[dpdk-dev] [RFC PATCH v2 03/14] rename vhost-net-cdev.h to\n\tvhost-net.h",
        "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 file defines the common operation provided by virtio-net(.c).\n\nSigned-off-by: Huawei Xie <huawei.xie@intel.com>\n---\n lib/librte_vhost/vhost-net-cdev.h            | 113 ---------------------------\n lib/librte_vhost/vhost-net.h                 | 113 +++++++++++++++++++++++++++\n lib/librte_vhost/vhost_cuse/vhost-net-cdev.c |   2 +-\n lib/librte_vhost/vhost_rxtx.c                |   2 +-\n lib/librte_vhost/virtio-net.c                |   2 +-\n 5 files changed, 116 insertions(+), 116 deletions(-)\n delete mode 100644 lib/librte_vhost/vhost-net-cdev.h\n create mode 100644 lib/librte_vhost/vhost-net.h",
    "diff": "diff --git a/lib/librte_vhost/vhost-net-cdev.h b/lib/librte_vhost/vhost-net-cdev.h\ndeleted file mode 100644\nindex 03a5c57..0000000\n--- a/lib/librte_vhost/vhost-net-cdev.h\n+++ /dev/null\n@@ -1,113 +0,0 @@\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 _VHOST_NET_CDEV_H_\n-#define _VHOST_NET_CDEV_H_\n-#include <stdint.h>\n-#include <stdio.h>\n-#include <sys/types.h>\n-#include <unistd.h>\n-#include <linux/vhost.h>\n-\n-#include <rte_log.h>\n-\n-/* Macros for printing using RTE_LOG */\n-#define RTE_LOGTYPE_VHOST_CONFIG RTE_LOGTYPE_USER1\n-#define RTE_LOGTYPE_VHOST_DATA   RTE_LOGTYPE_USER1\n-\n-#ifdef RTE_LIBRTE_VHOST_DEBUG\n-#define VHOST_MAX_PRINT_BUFF 6072\n-#define LOG_LEVEL RTE_LOG_DEBUG\n-#define LOG_DEBUG(log_type, fmt, args...) RTE_LOG(DEBUG, log_type, fmt, ##args)\n-#define PRINT_PACKET(device, addr, size, header) do { \\\n-\tchar *pkt_addr = (char *)(addr); \\\n-\tunsigned int index; \\\n-\tchar packet[VHOST_MAX_PRINT_BUFF]; \\\n-\t\\\n-\tif ((header)) \\\n-\t\tsnprintf(packet, VHOST_MAX_PRINT_BUFF, \"(%\"PRIu64\") Header size %d: \", (device->device_fh), (size)); \\\n-\telse \\\n-\t\tsnprintf(packet, VHOST_MAX_PRINT_BUFF, \"(%\"PRIu64\") Packet size %d: \", (device->device_fh), (size)); \\\n-\tfor (index = 0; index < (size); index++) { \\\n-\t\tsnprintf(packet + strnlen(packet, VHOST_MAX_PRINT_BUFF), VHOST_MAX_PRINT_BUFF - strnlen(packet, VHOST_MAX_PRINT_BUFF), \\\n-\t\t\t\"%02hhx \", pkt_addr[index]); \\\n-\t} \\\n-\tsnprintf(packet + strnlen(packet, VHOST_MAX_PRINT_BUFF), VHOST_MAX_PRINT_BUFF - strnlen(packet, VHOST_MAX_PRINT_BUFF), \"\\n\"); \\\n-\t\\\n-\tLOG_DEBUG(VHOST_DATA, \"%s\", packet); \\\n-} while (0)\n-#else\n-#define LOG_LEVEL RTE_LOG_INFO\n-#define LOG_DEBUG(log_type, fmt, args...) do {} while (0)\n-#define PRINT_PACKET(device, addr, size, header) do {} while (0)\n-#endif\n-\n-\n-/*\n- * Structure used to identify device context.\n- */\n-struct vhost_device_ctx {\n-\tpid_t\t\tpid;\t/* PID of process calling the IOCTL. */\n-\tuint64_t\tfh;\t/* Populated with fi->fh to track the device index. */\n-};\n-\n-/*\n- * Structure contains function pointers to be defined in virtio-net.c. These\n- * functions are called in CUSE context and are used to configure devices.\n- */\n-struct vhost_net_device_ops {\n-\tint (*new_device)(struct vhost_device_ctx);\n-\tvoid (*destroy_device)(struct vhost_device_ctx);\n-\n-\tint (*get_features)(struct vhost_device_ctx, uint64_t *);\n-\tint (*set_features)(struct vhost_device_ctx, uint64_t *);\n-\n-\tint (*set_mem_table)(struct vhost_device_ctx, const void *, uint32_t);\n-\n-\tint (*set_vring_num)(struct vhost_device_ctx, struct vhost_vring_state *);\n-\tint (*set_vring_addr)(struct vhost_device_ctx, struct vhost_vring_addr *);\n-\tint (*set_vring_base)(struct vhost_device_ctx, struct vhost_vring_state *);\n-\tint (*get_vring_base)(struct vhost_device_ctx, uint32_t, struct vhost_vring_state *);\n-\n-\tint (*set_vring_kick)(struct vhost_device_ctx, struct vhost_vring_file *);\n-\tint (*set_vring_call)(struct vhost_device_ctx, struct vhost_vring_file *);\n-\n-\tint (*set_backend)(struct vhost_device_ctx, struct vhost_vring_file *);\n-\n-\tint (*set_owner)(struct vhost_device_ctx);\n-\tint (*reset_owner)(struct vhost_device_ctx);\n-};\n-\n-\n-struct vhost_net_device_ops const *get_virtio_net_callbacks(void);\n-#endif /* _VHOST_NET_CDEV_H_ */\ndiff --git a/lib/librte_vhost/vhost-net.h b/lib/librte_vhost/vhost-net.h\nnew file mode 100644\nindex 0000000..03a5c57\n--- /dev/null\n+++ b/lib/librte_vhost/vhost-net.h\n@@ -0,0 +1,113 @@\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 _VHOST_NET_CDEV_H_\n+#define _VHOST_NET_CDEV_H_\n+#include <stdint.h>\n+#include <stdio.h>\n+#include <sys/types.h>\n+#include <unistd.h>\n+#include <linux/vhost.h>\n+\n+#include <rte_log.h>\n+\n+/* Macros for printing using RTE_LOG */\n+#define RTE_LOGTYPE_VHOST_CONFIG RTE_LOGTYPE_USER1\n+#define RTE_LOGTYPE_VHOST_DATA   RTE_LOGTYPE_USER1\n+\n+#ifdef RTE_LIBRTE_VHOST_DEBUG\n+#define VHOST_MAX_PRINT_BUFF 6072\n+#define LOG_LEVEL RTE_LOG_DEBUG\n+#define LOG_DEBUG(log_type, fmt, args...) RTE_LOG(DEBUG, log_type, fmt, ##args)\n+#define PRINT_PACKET(device, addr, size, header) do { \\\n+\tchar *pkt_addr = (char *)(addr); \\\n+\tunsigned int index; \\\n+\tchar packet[VHOST_MAX_PRINT_BUFF]; \\\n+\t\\\n+\tif ((header)) \\\n+\t\tsnprintf(packet, VHOST_MAX_PRINT_BUFF, \"(%\"PRIu64\") Header size %d: \", (device->device_fh), (size)); \\\n+\telse \\\n+\t\tsnprintf(packet, VHOST_MAX_PRINT_BUFF, \"(%\"PRIu64\") Packet size %d: \", (device->device_fh), (size)); \\\n+\tfor (index = 0; index < (size); index++) { \\\n+\t\tsnprintf(packet + strnlen(packet, VHOST_MAX_PRINT_BUFF), VHOST_MAX_PRINT_BUFF - strnlen(packet, VHOST_MAX_PRINT_BUFF), \\\n+\t\t\t\"%02hhx \", pkt_addr[index]); \\\n+\t} \\\n+\tsnprintf(packet + strnlen(packet, VHOST_MAX_PRINT_BUFF), VHOST_MAX_PRINT_BUFF - strnlen(packet, VHOST_MAX_PRINT_BUFF), \"\\n\"); \\\n+\t\\\n+\tLOG_DEBUG(VHOST_DATA, \"%s\", packet); \\\n+} while (0)\n+#else\n+#define LOG_LEVEL RTE_LOG_INFO\n+#define LOG_DEBUG(log_type, fmt, args...) do {} while (0)\n+#define PRINT_PACKET(device, addr, size, header) do {} while (0)\n+#endif\n+\n+\n+/*\n+ * Structure used to identify device context.\n+ */\n+struct vhost_device_ctx {\n+\tpid_t\t\tpid;\t/* PID of process calling the IOCTL. */\n+\tuint64_t\tfh;\t/* Populated with fi->fh to track the device index. */\n+};\n+\n+/*\n+ * Structure contains function pointers to be defined in virtio-net.c. These\n+ * functions are called in CUSE context and are used to configure devices.\n+ */\n+struct vhost_net_device_ops {\n+\tint (*new_device)(struct vhost_device_ctx);\n+\tvoid (*destroy_device)(struct vhost_device_ctx);\n+\n+\tint (*get_features)(struct vhost_device_ctx, uint64_t *);\n+\tint (*set_features)(struct vhost_device_ctx, uint64_t *);\n+\n+\tint (*set_mem_table)(struct vhost_device_ctx, const void *, uint32_t);\n+\n+\tint (*set_vring_num)(struct vhost_device_ctx, struct vhost_vring_state *);\n+\tint (*set_vring_addr)(struct vhost_device_ctx, struct vhost_vring_addr *);\n+\tint (*set_vring_base)(struct vhost_device_ctx, struct vhost_vring_state *);\n+\tint (*get_vring_base)(struct vhost_device_ctx, uint32_t, struct vhost_vring_state *);\n+\n+\tint (*set_vring_kick)(struct vhost_device_ctx, struct vhost_vring_file *);\n+\tint (*set_vring_call)(struct vhost_device_ctx, struct vhost_vring_file *);\n+\n+\tint (*set_backend)(struct vhost_device_ctx, struct vhost_vring_file *);\n+\n+\tint (*set_owner)(struct vhost_device_ctx);\n+\tint (*reset_owner)(struct vhost_device_ctx);\n+};\n+\n+\n+struct vhost_net_device_ops const *get_virtio_net_callbacks(void);\n+#endif /* _VHOST_NET_CDEV_H_ */\ndiff --git a/lib/librte_vhost/vhost_cuse/vhost-net-cdev.c b/lib/librte_vhost/vhost_cuse/vhost-net-cdev.c\nindex 57c76cb..2bb07af 100644\n--- a/lib/librte_vhost/vhost_cuse/vhost-net-cdev.c\n+++ b/lib/librte_vhost/vhost_cuse/vhost-net-cdev.c\n@@ -44,7 +44,7 @@\n #include <rte_string_fns.h>\n #include <rte_virtio_net.h>\n \n-#include \"vhost-net-cdev.h\"\n+#include \"vhost-net.h\"\n \n #define FUSE_OPT_DUMMY \"\\0\\0\"\n #define FUSE_OPT_FORE  \"-f\\0\\0\"\ndiff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c\nindex ccfd82f..c7c9550 100644\n--- a/lib/librte_vhost/vhost_rxtx.c\n+++ b/lib/librte_vhost/vhost_rxtx.c\n@@ -38,7 +38,7 @@\n #include <rte_memcpy.h>\n #include <rte_virtio_net.h>\n \n-#include \"vhost-net-cdev.h\"\n+#include \"vhost-net.h\"\n \n #define MAX_PKT_BURST 32\n \ndiff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c\nindex 52b4957..6bc9d51 100644\n--- a/lib/librte_vhost/virtio-net.c\n+++ b/lib/librte_vhost/virtio-net.c\n@@ -53,7 +53,7 @@\n #include <rte_memory.h>\n #include <rte_virtio_net.h>\n \n-#include \"vhost-net-cdev.h\"\n+#include \"vhost-net.h\"\n #include \"eventfd_link/eventfd_link.h\"\n \n /*\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "v2",
        "03/14"
    ]
}