get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 35634,
    "url": "http://patches.dpdk.org/api/patches/35634/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180213092106.57996-2-zhihong.wang@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": "<20180213092106.57996-2-zhihong.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180213092106.57996-2-zhihong.wang@intel.com",
    "date": "2018-02-13T09:21:01",
    "name": "[dpdk-dev,v2,1/6] vhost: export vhost feature definitions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5b00445b047d49ad29845b5acdbc9c8902ac38b6",
    "submitter": {
        "id": 156,
        "url": "http://patches.dpdk.org/api/people/156/?format=api",
        "name": "Zhihong Wang",
        "email": "zhihong.wang@intel.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180213092106.57996-2-zhihong.wang@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/35634/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/35634/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 19DF25F25;\n\tMon,  5 Mar 2018 10:20:24 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 25B994CBB\n\tfor <dev@dpdk.org>; Mon,  5 Mar 2018 10:20:22 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Mar 2018 01:20:21 -0800",
            "from unknown (HELO dpdk99.sh.intel.com) ([10.67.110.156])\n\tby fmsmga001.fm.intel.com with ESMTP; 05 Mar 2018 01:20:20 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.47,426,1515484800\"; d=\"scan'208\";a=\"35531729\"",
        "From": "Zhihong Wang <zhihong.wang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "jianfeng.tan@intel.com, tiwei.bie@intel.com, maxime.coquelin@redhat.com, \n\tyliu@fridaylinux.org, cunming.liang@intel.com, xiao.w.wang@intel.com,\n\tdan.daly@intel.com, Zhihong Wang <zhihong.wang@intel.com>",
        "Date": "Tue, 13 Feb 2018 17:21:01 +0800",
        "Message-Id": "<20180213092106.57996-2-zhihong.wang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20180213092106.57996-1-zhihong.wang@intel.com>",
        "References": "<1517614137-62926-1-git-send-email-zhihong.wang@intel.com>\n\t<20180213092106.57996-1-zhihong.wang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 1/6] vhost: export vhost feature definitions",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://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": "<https://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 exports vhost-user protocol features to support device driver\ndevelopment.\n\nSigned-off-by: Zhihong Wang <zhihong.wang@intel.com>\n---\n lib/librte_vhost/rte_vhost.h  |  8 ++++++++\n lib/librte_vhost/vhost.h      |  4 +---\n lib/librte_vhost/vhost_user.c |  9 +++++----\n lib/librte_vhost/vhost_user.h | 20 +++++++-------------\n 4 files changed, 21 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h\nindex d33206997..b05162366 100644\n--- a/lib/librte_vhost/rte_vhost.h\n+++ b/lib/librte_vhost/rte_vhost.h\n@@ -29,6 +29,14 @@ extern \"C\" {\n #define RTE_VHOST_USER_DEQUEUE_ZERO_COPY\t(1ULL << 2)\n #define RTE_VHOST_USER_IOMMU_SUPPORT\t(1ULL << 3)\n \n+#define RTE_VHOST_USER_PROTOCOL_F_MQ\t\t0\n+#define RTE_VHOST_USER_PROTOCOL_F_LOG_SHMFD\t1\n+#define RTE_VHOST_USER_PROTOCOL_F_RARP\t\t2\n+#define RTE_VHOST_USER_PROTOCOL_F_REPLY_ACK\t3\n+#define RTE_VHOST_USER_PROTOCOL_F_NET_MTU\t4\n+#define RTE_VHOST_USER_PROTOCOL_F_SLAVE_REQ\t5\n+#define RTE_VHOST_USER_F_PROTOCOL_FEATURES\t30\n+\n /**\n  * Information relating to memory regions including offsets to\n  * addresses in QEMUs memory file.\ndiff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h\nindex 58aec2e0d..a0b0520e2 100644\n--- a/lib/librte_vhost/vhost.h\n+++ b/lib/librte_vhost/vhost.h\n@@ -174,8 +174,6 @@ struct vhost_msg {\n  #define VIRTIO_F_VERSION_1 32\n #endif\n \n-#define VHOST_USER_F_PROTOCOL_FEATURES\t30\n-\n /* Features supported by this builtin vhost-user net driver. */\n #define VIRTIO_NET_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \\\n \t\t\t\t(1ULL << VIRTIO_F_ANY_LAYOUT) | \\\n@@ -185,7 +183,7 @@ struct vhost_msg {\n \t\t\t\t(1ULL << VIRTIO_NET_F_MQ)      | \\\n \t\t\t\t(1ULL << VIRTIO_F_VERSION_1)   | \\\n \t\t\t\t(1ULL << VHOST_F_LOG_ALL)      | \\\n-\t\t\t\t(1ULL << VHOST_USER_F_PROTOCOL_FEATURES) | \\\n+\t\t\t\t(1ULL << RTE_VHOST_USER_F_PROTOCOL_FEATURES) | \\\n \t\t\t\t(1ULL << VIRTIO_NET_F_GSO) | \\\n \t\t\t\t(1ULL << VIRTIO_NET_F_HOST_TSO4) | \\\n \t\t\t\t(1ULL << VIRTIO_NET_F_HOST_TSO6) | \\\ndiff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c\nindex 5c5361066..c93e48e4d 100644\n--- a/lib/librte_vhost/vhost_user.c\n+++ b/lib/librte_vhost/vhost_user.c\n@@ -527,7 +527,7 @@ vhost_user_set_vring_addr(struct virtio_net **pdev, VhostUserMsg *msg)\n \tvring_invalidate(dev, vq);\n \n \tif (vq->enabled && (dev->features &\n-\t\t\t\t(1ULL << VHOST_USER_F_PROTOCOL_FEATURES))) {\n+\t\t\t\t(1ULL << RTE_VHOST_USER_F_PROTOCOL_FEATURES))) {\n \t\tdev = translate_ring_addresses(dev, msg->payload.addr.index);\n \t\tif (!dev)\n \t\t\treturn -1;\n@@ -897,11 +897,11 @@ vhost_user_set_vring_kick(struct virtio_net **pdev, struct VhostUserMsg *pmsg)\n \tvq = dev->virtqueue[file.index];\n \n \t/*\n-\t * When VHOST_USER_F_PROTOCOL_FEATURES is not negotiated,\n+\t * When RTE_VHOST_USER_F_PROTOCOL_FEATURES is not negotiated,\n \t * the ring starts already enabled. Otherwise, it is enabled via\n \t * the SET_VRING_ENABLE message.\n \t */\n-\tif (!(dev->features & (1ULL << VHOST_USER_F_PROTOCOL_FEATURES)))\n+\tif (!(dev->features & (1ULL << RTE_VHOST_USER_F_PROTOCOL_FEATURES)))\n \t\tvq->enabled = 1;\n \n \tif (vq->kickfd >= 0)\n@@ -1012,7 +1012,8 @@ vhost_user_get_protocol_features(struct virtio_net *dev,\n \t * Qemu versions (from v2.7.0 to v2.9.0).\n \t */\n \tif (!(features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)))\n-\t\tprotocol_features &= ~(1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK);\n+\t\tprotocol_features &=\n+\t\t\t~(1ULL << RTE_VHOST_USER_PROTOCOL_F_REPLY_ACK);\n \n \tmsg->payload.u64 = protocol_features;\n \tmsg->size = sizeof(msg->payload.u64);\ndiff --git a/lib/librte_vhost/vhost_user.h b/lib/librte_vhost/vhost_user.h\nindex 0fafbe6e0..066e772dd 100644\n--- a/lib/librte_vhost/vhost_user.h\n+++ b/lib/librte_vhost/vhost_user.h\n@@ -14,19 +14,13 @@\n \n #define VHOST_MEMORY_MAX_NREGIONS 8\n \n-#define VHOST_USER_PROTOCOL_F_MQ\t0\n-#define VHOST_USER_PROTOCOL_F_LOG_SHMFD\t1\n-#define VHOST_USER_PROTOCOL_F_RARP\t2\n-#define VHOST_USER_PROTOCOL_F_REPLY_ACK\t3\n-#define VHOST_USER_PROTOCOL_F_NET_MTU 4\n-#define VHOST_USER_PROTOCOL_F_SLAVE_REQ 5\n-\n-#define VHOST_USER_PROTOCOL_FEATURES\t((1ULL << VHOST_USER_PROTOCOL_F_MQ) | \\\n-\t\t\t\t\t (1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD) |\\\n-\t\t\t\t\t (1ULL << VHOST_USER_PROTOCOL_F_RARP) | \\\n-\t\t\t\t\t (1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK) | \\\n-\t\t\t\t\t (1ULL << VHOST_USER_PROTOCOL_F_NET_MTU) | \\\n-\t\t\t\t\t (1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ))\n+#define VHOST_USER_PROTOCOL_FEATURES \\\n+\t\t\t((1ULL << RTE_VHOST_USER_PROTOCOL_F_MQ) | \\\n+\t\t\t (1ULL << RTE_VHOST_USER_PROTOCOL_F_LOG_SHMFD) |\\\n+\t\t\t (1ULL << RTE_VHOST_USER_PROTOCOL_F_RARP) | \\\n+\t\t\t (1ULL << RTE_VHOST_USER_PROTOCOL_F_REPLY_ACK) | \\\n+\t\t\t (1ULL << RTE_VHOST_USER_PROTOCOL_F_NET_MTU) | \\\n+\t\t\t (1ULL << RTE_VHOST_USER_PROTOCOL_F_SLAVE_REQ))\n \n typedef enum VhostUserRequest {\n \tVHOST_USER_NONE = 0,\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "1/6"
    ]
}