get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 114063,
    "url": "http://patches.dpdk.org/api/patches/114063/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220719072650.118176-1-kangjie.xu@linux.alibaba.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": "<20220719072650.118176-1-kangjie.xu@linux.alibaba.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220719072650.118176-1-kangjie.xu@linux.alibaba.com",
    "date": "2022-07-19T07:26:50",
    "name": "[1/1] vhost: support VIRTIO_F_RING_RESET for vhost-user",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6c4721d2521daa22651e18e08ef6899d1945fe10",
    "submitter": {
        "id": 2778,
        "url": "http://patches.dpdk.org/api/people/2778/?format=api",
        "name": "Kangjie Xu",
        "email": "kangjie.xu@linux.alibaba.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/20220719072650.118176-1-kangjie.xu@linux.alibaba.com/mbox/",
    "series": [
        {
            "id": 24036,
            "url": "http://patches.dpdk.org/api/series/24036/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24036",
            "date": "2022-07-19T07:26:50",
            "name": "[1/1] vhost: support VIRTIO_F_RING_RESET for vhost-user",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/24036/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/114063/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/114063/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 79141A0032;\n\tWed, 20 Jul 2022 08:44:15 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 11DFD40697;\n\tWed, 20 Jul 2022 08:44:15 +0200 (CEST)",
            "from out30-42.freemail.mail.aliyun.com\n (out30-42.freemail.mail.aliyun.com [115.124.30.42])\n by mails.dpdk.org (Postfix) with ESMTP id F2680400D4\n for <dev@dpdk.org>; Tue, 19 Jul 2022 09:26:53 +0200 (CEST)",
            "from localhost(mailfrom:kangjie.xu@linux.alibaba.com\n fp:SMTPD_---0VJqptNX_1658215610) by smtp.aliyun-inc.com;\n Tue, 19 Jul 2022 15:26:51 +0800"
        ],
        "X-Alimail-AntiSpam": "AC=PASS; BC=-1|-1; BR=01201311R201e4; CH=green;\n DM=||false|;\n DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018046059;\n MF=kangjie.xu@linux.alibaba.com; NM=1; PH=DS; RN=5; SR=0;\n TI=SMTPD_---0VJqptNX_1658215610;",
        "From": "Kangjie Xu <kangjie.xu@linux.alibaba.com>",
        "To": "maxime.coquelin@redhat.com,\n\tchenbo.xia@intel.com",
        "Cc": "dev@dpdk.org,\n\txuanzhuo@linux.alibaba.com,\n\thengqi@linux.alibaba.com",
        "Subject": "[PATCH 1/1] vhost: support VIRTIO_F_RING_RESET for vhost-user",
        "Date": "Tue, 19 Jul 2022 15:26:50 +0800",
        "Message-Id": "<20220719072650.118176-1-kangjie.xu@linux.alibaba.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Approved-At": "Wed, 20 Jul 2022 08:44:13 +0200",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "Add VIRTIO_F_RING_RESET, which indicates that the driver can reset a\nqueue individually.\n\nVIRTIO_F_RING_RESET feature is added to virtio-spec 1.2. The relevant\ninformation is in\n    https://github.com/oasis-tcs/virtio-spec/issues/124\n    https://github.com/oasis-tcs/virtio-spec/issues/139\n\nThe implementation only adds the feature bit in supported features. It\ndoes not require any other changes because we reuse the existing vhost\nprotocol.\n\nThe virtqueue reset process can be concluded as two parts:\n1. The driver can reset a virtqueue. When it is triggered,\nVHOST_USER_SET_VRING_ENABLE message with \"payload.state.num\" set to 0\nis sent to DPDK. Then the virtqueue will be disabled in DPDK.\n2. After the virtqueue is disabled, the driver may optionally re-enable\nit. To avoid confusion with VHOST_USER_SET_VRING_ENABLE, we call this\npart as \"restart\". The virtqueue's information may be changed when\nrestarting it. Thus, the information of the reset virtqueue should be\nupdated. This part is basically similar to when the virtqueue is started\nfor the first time, except that the restart process does not need to set\nfeatures and set mem table since they does not change. QEMU will send\nmessages containing size, base, addr, kickfd and callfd of the virtqueue\nin order. Specifically, the DPDK will receive these messages in order:\n    a. VHOST_USER_SET_VRING_NUM\n    b. VHOST_USER_SET_VRING_BASE\n    c. VHOST_USER_SET_VRING_ADDR\n    d. VHOST_USER_SET_VRING_KICK\n    e. VHOST_USER_SET_VRING_CALL\n    f. VHOST_USER_SET_VRING_ENABLE\nThe last VHOST_USER_SET_VRING_ENABLE message with \"payload.state.num\" set\nto 1, will be sent to enable the virtqueue and the restart process is\nfinished.\n\nSigned-off-by: Kangjie Xu <kangjie.xu@linux.alibaba.com>\nSigned-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>\n---\nTest environment:\n    Host: 5.4.189\n    Qemu: QEMU emulator version 7.0.50 (With vq reset support)\n    Guest: 5.19.0-rc3 (With vq reset support)\n    DPDK: 22.07-rc1\n    Test Cmd: ethtool -g eth1; ethtool -G eth1 rx $1 tx $2;\n            ethtool -g eth1;\n\n    The driver can resize the virtio queue, then virtio queue reset\n    function should be triggered.\n\nGuest Kernel Patch:\n    https://lore.kernel.org/bpf/20220629065656.54420-1-xuanzhuo@linux.alibaba.com\n\nQEMU Patch:\n    https://lore.kernel.org/qemu-devel/cover.1658141552.git.kangjie.xu@linux.alibaba.com\n\n lib/vhost/vhost.h | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h\nindex 14235aaf81..9711ded7dd 100644\n--- a/lib/vhost/vhost.h\n+++ b/lib/vhost/vhost.h\n@@ -378,6 +378,11 @@ struct vhost_msg {\n  #define VIRTIO_F_VERSION_1 32\n #endif\n \n+/* This feature indicates that the driver can reset a queue individually. */\n+#ifndef VIRTIO_F_RING_RESET\n+#define VIRTIO_F_RING_RESET 40\n+#endif\n+\n /* Declare packed ring related bits for older kernels */\n #ifndef VIRTIO_F_RING_PACKED\n \n@@ -440,7 +445,8 @@ struct vring_packed_desc_event {\n \t\t\t\t(1ULL << VIRTIO_NET_F_MTU)  | \\\n \t\t\t\t(1ULL << VIRTIO_F_IN_ORDER) | \\\n \t\t\t\t(1ULL << VIRTIO_F_IOMMU_PLATFORM) | \\\n-\t\t\t\t(1ULL << VIRTIO_F_RING_PACKED))\n+\t\t\t\t(1ULL << VIRTIO_F_RING_PACKED)\t| \\\n+\t\t\t\t(1ULL << VIRTIO_F_RING_RESET))\n \n \n struct guest_page {\n",
    "prefixes": [
        "1/1"
    ]
}