get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129295,
    "url": "http://patchwork.dpdk.org/api/patches/129295/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230705132232.114266-2-maxime.coquelin@redhat.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20230705132232.114266-2-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230705132232.114266-2-maxime.coquelin@redhat.com",
    "date": "2023-07-05T13:22:31",
    "name": "[1/2] vhost: fix vduse features negotiation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8e3fe64aa4a5fcd06d23f11d9eca8b839d393405",
    "submitter": {
        "id": 512,
        "url": "http://patchwork.dpdk.org/api/people/512/?format=api",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patchwork.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230705132232.114266-2-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 28835,
            "url": "http://patchwork.dpdk.org/api/series/28835/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28835",
            "date": "2023-07-05T13:22:31",
            "name": "VDUSE fixes for v23.07",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/28835/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/129295/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/129295/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 9F71642DD8;\n\tWed,  5 Jul 2023 15:22:42 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3F85B406B5;\n\tWed,  5 Jul 2023 15:22:42 +0200 (CEST)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id 4977A4021F\n for <dev@dpdk.org>; Wed,  5 Jul 2023 15:22:40 +0200 (CEST)",
            "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-493-Z9dDDX_1PjewB95i55JY8g-1; Wed, 05 Jul 2023 09:22:38 -0400",
            "from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com\n [10.11.54.1])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 46B85185A792;\n Wed,  5 Jul 2023 13:22:38 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.39.208.34])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 47C0E40C2063;\n Wed,  5 Jul 2023 13:22:37 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1688563359;\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=IXoOiT9agfgLT6QgT2X+gAHowf1gljqWHFsvk0PxfcU=;\n b=FtB8GwlkYynm6ErsU6GbnslOAx1uWb5UBDQVJa5JtzLnO+o+6AR4fBgbJHZZOQCHMqZW7V\n yfNxfDJOAP8Cg5mUjsRT1XFtm6AOxKoN0TWQB5wOfFqIEWgZezr0wA0IlrdTROlzqaIaWm\n b1rMV98PPej27cttSVZoR/3mv32j9I4=",
        "X-MC-Unique": "Z9dDDX_1PjewB95i55JY8g-1",
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "To": "dev@dpdk.org,\n\tchenbo.xia@intel.com,\n\tdavid.marchand@redhat.com",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Subject": "[PATCH 1/2] vhost: fix vduse features negotiation",
        "Date": "Wed,  5 Jul 2023 15:22:31 +0200",
        "Message-ID": "<20230705132232.114266-2-maxime.coquelin@redhat.com>",
        "In-Reply-To": "<20230705132232.114266-1-maxime.coquelin@redhat.com>",
        "References": "<20230705132232.114266-1-maxime.coquelin@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.1 on 10.11.54.1",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "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": "The series introducing VDUSE support missed the\napplication capability to disable supported features.\n\nThis results in TSO being negotiated while not supported by\nthe application.\n\nFixes: 0adb8eccc6a6 (\"vhost: add VDUSE device creation and destruction\")\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/vhost/socket.c | 19 +++++++++++++------\n lib/vhost/vduse.c  | 28 +++++++---------------------\n lib/vhost/vduse.h  | 20 ++++++++++++++++++++\n 3 files changed, 40 insertions(+), 27 deletions(-)",
    "diff": "diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c\nindex 19a7469e45..a65d301406 100644\n--- a/lib/vhost/socket.c\n+++ b/lib/vhost/socket.c\n@@ -921,6 +921,10 @@ rte_vhost_driver_register(const char *path, uint64_t flags)\n \t\tVHOST_LOG_CONFIG(path, ERR, \"failed to init connection mutex\\n\");\n \t\tgoto out_free;\n \t}\n+\n+\tif (!strncmp(\"/dev/vduse/\", path, strlen(\"/dev/vduse/\")))\n+\t\tvsocket->is_vduse = true;\n+\n \tvsocket->vdpa_dev = NULL;\n \tvsocket->max_queue_pairs = VHOST_MAX_QUEUE_PAIRS;\n \tvsocket->extbuf = flags & RTE_VHOST_USER_EXTBUF_SUPPORT;\n@@ -950,9 +954,14 @@ rte_vhost_driver_register(const char *path, uint64_t flags)\n \t * two values.\n \t */\n \tvsocket->use_builtin_virtio_net = true;\n-\tvsocket->supported_features = VIRTIO_NET_SUPPORTED_FEATURES;\n-\tvsocket->features           = VIRTIO_NET_SUPPORTED_FEATURES;\n-\tvsocket->protocol_features  = VHOST_USER_PROTOCOL_FEATURES;\n+\tif (vsocket->is_vduse) {\n+\t\tvsocket->supported_features = VDUSE_NET_SUPPORTED_FEATURES;\n+\t\tvsocket->features           = VDUSE_NET_SUPPORTED_FEATURES;\n+\t} else {\n+\t\tvsocket->supported_features = VIRTIO_NET_SUPPORTED_FEATURES;\n+\t\tvsocket->features           = VIRTIO_NET_SUPPORTED_FEATURES;\n+\t\tvsocket->protocol_features  = VHOST_USER_PROTOCOL_FEATURES;\n+\t}\n \n \tif (vsocket->async_copy) {\n \t\tvsocket->supported_features &= ~(1ULL << VHOST_F_LOG_ALL);\n@@ -993,9 +1002,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)\n #endif\n \t}\n \n-\tif (!strncmp(\"/dev/vduse/\", path, strlen(\"/dev/vduse/\"))) {\n-\t\tvsocket->is_vduse = true;\n-\t} else {\n+\tif (!vsocket->is_vduse) {\n \t\tif ((flags & RTE_VHOST_USER_CLIENT) != 0) {\n \t\t\tvsocket->reconnect = !(flags & RTE_VHOST_USER_NO_RECONNECT);\n \t\t\tif (vsocket->reconnect && reconn_tid == 0) {\ndiff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c\nindex a509daf80c..1478562be1 100644\n--- a/lib/vhost/vduse.c\n+++ b/lib/vhost/vduse.c\n@@ -26,26 +26,6 @@\n #define VHOST_VDUSE_API_VERSION 0\n #define VDUSE_CTRL_PATH \"/dev/vduse/control\"\n \n-#define VDUSE_NET_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \\\n-\t\t\t\t(1ULL << VIRTIO_F_ANY_LAYOUT) | \\\n-\t\t\t\t(1ULL << VIRTIO_F_VERSION_1)   | \\\n-\t\t\t\t(1ULL << VIRTIO_NET_F_GSO) | \\\n-\t\t\t\t(1ULL << VIRTIO_NET_F_HOST_TSO4) | \\\n-\t\t\t\t(1ULL << VIRTIO_NET_F_HOST_TSO6) | \\\n-\t\t\t\t(1ULL << VIRTIO_NET_F_HOST_UFO) | \\\n-\t\t\t\t(1ULL << VIRTIO_NET_F_HOST_ECN) | \\\n-\t\t\t\t(1ULL << VIRTIO_NET_F_CSUM)    | \\\n-\t\t\t\t(1ULL << VIRTIO_NET_F_GUEST_CSUM) | \\\n-\t\t\t\t(1ULL << VIRTIO_NET_F_GUEST_TSO4) | \\\n-\t\t\t\t(1ULL << VIRTIO_NET_F_GUEST_TSO6) | \\\n-\t\t\t\t(1ULL << VIRTIO_NET_F_GUEST_UFO) | \\\n-\t\t\t\t(1ULL << VIRTIO_NET_F_GUEST_ECN) | \\\n-\t\t\t\t(1ULL << VIRTIO_RING_F_INDIRECT_DESC) | \\\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_NET_F_CTRL_VQ) | \\\n-\t\t\t\t(1ULL << VIRTIO_NET_F_MQ))\n-\n struct vduse {\n \tstruct fdset fdset;\n };\n@@ -440,7 +420,7 @@ vduse_device_create(const char *path)\n \tstruct virtio_net *dev;\n \tstruct virtio_net_config vnet_config = { 0 };\n \tuint64_t ver = VHOST_VDUSE_API_VERSION;\n-\tuint64_t features = VDUSE_NET_SUPPORTED_FEATURES;\n+\tuint64_t features;\n \tstruct vduse_dev_config *dev_config = NULL;\n \tconst char *name = path + strlen(\"/dev/vduse/\");\n \n@@ -488,6 +468,12 @@ vduse_device_create(const char *path)\n \t\tgoto out_ctrl_close;\n \t}\n \n+\tret = rte_vhost_driver_get_features(path, &features);\n+\tif (ret < 0) {\n+\t\tVHOST_LOG_CONFIG(name, ERR, \"Failed to get backend features\\n\");\n+\t\tgoto out_free;\n+\t}\n+\n \tret = rte_vhost_driver_get_queue_num(path, &max_queue_pairs);\n \tif (ret < 0) {\n \t\tVHOST_LOG_CONFIG(name, ERR, \"Failed to get max queue pairs\\n\");\ndiff --git a/lib/vhost/vduse.h b/lib/vhost/vduse.h\nindex a15e5d4c16..cd55bfd858 100644\n--- a/lib/vhost/vduse.h\n+++ b/lib/vhost/vduse.h\n@@ -7,6 +7,26 @@\n \n #include \"vhost.h\"\n \n+#define VDUSE_NET_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \\\n+\t\t\t\t(1ULL << VIRTIO_F_ANY_LAYOUT) | \\\n+\t\t\t\t(1ULL << VIRTIO_F_VERSION_1)   | \\\n+\t\t\t\t(1ULL << VIRTIO_NET_F_GSO) | \\\n+\t\t\t\t(1ULL << VIRTIO_NET_F_HOST_TSO4) | \\\n+\t\t\t\t(1ULL << VIRTIO_NET_F_HOST_TSO6) | \\\n+\t\t\t\t(1ULL << VIRTIO_NET_F_HOST_UFO) | \\\n+\t\t\t\t(1ULL << VIRTIO_NET_F_HOST_ECN) | \\\n+\t\t\t\t(1ULL << VIRTIO_NET_F_CSUM)    | \\\n+\t\t\t\t(1ULL << VIRTIO_NET_F_GUEST_CSUM) | \\\n+\t\t\t\t(1ULL << VIRTIO_NET_F_GUEST_TSO4) | \\\n+\t\t\t\t(1ULL << VIRTIO_NET_F_GUEST_TSO6) | \\\n+\t\t\t\t(1ULL << VIRTIO_NET_F_GUEST_UFO) | \\\n+\t\t\t\t(1ULL << VIRTIO_NET_F_GUEST_ECN) | \\\n+\t\t\t\t(1ULL << VIRTIO_RING_F_INDIRECT_DESC) | \\\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_NET_F_CTRL_VQ) | \\\n+\t\t\t\t(1ULL << VIRTIO_NET_F_MQ))\n+\n #ifdef VHOST_HAS_VDUSE\n \n int vduse_device_create(const char *path);\n",
    "prefixes": [
        "1/2"
    ]
}