get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 74946,
    "url": "http://patches.dpdk.org/api/patches/74946/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200728165021.216291-3-maxime.coquelin@redhat.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": "<20200728165021.216291-3-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200728165021.216291-3-maxime.coquelin@redhat.com",
    "date": "2020-07-28T16:50:20",
    "name": "[v2,2/3] net/vhost: fix queue update",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "78306ab6025af454b86caf504a6e58e3de8188e0",
    "submitter": {
        "id": 512,
        "url": "http://patches.dpdk.org/api/people/512/?format=api",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.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/20200728165021.216291-3-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 11365,
            "url": "http://patches.dpdk.org/api/series/11365/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11365",
            "date": "2020-07-28T16:50:18",
            "name": "Fix Vhost regressions",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/11365/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/74946/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/74946/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 446E8A052B;\n\tTue, 28 Jul 2020 18:50:59 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 693141C030;\n\tTue, 28 Jul 2020 18:50:49 +0200 (CEST)",
            "from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com\n [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id EE3251C030\n for <dev@dpdk.org>; Tue, 28 Jul 2020 18:50:47 +0200 (CEST)",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-69-2cMrVdnuP1WtdXhsKkY3Bw-1; Tue, 28 Jul 2020 12:50:39 -0400",
            "from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com\n [10.5.11.14])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1B010100CCC0;\n Tue, 28 Jul 2020 16:50:38 +0000 (UTC)",
            "from localhost.localdomain (unknown [10.36.110.21])\n by smtp.corp.redhat.com (Postfix) with ESMTP id B97985D9E8;\n Tue, 28 Jul 2020 16:50:35 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1595955047;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=gZZ0WOAM8DDeyDltufIGA47mKm2DwF0kV0/Ksa5dzqM=;\n b=Pt2W1j5l8LQfU2bMF/j40l09FA3dwyLUU0/zPsYdcfyEeQBPfUCpBueHgVYJimwn32kDcj\n Lrm4ksYbCItA8W91d5UrzEbTXMa0sP0P3qfDufPsucLrDfVItJmSb9EHIwNZrwept3VlWp\n ikCrzHOUDJxJX8WQuARlur37OFZ2SPk=",
        "X-MC-Unique": "2cMrVdnuP1WtdXhsKkY3Bw-1",
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "To": "dev@dpdk.org, matan@mellanox.com, chenbo.xia@intel.com,\n yong.liu@intel.com,\n yinan.wang@intel.com",
        "Cc": "thomas@monjalon.net, ferruh.yigit@intel.com, david.marchand@redhat.com,\n Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Date": "Tue, 28 Jul 2020 18:50:20 +0200",
        "Message-Id": "<20200728165021.216291-3-maxime.coquelin@redhat.com>",
        "In-Reply-To": "<20200728165021.216291-1-maxime.coquelin@redhat.com>",
        "References": "<20200728165021.216291-1-maxime.coquelin@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.14",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Type": "text/plain; charset=US-ASCII",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 2/3] net/vhost: fix queue update",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Now that the vhost library saves the guest notifications\nenablement value in its virtqueues metadata, it is not\nnecessary to do it in the vring_state_changed callback.\n\nOne effect of the patch is also to prevent possible\ndeadlock happening in vhost library.\n\nFixes: 604052ae5395 (\"net/vhost: support queue update\")\n\nReported-by: Yinan Wang <yinan.wang@intel.com>\nTested-by: Yinan Wang <yinan.wang@intel.com>\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n drivers/net/vhost/rte_eth_vhost.c | 28 +++++++++-------------------\n 1 file changed, 9 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c\nindex bbf79b2c0e..951929c663 100644\n--- a/drivers/net/vhost/rte_eth_vhost.c\n+++ b/drivers/net/vhost/rte_eth_vhost.c\n@@ -94,7 +94,6 @@ struct vhost_queue {\n \tstruct rte_mempool *mb_pool;\n \tuint16_t port;\n \tuint16_t virtqueue_id;\n-\tbool intr_en;\n \tstruct vhost_stats stats;\n };\n \n@@ -547,8 +546,6 @@ eth_rxq_intr_enable(struct rte_eth_dev *dev, uint16_t qid)\n \trte_vhost_enable_guest_notification(vq->vid, (qid << 1) + 1, 1);\n \trte_wmb();\n \n-\tvq->intr_en = true;\n-\n \treturn ret;\n }\n \n@@ -574,8 +571,6 @@ eth_rxq_intr_disable(struct rte_eth_dev *dev, uint16_t qid)\n \trte_vhost_enable_guest_notification(vq->vid, (qid << 1) + 1, 0);\n \trte_wmb();\n \n-\tvq->intr_en = false;\n-\n \treturn 0;\n }\n \n@@ -841,7 +836,6 @@ vring_conf_update(int vid, struct rte_eth_dev *eth_dev, uint16_t vring_id)\n \tstruct rte_eth_conf *dev_conf = &eth_dev->data->dev_conf;\n \tstruct pmd_internal *internal = eth_dev->data->dev_private;\n \tstruct rte_vhost_vring vring;\n-\tstruct vhost_queue *vq;\n \tint rx_idx = vring_id % 2 ? (vring_id - 1) >> 1 : -1;\n \tint ret = 0;\n \n@@ -853,21 +847,17 @@ vring_conf_update(int vid, struct rte_eth_dev *eth_dev, uint16_t vring_id)\n \t    rte_atomic32_read(&internal->dev_attached) &&\n \t    rte_atomic32_read(&internal->started) &&\n \t    dev_conf->intr_conf.rxq) {\n-\t\tvq = eth_dev->data->rx_queues[rx_idx];\n \t\tret = rte_vhost_get_vhost_vring(vid, vring_id, &vring);\n-\t\tif (!ret) {\n-\t\t\tif (vring.kickfd !=\n-\t\t\t    eth_dev->intr_handle->efds[rx_idx]) {\n-\t\t\t\tVHOST_LOG(INFO,\n-\t\t\t\t\t  \"kickfd for rxq-%d was changed.\\n\",\n-\t\t\t\t\t  rx_idx);\n-\t\t\t\teth_dev->intr_handle->efds[rx_idx] =\n-\t\t\t\t\t\t\t\t   vring.kickfd;\n-\t\t\t}\n+\t\tif (ret) {\n+\t\t\tVHOST_LOG(ERR, \"Failed to get vring %d information.\\n\",\n+\t\t\t\t\tvring_id);\n+\t\t\treturn ret;\n+\t\t}\n \n-\t\t\trte_vhost_enable_guest_notification(vid, vring_id,\n-\t\t\t\t\t\t\t    vq->intr_en);\n-\t\t\trte_wmb();\n+\t\tif (vring.kickfd != eth_dev->intr_handle->efds[rx_idx]) {\n+\t\t\tVHOST_LOG(INFO, \"kickfd for rxq-%d was changed.\\n\",\n+\t\t\t\t\t  rx_idx);\n+\t\t\teth_dev->intr_handle->efds[rx_idx] = vring.kickfd;\n \t\t}\n \t}\n \n",
    "prefixes": [
        "v2",
        "2/3"
    ]
}