Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2078161/?format=api
{ "id": 2078161, "url": "http://patchwork.ozlabs.org/api/patches/2078161/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20250428092418.2606467-1-jerome.forissier@linaro.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": "<20250428092418.2606467-1-jerome.forissier@linaro.org>", "list_archive_url": null, "date": "2025-04-28T09:24:07", "name": "net: lwip: tftp: time out if there is no reply from server", "commit_ref": "722e41ad9931bf6f327a66b5f8ec0dadfb32e0f3", "pull_url": null, "state": "accepted", "archived": false, "hash": "0028007bcd6d773677cf79b20183c3919dbdefb9", "submitter": { "id": 69192, "url": "http://patchwork.ozlabs.org/api/people/69192/?format=api", "name": "Jerome Forissier", "email": "jerome.forissier@linaro.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/20250428092418.2606467-1-jerome.forissier@linaro.org/mbox/", "series": [ { "id": 454418, "url": "http://patchwork.ozlabs.org/api/series/454418/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=454418", "date": "2025-04-28T09:24:07", "name": "net: lwip: tftp: time out if there is no reply from server", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/454418/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2078161/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2078161/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 unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=hybBbtKv;\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=none dis=none) header.from=linaro.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 unprotected) header.d=linaro.org header.i=@linaro.org header.b=\"hybBbtKv\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linaro.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=jerome.forissier@linaro.org" ], "Received": [ "from phobos.denx.de (phobos.denx.de\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 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4ZmJ1W5CxZz1yNN\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 28 Apr 2025 19:24:31 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 8A79680EFB;\n\tMon, 28 Apr 2025 11:24:42 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 0EB6780FDA; Mon, 28 Apr 2025 11:24:41 +0200 (CEST)", "from mail-wm1-x330.google.com (mail-wm1-x330.google.com\n [IPv6:2a00:1450:4864:20::330])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id EF7F080EE5\n for <u-boot@lists.denx.de>; Mon, 28 Apr 2025 11:24:38 +0200 (CEST)", "by mail-wm1-x330.google.com with SMTP id\n 5b1f17b1804b1-43ce70f9afbso35975075e9.0\n for <u-boot@lists.denx.de>; Mon, 28 Apr 2025 02:24:38 -0700 (PDT)", "from builder.. ([2a01:e0a:3cb:7bb0:635:b5ef:1b38:e66c])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-4409d2d8976sm149323365e9.27.2025.04.28.02.24.37\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 28 Apr 2025 02:24:37 -0700 (PDT)" ], "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 SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1745832278; x=1746437078; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=gHWgbmB6w0sbG4ZRdXgXcPIlb0fhDb1XNemUyd2PUZE=;\n b=hybBbtKvFQvUtH8F7ltNGwxsPD4mZpT9X+JAjyPvVnZfEm2YCxhjyG6kSKT4CdezxG\n 4cfPTEQrZHiy1YqONqbw3wKGjp0pG9EjGQjfNMul6tYzqsGZrDLJw82j+0VO6k51ct89\n MLWdqCC0F5RNt7rRPnXTUnG/tgjQkacHqt1Kaz7EqrY/7dEF1Y2q9JLRicUaQgpFY5kd\n fTxiQZxprzu6F6zSeQrbN8vVXmWPESCR9ADtrJdw3W8joblNzquZsx62H75eLerzxxLV\n XwK+MB7vFIjNzFFqXw3ySzOpWP3n1SnDNHwZV+dxl1r6nnbiUuHjPfOwkYdvTeypjx2B\n 5QiQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1745832278; x=1746437078;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=gHWgbmB6w0sbG4ZRdXgXcPIlb0fhDb1XNemUyd2PUZE=;\n b=OrKMCADNOkdiJcEQD5EM8esuVXpVedAQeRvIJF0Lv6zXTV75T36dhV3/qKgZKQKi8S\n kkhtoizvVGwxovpRfrexVc3FE0p6b/IeQzox/2ni0by8Qdk2UfVZqEUsMgxMZ7f312Hh\n m/hmojLR8PkHnLXspJR3HVJhV/Mq+zfLPiv2pUu69AKkBdPQh8LexST0iiWHpi3vkFZP\n 0bIZrBrZcRgky/HnUUgYFZ+iTDC/VlDlvrcV1Ju+OX0u7+phQG+fLke9sgGtW/BWHkbI\n N/5wC9BarcZPY3aXHUvf8BzNBYnvnpBdA2w4RMSYXtFvWGTnACJ9aJaTvElIuL37Gryj\n //xw==", "X-Gm-Message-State": "AOJu0YwvLcj7/tn4ydSZ6EZIgzbFRwrx7i0O1j15SSKsKxl83j1MjrzU\n zsP/ReWKW8TynCQjdTjLLJOoeHNODAu1d9dnkKmt9cNTgQVsXTFF6VnL3D7S8l7QUCZmfOv7A5Q\n bMq8=", "X-Gm-Gg": "ASbGnctVnH47yPPlw0WiAMIxszNywOSLUjRsbEC91yGx/8gqLs4IVn6FQruVfBCAvAl\n qRcimcSoc7IO0x2zjmiZVmRRwMAIDyLgO8IJ328ADlYiUEZRIa2EEgb9mrdQB61rAY5n5yUV2/N\n ba7cPlH5f0mlywUTKwV9xP86nIj9t3QM7CAZCljuB0J6PPmq9/kv58SEqdEf6uewcLrOTYaM719\n GEL0q79ZrozT/g63UKbT+FoBhHFKqLS3xQ4UGxzf5OL7GROxg2oLZE7drF1jVYeiUvWXk6MhuEK\n 1sVXQiFk0fHGhAntwHZQ75cQ3SsdkMYTxjtdINB/JkRBfQ64", "X-Google-Smtp-Source": "\n AGHT+IGTD2zp/aUUNWJdcQO30qBsXJVlSb6bsS4rziqT8BL8D+ESdR2lf1KsHEViqCao3pgsEspRbw==", "X-Received": "by 2002:a05:600c:1e88:b0:43c:fee3:2bce with SMTP id\n 5b1f17b1804b1-440a66ab25amr86327485e9.26.1745832278150;\n Mon, 28 Apr 2025 02:24:38 -0700 (PDT)", "From": "Jerome Forissier <jerome.forissier@linaro.org>", "To": "U-Boot mailing list <u-boot@lists.denx.de>", "Cc": "Jerome Forissier <jerome.forissier@linaro.org>,\n Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Joe Hershberger <joe.hershberger@ni.com>,\n Ramon Fried <rfried.dev@gmail.com>, Simon Glass <sjg@chromium.org>,\n Tom Rini <trini@konsulko.com>", "Subject": "[PATCH] net: lwip: tftp: time out if there is no reply from server", "Date": "Mon, 28 Apr 2025 11:24:07 +0200", "Message-ID": "<20250428092418.2606467-1-jerome.forissier@linaro.org>", "X-Mailer": "git-send-email 2.43.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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": "When there is no reply from the TFTP server, do_tftpb() should\neventually time out. Add a 10 second timer for that purpose.\n\nReported-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>\nSigned-off-by: Jerome Forissier <jerome.forissier@linaro.org>\n---\n\n net/lwip/tftp.c | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)", "diff": "diff --git a/net/lwip/tftp.c b/net/lwip/tftp.c\nindex 4f9b2049187..4f88924e47e 100644\n--- a/net/lwip/tftp.c\n+++ b/net/lwip/tftp.c\n@@ -15,6 +15,8 @@\n #include <time.h>\n \n #define PROGRESS_PRINT_STEP_BYTES (10 * 1024)\n+/* Max time to wait for first data packet from server */\n+#define NO_RSP_TIMEOUT_MS 10000\n \n enum done_state {\n \tNOT_DONE = 0,\n@@ -106,6 +108,17 @@ static const struct tftp_context tftp_context = {\n \ttftp_error\n };\n \n+static void no_response(void *arg)\n+{\n+\tstruct tftp_ctx *ctx = (struct tftp_ctx *)arg;\n+\n+\tif (ctx->size)\n+\t\treturn;\n+\n+\tprintf(\"Timeout!\\n\");\n+\tctx->done = FAILURE;\n+}\n+\n static int tftp_loop(struct udevice *udev, ulong addr, char *fname,\n \t\t ip_addr_t srvip, uint16_t srvport)\n {\n@@ -150,6 +163,7 @@ static int tftp_loop(struct udevice *udev, ulong addr, char *fname,\n \t\treturn -1;\n \t}\n \n+\tsys_timeout(NO_RSP_TIMEOUT_MS, no_response, &ctx);\n \twhile (!ctx.done) {\n \t\tnet_lwip_rx(udev, netif);\n \t\tsys_check_timeouts();\n@@ -159,6 +173,7 @@ static int tftp_loop(struct udevice *udev, ulong addr, char *fname,\n \t\t\tbreak;\n \t\t}\n \t}\n+\tsys_untimeout(no_response, (void *)&ctx);\n \n \ttftp_cleanup();\n \n", "prefixes": [] }