Show a patch.

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

{
    "id": 74685,
    "url": "https://patches.dpdk.org/api/patches/74685/",
    "web_url": "https://patches.dpdk.org/patch/74685/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20200723130854.322771-3-maxime.coquelin@redhat.com>",
    "date": "2020-07-23T13:08:54",
    "name": "[2/2] net/vhost: fix queue update",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "73b479515af9e74e0527cc81a3fb2111fa746865",
    "submitter": {
        "id": 512,
        "url": "https://patches.dpdk.org/api/people/512/",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "delegate": {
        "id": 2642,
        "url": "https://patches.dpdk.org/api/users/2642/",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/patch/74685/mbox/",
    "series": [
        {
            "id": 11255,
            "url": "https://patches.dpdk.org/api/series/11255/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11255",
            "date": "2020-07-23T13:08:53",
            "name": "Fix vhost performance regression",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/11255/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74685/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/74685/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Mailman-Version": "2.1.15",
        "X-Mimecast-Originator": "redhat.com",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com",
        "X-Mimecast-Spam-Score": "0",
        "X-MC-Unique": "8Q4VMI5WN8WEQ4mRIbFjNw-1",
        "Precedence": "list",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "MIME-Version": "1.0",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "References": "<20200723130854.322771-1-maxime.coquelin@redhat.com>",
        "Subject": "[dpdk-dev] [PATCH 2/2] net/vhost: fix queue update",
        "Content-Type": "text/plain; charset=US-ASCII",
        "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 A7C5EA0521;\n\tThu, 23 Jul 2020 15:10:04 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8D56A1C00E;\n\tThu, 23 Jul 2020 15:10:04 +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 3EC2D1BFBA\n for <dev@dpdk.org>; Thu, 23 Jul 2020 15:10:03 +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-7-8Q4VMI5WN8WEQ4mRIbFjNw-1; Thu, 23 Jul 2020 09:09:15 -0400",
            "from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com\n [10.5.11.12])\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 1D5E218C63C1;\n Thu, 23 Jul 2020 13:09:14 +0000 (UTC)",
            "from localhost.localdomain (unknown [10.36.110.21])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 1990561983;\n Thu, 23 Jul 2020 13:09:11 +0000 (UTC)"
        ],
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1595509802;\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=6NgCCbL+XQcL9wfhlyBK2y/w0LwSaXHW27otRr9R8ds=;\n b=g0hVlO1h8QT1XZk4r2mrqXoGbF3dOckmSx8Pe2zpWv3W5YsWo/EozCvvf9GoSxyNoU5ff4\n TV3opiAdGDxo3/Md7KBCZWwhR0f59hxJ2vRW6V0RhplDDplZ09lAb2yQId2kHqF23lZkld\n 81jKR+Sliy75cxplITZb/KG1/makgKM=",
        "Date": "Thu, 23 Jul 2020 15:08:54 +0200",
        "Content-Transfer-Encoding": "8bit",
        "To": "dev@dpdk.org, matan@mellanox.com, chenbo.xia@intel.com,\n yong.liu@intel.com,\n yinan.wang@intel.com",
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.12",
        "In-Reply-To": "<20200723130854.322771-1-maxime.coquelin@redhat.com>",
        "Cc": "thomas@monjalon.net, ferruh.yigit@intel.com, david.marchand@redhat.com,\n Maxime Coquelin <maxime.coquelin@redhat.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Message-Id": "<20200723130854.322771-3-maxime.coquelin@redhat.com>",
        "Return-Path": "<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>\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n drivers/net/vhost/rte_eth_vhost.c | 25 ++++++-------------------\n 1 file changed, 6 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c\nindex bbf79b2c0e..14b7b59f67 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,14 @@ 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\treturn ret;\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": [
        "2/2"
    ]
}