get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 71282,
    "url": "https://patches.dpdk.org/api/patches/71282/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1591890450-63055-1-git-send-email-matan@mellanox.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": "<1591890450-63055-1-git-send-email-matan@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1591890450-63055-1-git-send-email-matan@mellanox.com",
    "date": "2020-06-11T15:47:30",
    "name": "vhost: fix host notifier configuration error flow",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "eaffb59f4df9e95502cf6bf8988d81df4ab67818",
    "submitter": {
        "id": 796,
        "url": "https://patches.dpdk.org/api/people/796/?format=api",
        "name": "Matan Azrad",
        "email": "matan@mellanox.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/1591890450-63055-1-git-send-email-matan@mellanox.com/mbox/",
    "series": [
        {
            "id": 10416,
            "url": "https://patches.dpdk.org/api/series/10416/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10416",
            "date": "2020-06-11T15:47:30",
            "name": "vhost: fix host notifier configuration error flow",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/10416/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/71282/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/71282/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 2F6D3A00BE;\n\tThu, 11 Jun 2020 17:47:42 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 157411DB8;\n\tThu, 11 Jun 2020 17:47:41 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 890391D9E\n for <dev@dpdk.org>; Thu, 11 Jun 2020 17:47:39 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n matan@mellanox.com) with SMTP; 11 Jun 2020 18:47:34 +0300",
            "from pegasus25.mtr.labs.mlnx. (pegasus25.mtr.labs.mlnx\n [10.210.16.10])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 05BFlY1E008166;\n Thu, 11 Jun 2020 18:47:34 +0300"
        ],
        "From": "Matan Azrad <matan@mellanox.com>",
        "To": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Cc": "dev@dpdk.org, Xiao Wang <xiao.w.wang@intel.com>,\n Tiwei Bie <tiwei.bie@intel.com>, stable@dpdk.org",
        "Date": "Thu, 11 Jun 2020 15:47:30 +0000",
        "Message-Id": "<1591890450-63055-1-git-send-email-matan@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "Subject": "[dpdk-dev] [PATCH] vhost: fix host notifier configuration error flow",
        "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": "A vDPA driver can configure its device FD to be notified directly by\nthe guest memory mapping using `rte_vhost_host_notifier_ctrl` API.\n\nThe driver request is managed by the dpdk vhost management and is\nforwarded to the QEMU, the vhost massage includes reply request in order\nto be sure that the memory mapping was done correctly by the QEMU.\n\nWhen QEMU finishes the configuration, it marks that its replay is valid\nin the slave FD using VHOST_USER_REPLY_MASK flag.\nThe flag is set only in success and when the slave FD includes the reply\ndata.\n\nThe vhost library didn't validate the above flag before accessing to the\nslave FD, it leaded to the thread to be blocked on recvmsg call forever\nin case the QEMU has some problems in the notifier configuration.\n\nHandle VHOST_USER_REPLY_MASK flag to validate that slave FD includes\na reply data.\n\nFixes: d90cf7d111ac (\"vhost: support host notifier\")\nCc: stable@dpdk.org\n\nSigned-off-by: Matan Azrad <matan@mellanox.com>\n---\n lib/librte_vhost/vhost_user.c | 10 ++++++++--\n 1 file changed, 8 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c\nindex 84bebad..aa19d15 100644\n--- a/lib/librte_vhost/vhost_user.c\n+++ b/lib/librte_vhost/vhost_user.c\n@@ -2833,8 +2833,14 @@ static int process_slave_message_reply(struct virtio_net *dev,\n \tstruct VhostUserMsg msg_reply;\n \tint ret;\n \n-\tif ((msg->flags & VHOST_USER_NEED_REPLY) == 0)\n-\t\treturn 0;\n+\tif (!(msg->flags & VHOST_USER_REPLY_MASK)) {\n+\t\tif (msg->flags & VHOST_USER_NEED_REPLY) {\n+\t\t\tret = -1;\n+\t\t\tgoto out;\n+\t\t} else {\n+\t\t\treturn 0;\n+\t\t}\n+\t}\n \n \tret = read_vhost_message(dev->slave_req_fd, &msg_reply);\n \tif (ret <= 0) {\n",
    "prefixes": []
}