get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 39552,
    "url": "http://patches.dpdk.org/api/patches/39552/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180509094936.62796-1-zhiyong.yang@intel.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": "<20180509094936.62796-1-zhiyong.yang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180509094936.62796-1-zhiyong.yang@intel.com",
    "date": "2018-05-09T09:49:36",
    "name": "[dpdk-dev] net/virtio-user: fix multiple queues fail in server mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "54470ae19290be1eee86a3456ceba98f146c8c76",
    "submitter": {
        "id": 540,
        "url": "http://patches.dpdk.org/api/people/540/?format=api",
        "name": "Yang, Zhiyong",
        "email": "zhiyong.yang@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180509094936.62796-1-zhiyong.yang@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/39552/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/39552/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 0A0691B010;\n\tWed,  9 May 2018 11:49:40 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 9CC3A1B00B;\n\tWed,  9 May 2018 11:49:38 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t09 May 2018 02:49:37 -0700",
            "from dpdk9.bj.intel.com ([172.16.182.183])\n\tby FMSMGA003.fm.intel.com with ESMTP; 09 May 2018 02:49:35 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.49,381,1520924400\"; d=\"scan'208\";a=\"47872779\"",
        "From": "zhiyong.yang@intel.com",
        "To": "dev@dpdk.org",
        "Cc": "maxime.coquelin@redhat.com, lei.a.yao@intel.com, stable@dpdk.org,\n\tZhiyong Yang <zhiyong.yang@intel.com>",
        "Date": "Wed,  9 May 2018 17:49:36 +0800",
        "Message-Id": "<20180509094936.62796-1-zhiyong.yang@intel.com>",
        "X-Mailer": "git-send-email 2.14.3",
        "Subject": "[dpdk-dev] [PATCH] net/virtio-user: fix multiple queues fail in\n\tserver mode",
        "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://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": "<https://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 patch fixes multiple queues failure when virtio-user works in\nserver mode.\n\nFixes: bd8f50a45d0f (\"net/virtio-user: support server mode\")\nCc: stable@dpdk.org\nSigned-off-by: Zhiyong Yang <zhiyong.yang@intel.com>\n---\n drivers/net/virtio/virtio_user/vhost_user.c      | 3 +++\n drivers/net/virtio/virtio_user/virtio_user_dev.c | 9 +++++++++\n 2 files changed, 12 insertions(+)",
    "diff": "diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c\nindex a6df97a00..a9e53d7b5 100644\n--- a/drivers/net/virtio/virtio_user/vhost_user.c\n+++ b/drivers/net/virtio/virtio_user/vhost_user.c\n@@ -263,6 +263,9 @@ vhost_user_sock(struct virtio_user_dev *dev,\n \n \tPMD_DRV_LOG(INFO, \"%s\", vhost_msg_strings[req]);\n \n+\tif (vhostfd < 0)\n+\t\treturn -1;\n+\n \tmsg.request = req;\n \tmsg.flags = VHOST_USER_VERSION;\n \tmsg.size = 0;\ndiff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c\nindex 38b8bc90d..e988dc3f4 100644\n--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c\n+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c\n@@ -126,6 +126,10 @@ virtio_user_start_device(struct virtio_user_dev *dev)\n \tfeatures &= ~(1ull << VIRTIO_NET_F_MAC);\n \t/* Strip VIRTIO_NET_F_CTRL_VQ, as devices do not really need to know */\n \tfeatures &= ~(1ull << VIRTIO_NET_F_CTRL_VQ);\n+\t/* Also disable features which depend on VIRTIO_NET_F_CTRL_VQ */\n+\tfeatures &= ~(1ull << VIRTIO_NET_F_CTRL_RX);\n+\tfeatures &= ~(1ull << VIRTIO_NET_F_CTRL_VLAN);\n+\tfeatures &= ~(1ull << VIRTIO_NET_F_CTRL_MAC_ADDR);\n \tfeatures &= ~(1ull << VIRTIO_NET_F_STATUS);\n \tret = dev->ops->send_request(dev, VHOST_USER_SET_FEATURES, &features);\n \tif (ret < 0)\n@@ -488,6 +492,11 @@ virtio_user_handle_ctrl_msg(struct virtio_user_dev *dev, struct vring *vring,\n \t\tqueues = *(uint16_t *)(uintptr_t)vring->desc[idx_data].addr;\n \t\tstatus = virtio_user_handle_mq(dev, queues);\n \t}\n+\t/* Server mode can't enable queue pairs if vhostfd is not connected,\n+\t * we suppose that status always returns 0 in this case.\n+\t * /\n+\tif (dev->is_server && dev->vhostfd < 0)\n+\t\tstatus = 0;\n \n \t/* Update status */\n \t*(virtio_net_ctrl_ack *)(uintptr_t)vring->desc[idx_status].addr = status;\n",
    "prefixes": [
        "dpdk-dev"
    ]
}