get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2190165,
    "url": "http://patchwork.ozlabs.org/api/patches/2190165/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260129002348.433050-1-marek.vasut+renesas@mailbox.org/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260129002348.433050-1-marek.vasut+renesas@mailbox.org>",
    "list_archive_url": null,
    "date": "2026-01-29T00:23:29",
    "name": "net: lwip: wget: rework the '#' printing",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d2705ae3f9fe15eebff27726d68ef97567e8c897",
    "submitter": {
        "id": 85650,
        "url": "http://patchwork.ozlabs.org/api/people/85650/?format=api",
        "name": "Marek Vasut",
        "email": "marek.vasut+renesas@mailbox.org"
    },
    "delegate": {
        "id": 157425,
        "url": "http://patchwork.ozlabs.org/api/users/157425/?format=api",
        "username": "jforissier",
        "first_name": "Jerome",
        "last_name": "Forissier",
        "email": "jerome.forissier@linaro.org"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260129002348.433050-1-marek.vasut+renesas@mailbox.org/mbox/",
    "series": [
        {
            "id": 490148,
            "url": "http://patchwork.ozlabs.org/api/series/490148/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=490148",
            "date": "2026-01-29T00:23:29",
            "name": "net: lwip: wget: rework the '#' printing",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/490148/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2190165/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2190165/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256\n header.s=mail20150812 header.b=O6O3d5U7;\n\tdkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org\n header.a=rsa-sha256 header.s=mail20150812 header.b=ISflETZ6;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=mailbox.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n secure) header.d=mailbox.org header.i=@mailbox.org header.b=\"O6O3d5U7\";\n\tdkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org\n header.b=\"ISflETZ6\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=mailbox.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=marek.vasut+renesas@mailbox.org",
            "outgoing_mbo_mout;\n dkim=pass header.d=mailbox.org header.s=mail20150812 header.b=ISflETZ6;\n spf=pass (outgoing_mbo_mout: domain of marek.vasut+renesas@mailbox.org\n designates 2001:67c:2050:b231:465::102 as permitted sender)\n smtp.mailfrom=marek.vasut+renesas@mailbox.org"
        ],
        "Received": [
            "from phobos.denx.de (unknown\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f1fyh1sfBz1xsw\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 29 Jan 2026 11:24:11 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 6FDF883B91;\n\tThu, 29 Jan 2026 01:23:58 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id A26C383BC7; Thu, 29 Jan 2026 01:23:57 +0100 (CET)",
            "from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id C12B283B30\n for <u-boot@lists.denx.de>; Thu, 29 Jan 2026 01:23:54 +0100 (CET)",
            "from smtp102.mailbox.org (smtp102.mailbox.org\n [IPv6:2001:67c:2050:b231:465::102])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4f1fyL3Jxrz9tVh;\n Thu, 29 Jan 2026 01:23:54 +0100 (CET)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED,\n SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2",
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org;\n s=mail20150812; t=1769646234;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding;\n bh=5Lfv5FmYZR8nAq8UbjcgqccjPx7wiTnIFKn0m6oNKAo=;\n b=O6O3d5U7BbOqnlkkKwS19v5k/jJiYna13KNy7BpH3T96mc9VbUjRnP9nV6m7QQwL5foB8p\n Z+Oz4TJe2MTNH/g0l1vA4w1nUK/F1akpLsq3RAl6/aVI5j5zrUleYGG9G/XWdrH8gw3fWC\n +oy47G+qMm2qyRcDza1K0MtpNQGJDKGplNqZm7zG+vudD0mgRWlIk++PzYZDimehq6vvir\n 5+4pNNFV8BONmk15QZS71wTbFLPbPN51+gxGWBYjYn0mdJMIjBGouPLSnzLxEw00h1ORjX\n lW7YFaWSvSi1wg4OiYMc1jbEci17KB4KNDl5VbFrZ4M1E9lpqOy24cao25cHeg==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org;\n s=mail20150812; t=1769646232;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding;\n bh=5Lfv5FmYZR8nAq8UbjcgqccjPx7wiTnIFKn0m6oNKAo=;\n b=ISflETZ6TxVo9PzekwlWa9CxzUbizGGDj99Nv5JrkgIrNSJOwW0cUMMHDlA4hTTRayMR/D\n QZx+AVREHh4rQD38oqTpeLudmGUROiCqwqyMOqAoMroi+MVqGXnY9IiTLV8YOKqhf7mQe7\n G7Yl8W7cRg3jTzCyA91U1OaEpqC/6nlYvP7w8CM5YR3csEWZDlb9Lo5zuLrWuYidcJe5DV\n KT9I6Us0Ashb6XLuj1yZg9appQSA3yDOPhHdjHdQG6eC/AfTbjEcGCbcpcwpYihj2V8McB\n qLzffwsyGguzqefgLg75ZFDta2ebwrskK+l6SfxgZzyd9SehiWmdjlCtNomOMA=="
        ],
        "From": "Marek Vasut <marek.vasut+renesas@mailbox.org>",
        "To": "u-boot@lists.denx.de",
        "Cc": "Marek Vasut <marek.vasut+renesas@mailbox.org>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Jerome Forissier <jerome@forissier.org>,\n Joe Hershberger <joe.hershberger@ni.com>,\n Ramon Fried <rfried.dev@gmail.com>, Sughosh Ganu <sughosh.ganu@linaro.org>,\n Tim Harvey <tharvey@gateworks.com>, Tom Rini <trini@konsulko.com>",
        "Subject": "[PATCH] net: lwip: wget: rework the '#' printing",
        "Date": "Thu, 29 Jan 2026 01:23:29 +0100",
        "Message-ID": "<20260129002348.433050-1-marek.vasut+renesas@mailbox.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-MBO-RS-ID": "68754a196ce3a504186",
        "X-MBO-RS-META": "5k3xifwmdwscpjjqk8o14xts7zmi64ts",
        "X-Rspamd-Queue-Id": "4f1fyL3Jxrz9tVh",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "Currently, the LWIP wget command prints excessive amount of progress\nindicator '#' for very long file downloads, limit this to one line\nthat scales according to transfer size.\n\nThe HTTP server does report the size of the entire file in protocol\nheaders, which are received before the actual data transfer. Cache\nthis information and use it to adaptively print progress indicator\n'#' until it fills one entire line worth of '#', which indicates the\ntransfer has completed. This way, long transfers don't print pages of\n'#', but every transfer will print exactly one line worth of '#'. The\nalgorithm for '#' printing is the same as TFTP tsize one.\n\nSigned-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>\n---\nCc: Ilias Apalodimas <ilias.apalodimas@linaro.org>\nCc: Jerome Forissier <jerome@forissier.org>\nCc: Joe Hershberger <joe.hershberger@ni.com>\nCc: Ramon Fried <rfried.dev@gmail.com>\nCc: Sughosh Ganu <sughosh.ganu@linaro.org>\nCc: Tim Harvey <tharvey@gateworks.com>\nCc: Tom Rini <trini@konsulko.com>\nCc: u-boot@lists.denx.de\n---\n net/lwip/wget.c | 27 +++++++++++++++++++++++----\n 1 file changed, 23 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/net/lwip/wget.c b/net/lwip/wget.c\nindex 55bd2b72e26..008f3b395e7 100644\n--- a/net/lwip/wget.c\n+++ b/net/lwip/wget.c\n@@ -37,6 +37,8 @@ struct wget_ctx {\n \tulong size;\n \tulong prevsize;\n \tulong start_time;\n+\tulong content_len;\n+\tulong hash_count;\n \tenum done_state done;\n };\n \n@@ -152,6 +154,7 @@ static int store_block(struct wget_ctx *ctx, void *src, u16_t len)\n {\n \tulong store_addr = ctx->daddr;\n \tuchar *ptr;\n+\tulong pos;\n \n \t/* Avoid overflow */\n \tif (wget_info->buffer_size && wget_info->buffer_size < ctx->size + len)\n@@ -174,10 +177,12 @@ static int store_block(struct wget_ctx *ctx, void *src, u16_t len)\n \n \tctx->daddr += len;\n \tctx->size += len;\n-\tif (ctx->size - ctx->prevsize > PROGRESS_PRINT_STEP_BYTES) {\n-\t\tif (!wget_info->silent)\n-\t\t\tprintf(\"#\");\n-\t\tctx->prevsize = ctx->size;\n+\n+\tpos = clamp(ctx->size, 0UL, ctx->content_len);\n+\n+\twhile (ctx->hash_count < pos * 50 / ctx->content_len) {\n+\t\tputc('#');\n+\t\tctx->hash_count++;\n \t}\n \n \treturn 0;\n@@ -234,6 +239,14 @@ static void httpc_result_cb(void *arg, httpc_result_t httpc_result,\n \t\treturn;\n \t}\n \n+\t/* Print hash marks for the last packet received */\n+\twhile (ctx->hash_count < 49) {\n+\t\tputc('#');\n+\t\tctx->hash_count++;\n+\t}\n+\tputs(\"  \");\n+\tprint_size(ctx->content_len, \"\");\n+\n \telapsed = get_timer(ctx->start_time);\n \tif (!elapsed)\n \t\telapsed = 1;\n@@ -263,11 +276,15 @@ static void httpc_result_cb(void *arg, httpc_result_t httpc_result,\n static err_t httpc_headers_done_cb(httpc_state_t *connection, void *arg, struct pbuf *hdr,\n \t\t\t\t   u16_t hdr_len, u32_t content_len)\n {\n+\tstruct wget_ctx *ctx = arg;\n+\n \twget_lwip_fill_info(hdr, hdr_len, content_len);\n \n \tif (wget_info->check_buffer_size && (ulong)content_len > wget_info->buffer_size)\n \t\treturn ERR_BUF;\n \n+\tctx->content_len = content_len;\n+\n \treturn ERR_OK;\n }\n \n@@ -294,6 +311,8 @@ int wget_do_request(ulong dst_addr, char *uri)\n \tctx.size = 0;\n \tctx.prevsize = 0;\n \tctx.start_time = 0;\n+\tctx.content_len = 0;\n+\tctx.hash_count = 0;\n \n \tif (parse_url(uri, ctx.server_name, &ctx.port, &path, &is_https))\n \t\treturn CMD_RET_USAGE;\n",
    "prefixes": []
}