get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 50536,
    "url": "https://patches.dpdk.org/api/patches/50536/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190227085428.13666-1-maxime.coquelin@redhat.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": "<20190227085428.13666-1-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190227085428.13666-1-maxime.coquelin@redhat.com",
    "date": "2019-02-27T08:54:28",
    "name": "vhost: prevent disabled rings to be processed with zero-copy",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e0bc6561ce6c36551653bd539f9a4fe75b862ccc",
    "submitter": {
        "id": 512,
        "url": "https://patches.dpdk.org/api/people/512/?format=api",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "delegate": {
        "id": 2642,
        "url": "https://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190227085428.13666-1-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 3556,
            "url": "https://patches.dpdk.org/api/series/3556/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=3556",
            "date": "2019-02-27T08:54:28",
            "name": "vhost: prevent disabled rings to be processed with zero-copy",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/3556/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/50536/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/50536/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 30527374E;\n\tWed, 27 Feb 2019 09:54:35 +0100 (CET)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id 8F0053256;\n\tWed, 27 Feb 2019 09:54:34 +0100 (CET)",
            "from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id DCA168762E;\n\tWed, 27 Feb 2019 08:54:33 +0000 (UTC)",
            "from localhost.localdomain (ovpn-112-64.ams2.redhat.com\n\t[10.36.112.64])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 88E495DE62;\n\tWed, 27 Feb 2019 08:54:30 +0000 (UTC)"
        ],
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "To": "tiwei.bie@intel.com,\n\tdev@dpdk.org",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>,\n\tstable@dpdk.org",
        "Date": "Wed, 27 Feb 2019 09:54:28 +0100",
        "Message-Id": "<20190227085428.13666-1-maxime.coquelin@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.14",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.26]); Wed, 27 Feb 2019 08:54:33 +0000 (UTC)",
        "Subject": "[dpdk-dev] [PATCH] vhost: prevent disabled rings to be processed\n\twith zero-copy",
        "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": "The vhost-user spec says that once the vring is disabled, the\nclient has to stop processing it. But it can happen when\ndequeue zero-copy is enabled if outstanding descriptors buffers\nare still being processed by an extranl NIC or another guest.\n\nThe fix consists in draining the zmbufs list to ensure no more\ndescriptors buffers are in the wild.\n\nNote that this fix is only working in the case REPLY_ACK\nprotocol feature is enabled, which is not the case by default\nfor now (it is only enabled when IOMMU feature is enabled in\nthe vhost library).\n\nFixes: b0a985d1f340 (\"vhost: add dequeue zero copy\")\nCc: stable@dpdk.org\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/librte_vhost/vhost_user.c | 4 ++++\n 1 file changed, 4 insertions(+)",
    "diff": "diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c\nindex 36c0c676d..ef947b90c 100644\n--- a/lib/librte_vhost/vhost_user.c\n+++ b/lib/librte_vhost/vhost_user.c\n@@ -1336,6 +1336,10 @@ vhost_user_set_vring_enable(struct virtio_net **pdev,\n \t\t\"set queue enable: %d to qp idx: %d\\n\",\n \t\tenable, index);\n \n+\t/* On disable, rings have to be stopped being processed. */\n+\tif (!enable && dev->dequeue_zero_copy)\n+\t\tdrain_zmbuf_list(dev->virtqueue[index]);\n+\n \tdid = dev->vdpa_dev_id;\n \tvdpa_dev = rte_vdpa_get_device(did);\n \tif (vdpa_dev && vdpa_dev->ops->set_vring_state)\n",
    "prefixes": []
}