get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139700,
    "url": "http://patches.dpdk.org/api/patches/139700/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240426084706.709653-1-daniil.ushkov@yandex.ru/",
    "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": "<20240426084706.709653-1-daniil.ushkov@yandex.ru>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240426084706.709653-1-daniil.ushkov@yandex.ru",
    "date": "2024-04-26T08:47:06",
    "name": "[v4] lib/vhost: add flag for async connection in client mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "1bf9795ec68e2a71a039286ca37433c8d779444c",
    "submitter": {
        "id": 3319,
        "url": "http://patches.dpdk.org/api/people/3319/?format=api",
        "name": "Daniil Ushkov",
        "email": "daniil.ushkov@yandex.ru"
    },
    "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/20240426084706.709653-1-daniil.ushkov@yandex.ru/mbox/",
    "series": [
        {
            "id": 31829,
            "url": "http://patches.dpdk.org/api/series/31829/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31829",
            "date": "2024-04-26T08:47:06",
            "name": "[v4] lib/vhost: add flag for async connection in client mode",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/31829/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/139700/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/139700/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 DBC2443F13;\n\tFri, 26 Apr 2024 10:48:13 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B218843AE0;\n\tFri, 26 Apr 2024 10:48:13 +0200 (CEST)",
            "from forward100b.mail.yandex.net (forward100b.mail.yandex.net\n [178.154.239.147])\n by mails.dpdk.org (Postfix) with ESMTP id 3D7FD402EF\n for <dev@dpdk.org>; Fri, 26 Apr 2024 10:48:12 +0200 (CEST)",
            "from mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net\n (mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net\n [IPv6:2a02:6b8:c27:19c8:0:640:13a7:0])\n by forward100b.mail.yandex.net (Yandex) with ESMTPS id 8F69060B51;\n Fri, 26 Apr 2024 11:48:11 +0300 (MSK)",
            "by mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net\n (smtp/Yandex) with ESMTPSA id AmIMuJ5wFeA0-c1Ern1PY;\n Fri, 26 Apr 2024 11:48:10 +0300"
        ],
        "X-Yandex-Fwd": "1",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;\n t=1714121291; bh=zmBIdFFDQzVSNC2SoJ2RIrB858MXV9xZYqkORhuEuaQ=;\n h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From;\n b=GwxywH9iCoAgJ+2sMnSPJbVYmklNgpTYc/4Oluqr3Hz4Pme6Rzd90wFAHiUCFLkNN\n MrIbV/fsgJiX1wDUGRnajn7hB6bzCHH7qHwwU3wP3T2Rkpm9Rtj7EdnCr8rmBJeH45\n kI/93IqvtWouIRQ3ZfSSZ8e7/ZfmBDvndXrUke08=",
        "Authentication-Results": "\n mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net;\n dkim=pass header.i=@yandex.ru",
        "From": "Daniil Ushkov <daniil.ushkov@yandex.ru>",
        "To": "dev@dpdk.org",
        "Cc": "Daniil Ushkov <daniil.ushkov@yandex.ru>,\n Maxime Coquelin <maxime.coquelin@redhat.com>,\n Chenbo Xia <chenbox@nvidia.com>",
        "Subject": "[PATCH v4] lib/vhost: add flag for async connection in client mode",
        "Date": "Fri, 26 Apr 2024 11:47:06 +0300",
        "Message-Id": "<20240426084706.709653-1-daniil.ushkov@yandex.ru>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240417083835.164456-1-udav@mts.ru>",
        "References": "<20240417083835.164456-1-udav@mts.ru>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "This patch introduces a new flag RTE_VHOST_USER_ASYNC_CONNECT,\nwhich in combination with the flag RTE_VHOST_USER_CLIENT makes\nrte_vhost_driver_start connect asynchronously to the vhost server.\n\nSigned-off-by: Daniil Ushkov <daniil.ushkov@yandex.ru>\n---\nFixes:\n* Cyrillic name in Signed-off-by.\n\nLet it be another email address. There will be fewer problems.\n\nP.S. Sorry, v3 was sent without subscription.\n lib/vhost/rte_vhost.h |  1 +\n lib/vhost/socket.c    | 28 ++++++++++++++++------------\n 2 files changed, 17 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/lib/vhost/rte_vhost.h b/lib/vhost/rte_vhost.h\nindex db92f05344..b0434c4b8d 100644\n--- a/lib/vhost/rte_vhost.h\n+++ b/lib/vhost/rte_vhost.h\n@@ -41,6 +41,7 @@ extern \"C\" {\n #define RTE_VHOST_USER_ASYNC_COPY\t(1ULL << 7)\n #define RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS\t(1ULL << 8)\n #define RTE_VHOST_USER_NET_STATS_ENABLE\t(1ULL << 9)\n+#define RTE_VHOST_USER_ASYNC_CONNECT\t(1ULL << 10)\n \n /* Features. */\n #ifndef VIRTIO_NET_F_GUEST_ANNOUNCE\ndiff --git a/lib/vhost/socket.c b/lib/vhost/socket.c\nindex 96b3ab5595..c681d53abb 100644\n--- a/lib/vhost/socket.c\n+++ b/lib/vhost/socket.c\n@@ -45,6 +45,7 @@ struct vhost_user_socket {\n \tbool async_copy;\n \tbool net_compliant_ol_flags;\n \tbool stats_enabled;\n+\tbool async_connect;\n \n \t/*\n \t * The \"supported_features\" indicates the feature bits the\n@@ -533,21 +534,23 @@ vhost_user_start_client(struct vhost_user_socket *vsocket)\n \tconst char *path = vsocket->path;\n \tstruct vhost_user_reconnect *reconn;\n \n-\tret = vhost_user_connect_nonblock(vsocket->path, fd, (struct sockaddr *)&vsocket->un,\n-\t\t\t\t\t  sizeof(vsocket->un));\n-\tif (ret == 0) {\n-\t\tvhost_user_add_connection(fd, vsocket);\n-\t\treturn 0;\n-\t}\n+\tif (!vsocket->async_connect || !vsocket->reconnect) {\n+\t\tret = vhost_user_connect_nonblock(vsocket->path, fd,\n+\t\t\t(struct sockaddr *)&vsocket->un, sizeof(vsocket->un));\n+\t\tif (ret == 0) {\n+\t\t\tvhost_user_add_connection(fd, vsocket);\n+\t\t\treturn 0;\n+\t\t}\n \n-\tVHOST_CONFIG_LOG(path, WARNING, \"failed to connect: %s\", strerror(errno));\n+\t\tVHOST_CONFIG_LOG(path, WARNING, \"failed to connect: %s\", strerror(errno));\n \n-\tif (ret == -2 || !vsocket->reconnect) {\n-\t\tclose(fd);\n-\t\treturn -1;\n-\t}\n+\t\tif (ret == -2 || !vsocket->reconnect) {\n+\t\t\tclose(fd);\n+\t\t\treturn -1;\n+\t\t}\n \n-\tVHOST_CONFIG_LOG(path, INFO, \"reconnecting...\");\n+\t\tVHOST_CONFIG_LOG(path, INFO, \"reconnecting...\");\n+\t}\n \treconn = malloc(sizeof(*reconn));\n \tif (reconn == NULL) {\n \t\tVHOST_CONFIG_LOG(path, ERR, \"failed to allocate memory for reconnect\");\n@@ -930,6 +933,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)\n \tvsocket->async_copy = flags & RTE_VHOST_USER_ASYNC_COPY;\n \tvsocket->net_compliant_ol_flags = flags & RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS;\n \tvsocket->stats_enabled = flags & RTE_VHOST_USER_NET_STATS_ENABLE;\n+\tvsocket->async_connect = flags & RTE_VHOST_USER_ASYNC_CONNECT;\n \tif (vsocket->is_vduse)\n \t\tvsocket->iommu_support = true;\n \telse\n",
    "prefixes": [
        "v4"
    ]
}