get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43341,
    "url": "http://patchwork.dpdk.org/api/patches/43341/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1532506902-98105-1-git-send-email-jiayu.hu@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1532506902-98105-1-git-send-email-jiayu.hu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1532506902-98105-1-git-send-email-jiayu.hu@intel.com",
    "date": "2018-07-25T08:21:42",
    "name": "vhost: fix return value",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "5b3ff3e29be5b150c563bae27d6b69dbe353f866",
    "submitter": {
        "id": 539,
        "url": "http://patchwork.dpdk.org/api/people/539/?format=api",
        "name": "Hu, Jiayu",
        "email": "jiayu.hu@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1532506902-98105-1-git-send-email-jiayu.hu@intel.com/mbox/",
    "series": [
        {
            "id": 757,
            "url": "http://patchwork.dpdk.org/api/series/757/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=757",
            "date": "2018-07-25T08:21:42",
            "name": "vhost: fix return value",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/757/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/43341/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/43341/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 3C785F72;\n\tWed, 25 Jul 2018 10:13:15 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id C981223D\n\tfor <dev@dpdk.org>; Wed, 25 Jul 2018 10:13:12 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Jul 2018 01:13:10 -0700",
            "from dpdk15.sh.intel.com ([10.67.111.146])\n\tby fmsmga005.fm.intel.com with ESMTP; 25 Jul 2018 01:13:08 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,400,1526367600\"; d=\"scan'208\";a=\"248173031\"",
        "From": "Jiayu Hu <jiayu.hu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "tiwei.bie@intel.com, zhihong.wang@intel.com, maxime.coquelin@redhat.com, \n\tlei.a.yao@intel.com, Jiayu Hu <jiayu.hu@intel.com>",
        "Date": "Wed, 25 Jul 2018 16:21:42 +0800",
        "Message-Id": "<1532506902-98105-1-git-send-email-jiayu.hu@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "Subject": "[dpdk-dev] [PATCH] vhost: fix return value",
        "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://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/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 fixes the incorrect return value for rte_vhost_dequeue_burst()\nwhen virtqueue is not enabled or virtqueue address translation fails.\n\nFixes: 62250c1d0978 (\"vhost: extract split ring handling from Rx and Tx functions\")\n\nSigned-off-by: Jiayu Hu <jiayu.hu@intel.com>\n---\n lib/librte_vhost/virtio_net.c | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex 2b7ffcf..5d4b975 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -1592,15 +1592,19 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,\n \tif (unlikely(rte_spinlock_trylock(&vq->access_lock) == 0))\n \t\treturn 0;\n \n-\tif (unlikely(vq->enabled == 0))\n+\tif (unlikely(vq->enabled == 0)) {\n+\t\tcount = 0;\n \t\tgoto out_access_unlock;\n+\t}\n \n \tif (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))\n \t\tvhost_user_iotlb_rd_lock(vq);\n \n \tif (unlikely(vq->access_ok == 0))\n-\t\tif (unlikely(vring_translate(dev, vq) < 0))\n+\t\tif (unlikely(vring_translate(dev, vq) < 0)) {\n+\t\t\tcount = 0;\n \t\t\tgoto out;\n+\t\t}\n \n \t/*\n \t * Construct a RARP broadcast packet, and inject it to the \"pkts\"\n",
    "prefixes": []
}