get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 122602,
    "url": "https://patches.dpdk.org/api/patches/122602/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230127135731.22499-1-maxime.coquelin@redhat.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": "<20230127135731.22499-1-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230127135731.22499-1-maxime.coquelin@redhat.com",
    "date": "2023-01-27T13:57:31",
    "name": "vhost: improve truncated messages handling",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "cbe8225c985189a0a96e2e699bc547d33082f869",
    "submitter": {
        "id": 512,
        "url": "https://patches.dpdk.org/api/people/512/?format=api",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.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/20230127135731.22499-1-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 26669,
            "url": "https://patches.dpdk.org/api/series/26669/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=26669",
            "date": "2023-01-27T13:57:31",
            "name": "vhost: improve truncated messages handling",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/26669/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/122602/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/122602/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 35BAC424A2;\n\tFri, 27 Jan 2023 14:57:39 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C667240223;\n\tFri, 27 Jan 2023 14:57:38 +0100 (CET)",
            "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 5C7F140146\n for <dev@dpdk.org>; Fri, 27 Jan 2023 14:57:37 +0100 (CET)",
            "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-67-XGxT0nEAPiWznpD4YtwiKQ-1; Fri, 27 Jan 2023 08:57:35 -0500",
            "from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com\n [10.11.54.9])\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 34395858F09;\n Fri, 27 Jan 2023 13:57:35 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.39.208.33])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 12C93492C14;\n Fri, 27 Jan 2023 13:57:33 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1674827856;\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 bh=NN5JPBffc6NJ/GRltC17X4bPPyAq7Z5dSFJWkmhZFic=;\n b=Tg7dIAhLaMLgkCJZOgxsZtuM+KXYSShFFMKXFVSgU7YAesePMhXcidK4+vr8mbHsUVUmh2\n bhnUY/AUN0+odNcX9y8vst8anw9drjIYh16kCeKR5mQxHFA6lizLyabldwLqZBvKnrY59f\n LK8GC/+9hPL4SnRbLah9oEDsSkbWNsk=",
        "X-MC-Unique": "XGxT0nEAPiWznpD4YtwiKQ-1",
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "To": "dev@dpdk.org,\n\tdavid.marchand@redhat.com,\n\tchenbo.xia@intel.com",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Subject": "[PATCH] vhost: improve truncated messages handling",
        "Date": "Fri, 27 Jan 2023 14:57:31 +0100",
        "Message-Id": "<20230127135731.22499-1-maxime.coquelin@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.1 on 10.11.54.9",
        "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": "This patch improves truncated messages logging to ease\ndebugging.\n\nFirst, it differentiates between message's buffer\ntruncation and control data truncation. Indeed, MSG_CTRUNC\ncan happen even if enough room was provided, in case LSM\ndetects access rights issue.\n\nThen, it does not return directly in case of truncation,\nbut returns normally to let a chance to display request\ntype in Vhost-user protocol layer logs.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/vhost/socket.c | 8 +++++---\n 1 file changed, 5 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c\nindex 863a6f6d52..669c322e12 100644\n--- a/lib/vhost/socket.c\n+++ b/lib/vhost/socket.c\n@@ -129,10 +129,12 @@ read_fd_message(char *ifname, int sockfd, char *buf, int buflen, int *fds, int m\n \t\treturn ret;\n \t}\n \n-\tif (msgh.msg_flags & (MSG_TRUNC | MSG_CTRUNC)) {\n+\tif (msgh.msg_flags & MSG_TRUNC)\n \t\tVHOST_LOG_CONFIG(ifname, ERR, \"truncated msg (fd %d)\\n\", sockfd);\n-\t\treturn -1;\n-\t}\n+\n+\t/* MSG_CTRUNC may be caused by LSM misconfiguration */\n+\tif (msgh.msg_flags & MSG_CTRUNC)\n+\t\tVHOST_LOG_CONFIG(ifname, ERR, \"truncated control data (fd %d)\\n\", sockfd);\n \n \tfor (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;\n \t\tcmsg = CMSG_NXTHDR(&msgh, cmsg)) {\n",
    "prefixes": []
}