get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 135989,
    "url": "http://patchwork.dpdk.org/api/patches/135989/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/tencent_211C7D6424F1D786C4239F9482049EEC2E09@qq.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": "<tencent_211C7D6424F1D786C4239F9482049EEC2E09@qq.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/tencent_211C7D6424F1D786C4239F9482049EEC2E09@qq.com",
    "date": "2024-01-19T16:25:31",
    "name": "lib/telemetry:fix telemetry conns leak in case of socket write fail",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fa64d47287baf7ed8b4ebc9e419116a9f5eac7ac",
    "submitter": {
        "id": 3266,
        "url": "http://patchwork.dpdk.org/api/people/3266/?format=api",
        "name": "ShaoWei Sun",
        "email": "1819846787@qq.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/tencent_211C7D6424F1D786C4239F9482049EEC2E09@qq.com/mbox/",
    "series": [
        {
            "id": 30856,
            "url": "http://patchwork.dpdk.org/api/series/30856/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30856",
            "date": "2024-01-19T16:25:31",
            "name": "lib/telemetry:fix telemetry conns leak in case of socket write fail",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/30856/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/135989/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/135989/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 1071F43900;\n\tFri, 19 Jan 2024 17:25:46 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EA9364029F;\n\tFri, 19 Jan 2024 17:25:45 +0100 (CET)",
            "from out203-205-221-240.mail.qq.com (out203-205-221-240.mail.qq.com\n [203.205.221.240])\n by mails.dpdk.org (Postfix) with ESMTP id 932DE40279\n for <dev@dpdk.org>; Fri, 19 Jan 2024 17:25:43 +0100 (CET)",
            "from localhost.localdomain\n ([2408:8207:1851:a300:71c7:2812:f2e:cd5c])\n by newxmesmtplogicsvrszc5-2.qq.com (NewEsmtp) with SMTP\n id 661A14BE; Sat, 20 Jan 2024 00:25:33 +0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512;\n t=1705681535; bh=pGICy/8s7IpoKmeLEKbXOz1w0JmxUm6XzrrOnQl0APE=;\n h=From:To:Cc:Subject:Date;\n b=Zds0dLEsSgJZAu2QvjDtvBPR9+D9IpPwYDyXcB6A/MiuJK9Mq8lQ1t+TYqEnLEnjM\n fTAKO5eEmgZ9Z2zeqFBYg3tDNz4oRb1bbyy8HZbyAi8n80EPUuV6lPfIU872jggTsf\n R4WnU+SHHCL9cVoCUeZditP4afmVL0gImlB5IJXc=",
        "X-QQ-mid": "xmsmtpt1705681533tg6iuz0v3",
        "Message-ID": "<tencent_211C7D6424F1D786C4239F9482049EEC2E09@qq.com>",
        "X-QQ-XMAILINFO": "OKkKo7I1HxIedgj7nymveLPjzOdlgk+JQ+HMETXKByknvPHF/Pf2TtYPJRQM78\n 8CV88QoyzW40XMsiQO7UKgbw//Aa4toZzH5+vjQWZTtAZEuq13W+jMDjBfTnQtvt5ss3cS7SzbSd\n 8NZnQl1KPhJeFJ+DKv/LAxYRt+gtEHsWrq4X1a9LF0mgMx38u1o7vo4UMzUcb+itAtm73X34Dmhs\n eDvLATeSE7f+Osq9ZNgIk0EVib5IFLP5paV6f0gKXWMTS65OfbHwoWl/KP/bdH+VvzziSygb6YGJ\n Wh9cv2/+MgIJ2ROZy6ugFBKC77413jLftHYersCUtN9lDNWZZl6WMwBy4kZzf41qmk4Vewnz+4uD\n yyVWxQeC5Pu2QqOE1gygQekJSRfW50giT95bib9pw1nXIAHHVZsZsibry97oRp++asnW/LBTltuM\n 34lBD+HB0M6l5H4NdYnPjw8bsqKtoRIDN7aqPWWi5WzfVQOrgLvp581AjNuOd41wOt/GPTkKBGM7\n 4B6T2vkVYqxizAummkEom/PwwhjXKSIthcqQYbkLbZ2qMQndJtuLh/OwIinOG8jV1LPryQXBauoB\n 5eCLZqDg5kfvQQJ6vZs7YldV1qgFGxrWzePnU3MzcGUMXyz21P+uCjK9lNRcDO25qzOrKzCS4skN\n i+d8Yae39BAsO1TkihcKpenEBpE/RodFY0DIgtiClWNA2DZm3fyfdIiguip3zDiv5nxJh0LvhYc2\n /69e85nu+irMGctW8GJHX/BC1q33A/sCKTjW86B8/0ggoB2VGnoePmCs2+AvnfjGYoqaIqI0LGIC\n GjBO0ISsC/Dfzo9DG66VAxhOc9tK8Nmn+zLmlfEOJqatxsXnAqsH/UMfpAE4zJIC6JYpOY+8B/SY\n IvhLW+FYKYc/m7CjblHOlRNDxJ+Aa0/HJge/NK1RiLGyHVz0z1BPmUApy16oBdmDCy8c4kKnIeUh\n wpC6A9K5c4/UvGLT4Bo0z46Obp5Nkrr6dIzeEOWWOU4NdnvkkIZNBQlnhdXx7CZOH7oZ0qoZzLdX\n 7+gSSFtAdjmKczEsgHNE5nhE8r+WA1xavq70XuAR+w+tu/YbLf",
        "X-QQ-XMRINFO": "Nq+8W0+stu50PRdwbJxPCL0=",
        "From": "Shaowei Sun <1819846787@qq.com>",
        "To": "dev@dpdk.org",
        "Cc": "ciara.power@intel.com",
        "Subject": "[PATCH] lib/telemetry:fix telemetry conns leak in case of socket\n write fail",
        "Date": "Sat, 20 Jan 2024 00:25:31 +0800",
        "X-OQ-MSGID": "<20240119162531.77817-1-1819846787@qq.com>",
        "X-Mailer": "git-send-email 2.37.1 (Apple Git-137.1)",
        "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": "Telemetry can only create 10 conns by default, each of which is processed\nby a thread.\n\nWhen a thread fails to write using socket, the thread will end directly\nwithout reducing the total number of conns.\n\nThis will result in the machine running for a long time, and if there are\n10 failures, the telemetry will be unavailable\n\nFixes: 6dd571fd07c3 (\"telemetry: introduce new functionality\")\n\nSigned-off-by: Shaowei Sun <1819846787@qq.com>\n---\n lib/telemetry/telemetry.c | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c\nindex 31e2391867..0b00c04090 100644\n--- a/lib/telemetry/telemetry.c\n+++ b/lib/telemetry/telemetry.c\n@@ -378,8 +378,8 @@ client_handler(void *sock_id)\n \t\t\t\"{\\\"version\\\":\\\"%s\\\",\\\"pid\\\":%d,\\\"max_output_len\\\":%d}\",\n \t\t\ttelemetry_version, getpid(), MAX_OUTPUT_LEN);\n \tif (write(s, info_str, strlen(info_str)) < 0) {\n-\t\tclose(s);\n-\t\treturn NULL;\n+\t\tTMTY_LOG_LINE(ERR, \"Socket write base info to client failed\");\n+\t\tgoto exit;\n \t}\n \n \t/* receive data is not null terminated */\n@@ -404,6 +404,7 @@ client_handler(void *sock_id)\n \n \t\tbytes = read(s, buffer, sizeof(buffer) - 1);\n \t}\n+exit:\n \tclose(s);\n \trte_atomic_fetch_sub_explicit(&v2_clients, 1, rte_memory_order_relaxed);\n \treturn NULL;\n",
    "prefixes": []
}