get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 16943,
    "url": "https://patches.dpdk.org/api/patches/16943/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1478338865-26126-2-git-send-email-yuanhan.liu@linux.intel.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": "<1478338865-26126-2-git-send-email-yuanhan.liu@linux.intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1478338865-26126-2-git-send-email-yuanhan.liu@linux.intel.com",
    "date": "2016-11-05T09:40:56",
    "name": "[dpdk-dev,v2,01/10] net/virtio: revert fix restart",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "65cc54153e0d7dea6d5a5779e47c9e9853d3c69d",
    "submitter": {
        "id": 307,
        "url": "https://patches.dpdk.org/api/people/307/?format=api",
        "name": "Yuanhan Liu",
        "email": "yuanhan.liu@linux.intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1478338865-26126-2-git-send-email-yuanhan.liu@linux.intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/16943/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/16943/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 710681E29;\n\tSat,  5 Nov 2016 10:40:49 +0100 (CET)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 15CE4106A;\n\tSat,  5 Nov 2016 10:40:16 +0100 (CET)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby orsmga102.jf.intel.com with ESMTP; 05 Nov 2016 02:40:16 -0700",
            "from yliu-dev.sh.intel.com ([10.239.67.162])\n\tby fmsmga004.fm.intel.com with ESMTP; 05 Nov 2016 02:40:14 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.31,448,1473145200\"; d=\"scan'208\";a=\"187945063\"",
        "From": "Yuanhan Liu <yuanhan.liu@linux.intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Thomas Monjalon <thomas.monjalon@6wind.com>,\n\tTan Jianfeng <jianfeng.tan@intel.com>,\n\tKevin Traynor <ktraynor@redhat.com>, \n\tIlya Maximets <i.maximets@samsung.com>,\n\tKyle Larose <klarose@sandvine.com>, \n\tMaxime Coquelin <maxime.coquelin@redhat.com>,\n\tYuanhan Liu <yuanhan.liu@linux.intel.com>, <stable@dpdk.org>",
        "Date": "Sat,  5 Nov 2016 17:40:56 +0800",
        "Message-Id": "<1478338865-26126-2-git-send-email-yuanhan.liu@linux.intel.com>",
        "X-Mailer": "git-send-email 1.9.0",
        "In-Reply-To": "<1478338865-26126-1-git-send-email-yuanhan.liu@linux.intel.com>",
        "References": "<1478189400-14606-1-git-send-email-yuanhan.liu@linux.intel.com>\n\t<1478338865-26126-1-git-send-email-yuanhan.liu@linux.intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 01/10] net/virtio: revert fix restart",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://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": "<http://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 reverts commit 9a0615af7746 (\"virtio: fix restart\"); conflict is\nmanually addressed.\n\nKyle reported an issue with above commit\n\n    qemu-kvm: Guest moved used index from 5 to 1\n\nwith following steps,\n\n    1) Start my virtio interfaces\n    2) Send some traffic into/out of the interfaces\n    3) Stop the interfaces\n    4) Start the interfaces\n    5) Send some more traffic\n\nAnd here are some quotes from Kyle's analysis,\n\n    Prior to the patch, if an interface were stopped then started, without\n    restarting the application, the queues would be left as-is, because\n    hw->started would be set to 1. Now, calling stop sets hw->started to 0,\n    which means the next call to start will \"touch the queues\". This is the\n    unintended side-effect that causes the problem.\n\nWe should not touch the queues once the init is done, otherwise, the vring\nstate of virtio PMD driver and vhost-user would be inconsistent, leading\nsome issue like above.\n\nThus this patch is reverted.\n\nFixes: 9a0615af7746 (\"virtio: fix restart\")\n\nCc: Jianfeng Tan <jianfeng.tan@intel.com>\nCc: <stable@dpdk.org>\nReported-by: Kyle Larose <klarose@sandvine.com>\nSigned-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>\nReviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n drivers/net/virtio/virtio_ethdev.c | 15 ++++++---------\n 1 file changed, 6 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex b388134..5815875 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -550,9 +550,6 @@ virtio_dev_close(struct rte_eth_dev *dev)\n \n \tPMD_INIT_LOG(DEBUG, \"virtio_dev_close\");\n \n-\tif (hw->started == 1)\n-\t\tvirtio_dev_stop(dev);\n-\n \tif (hw->cvq)\n \t\tvirtio_dev_queue_release(hw->cvq->vq);\n \n@@ -560,6 +557,7 @@ virtio_dev_close(struct rte_eth_dev *dev)\n \tif (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)\n \t\tvtpci_irq_config(hw, VIRTIO_MSI_NO_VECTOR);\n \tvtpci_reset(hw);\n+\thw->started = 0;\n \tvirtio_dev_free_mbufs(dev);\n \tvirtio_free_queues(dev);\n }\n@@ -1296,15 +1294,17 @@ static int\n eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)\n {\n \tstruct rte_pci_device *pci_dev;\n+\tstruct virtio_hw *hw = eth_dev->data->dev_private;\n \n \tPMD_INIT_FUNC_TRACE();\n \n \tif (rte_eal_process_type() == RTE_PROC_SECONDARY)\n \t\treturn -EPERM;\n \n-\t/* Close it anyway since there's no way to know if closed */\n-\tvirtio_dev_close(eth_dev);\n-\n+\tif (hw->started == 1) {\n+\t\tvirtio_dev_stop(eth_dev);\n+\t\tvirtio_dev_close(eth_dev);\n+\t}\n \tpci_dev = eth_dev->pci_dev;\n \n \teth_dev->dev_ops = NULL;\n@@ -1543,12 +1543,9 @@ static void\n virtio_dev_stop(struct rte_eth_dev *dev)\n {\n \tstruct rte_eth_link link;\n-\tstruct virtio_hw *hw = dev->data->dev_private;\n \n \tPMD_INIT_LOG(DEBUG, \"stop\");\n \n-\thw->started = 0;\n-\n \tif (dev->data->dev_conf.intr_conf.lsc)\n \t\trte_intr_disable(&dev->pci_dev->intr_handle);\n \n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "01/10"
    ]
}