Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2118720/?format=api
{ "id": 2118720, "url": "http://patchwork.ozlabs.org/api/patches/2118720/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20250804125105.1672039-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": "<20250804125105.1672039-1-jerome.forissier@linaro.org>", "list_archive_url": null, "date": "2025-08-04T12:51:01", "name": "net: lwip: ping: set net_try_count to 1", "commit_ref": "90c05f68fcab57d669233033d34e52b8d55d57dd", "pull_url": null, "state": "accepted", "archived": false, "hash": "1d0cf2e2c79cd7d8fe34bfd1aa8b70d8da91e983", "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/20250804125105.1672039-1-jerome.forissier@linaro.org/mbox/", "series": [ { "id": 467779, "url": "http://patchwork.ozlabs.org/api/series/467779/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=467779", "date": "2025-08-04T12:51:01", "name": "net: lwip: ping: set net_try_count to 1", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/467779/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2118720/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2118720/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=Dhu1vIiH;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; 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=\"Dhu1vIiH\";\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 [85.214.62.61])\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 4bwbyz4kksz1xpj\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 4 Aug 2025 22:51:23 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id A01B283E18;\n\tMon, 4 Aug 2025 14:51:28 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 94FAE83F42; Mon, 4 Aug 2025 14:51:27 +0200 (CEST)", "from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com\n [IPv6:2a00:1450:4864:20::32b])\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 1576583E04\n for <u-boot@lists.denx.de>; Mon, 4 Aug 2025 14:51:25 +0200 (CEST)", "by mail-wm1-x32b.google.com with SMTP id\n 5b1f17b1804b1-45994a72356so11207535e9.0\n for <u-boot@lists.denx.de>; Mon, 04 Aug 2025 05:51:25 -0700 (PDT)", "from builder.. ([2a01:e0a:3cb:7bb0:d5b5:4194:ffa5:27f1])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-3b79c3ad803sm15391058f8f.6.2025.08.04.05.51.23\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 04 Aug 2025 05:51:23 -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=1754311884; x=1754916684; 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=pba1Jle9Vkm6yQmsiD5vif51gvj4WldLhrjFF1q9Qs4=;\n b=Dhu1vIiHcHAGylGNR3gR9qQLNi6RP8PM0K2sJzl9giiOthdHFJvZv8+4UHzkWHxCq5\n 07D5DV5aFLgMw8LUTd0pQ7fz0bY8PmlbWMJQteRwUtUn7HwU5wvXcJQB60Dest1ea8AH\n VPY953DOTlHzQQ8pnpps7ZYk6JWG5fessbqbHfl+A2IIoXWfbObrdibJyuE5LMmGAcdl\n 0g1bLAEoCkeSqRcxV2IXAPsO62y1Agyk0qBH+9mkI7Ix//OYvUh9WAjjpYdOaGzY+Mh9\n CxxzovqOW64RFPsJ8oMAejPCceJNvfQcy0In2wYsbZT3egZgvMzxZ3opizv/RYSCbyTg\n uCwA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1754311884; x=1754916684;\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=pba1Jle9Vkm6yQmsiD5vif51gvj4WldLhrjFF1q9Qs4=;\n b=NvQhGTIpUjwM30Zio9YO5Af898iIqKUeW94tqk5fGdEEhYFmJ62EYpIgifCMwt/0DW\n bCnUwkT2SmAggqPxrAWLw6lljn6CthX7CgsUZ/0mf8Ig6Dx8aHf6rcXZY+xwXsslKx8P\n TuT7GZSdljvCn/QGI56X+TDjZipaGC4Ho5X6n5kuIF6eTdzZJ1W1b+2tEN/pbDTxc25Q\n WYR22fLnuHors1Sbc1uawf8u3uTiaXa7AEEY4Q8FCSfclgyEPF0J2c+CFYFvJlm4q29X\n +ZffzdshPlgldlcQmVaFKqfjSrgY1TiB6gzQGrMKW/cCUg5eIBDx20vdd/msNfUWQhJt\n rigg==", "X-Gm-Message-State": "AOJu0Yy2sxiGQane6ysh70YApX0PQEku2TpEYThfZEnt0BZOKWiG/zEP\n QrRPorrhWgQ7w0XmG+9pTH/sWDGZynCTuP6YgDJtpEDmEGO724Y76uUqq4jQGHFfDxtr0U3wHT0\n 9yP7FFmV9GQ==", "X-Gm-Gg": "ASbGncu1LtRs/37SQ5kjkIVshAehJvWAJssLPZO6mmO36nNwYrjMQYjTJScAesjzqup\n 2cO40uSDDaOKU6MPNj0nG/FZwhStQ+ORuCiMXNprUucJp6A5cvEHUsZEXSWbmuz7MKy1OiRArYk\n v03E/MIGkU5MDNWPnuydyNBweEUyJIfz3yOwt7wiQUG9N74xJnWpWpzgt0aSW+2q61N89Et5cq4\n CnrSwh9uZOVe4IE15cahiN3Ouw2Hkjwg/RFV5FvVguY7T1dv2WURz4JusjX2/G9VKuvwvHS7OY4\n 2suObNkZvCrdZi6ohzHZCBdWDaeWmWduhzt0D8L2lb4ZHTE6k8RdN0EAyFl6kge/EVxoBKuETIy\n 7wc5K6JO5G6WRDi2PyNi/d+EI6YOc3QqehDElGH2T6g==", "X-Google-Smtp-Source": "\n AGHT+IHa4GOOnDZq8JdN8MxE433mP2obpaS+aQXFgsSBJhRLeRiVKtQTDfaULnVzSTA0DT57I2wVIw==", "X-Received": "by 2002:a05:600c:858c:b0:456:1d06:f37d with SMTP id\n 5b1f17b1804b1-458a24321femr107142335e9.16.1754311884207;\n Mon, 04 Aug 2025 05:51:24 -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 Adriano Cordova <adrianox@gmail.com>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Joe Hershberger <joe.hershberger@ni.com>,\n Martyn Welch <martyn.welch@collabora.com>,\n Ramon Fried <rfried.dev@gmail.com>, Simon Glass <sjg@chromium.org>,\n Tim Harvey <tharvey@gateworks.com>, Tom Rini <trini@konsulko.com>", "Subject": "[PATCH] net: lwip: ping: set net_try_count to 1", "Date": "Mon, 4 Aug 2025 14:51:01 +0200", "Message-ID": "<20250804125105.1672039-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": "The legacy network stack sets net_try_count to 1 at the beginning of the\nnet_loop() function. This is required for net_start_again() to work\nproperly. Therefore, set the variable accordingly in the do_ping()\nfunction when NET_LWIP=y. This fixes an issue where a ping to an\nunreachable destination would run twice on the same network device. For\nexample with qemu_arm64_lwip_defconfig:\n\n => dhcp\n DHCP client bound to address 10.0.2.15 (3 ms)\n => ping 10.0.0.1\n Using virtio-net#32 device\n ping failed; host 10.0.0.1 is not alive\n Using virtio-net#32 device\n ping failed; host 10.0.0.1 is not alive\n => QEMU: Terminated\n\nSigned-off-by: Jerome Forissier <jerome.forissier@linaro.org>\n---\n\n cmd/lwip/ping.c | 1 +\n include/net-lwip.h | 2 ++\n net/lwip/net-lwip.c | 2 +-\n 3 files changed, 4 insertions(+), 1 deletion(-)", "diff": "diff --git a/cmd/lwip/ping.c b/cmd/lwip/ping.c\nindex 87f8e958e48..6d090fc530d 100644\n--- a/cmd/lwip/ping.c\n+++ b/cmd/lwip/ping.c\n@@ -170,6 +170,7 @@ int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])\n \tif (net_lwip_dns_resolve(argv[1], &addr))\n \t\treturn CMD_RET_USAGE;\n \n+\tnet_try_count = 1;\n restart:\n \tif (net_lwip_eth_start() < 0 || ping_loop(eth_get_dev(), &addr) < 0) {\n \t\tif (net_start_again() == 0)\ndiff --git a/include/net-lwip.h b/include/net-lwip.h\nindex f54f23471f1..e88e2186635 100644\n--- a/include/net-lwip.h\n+++ b/include/net-lwip.h\n@@ -18,6 +18,8 @@ extern size_t cacert_size;\n extern enum auth_mode cacert_auth_mode;\n extern bool cacert_initialized;\n \n+extern int net_try_count;\n+\n int set_cacert_builtin(void);\n \n enum proto_t {\ndiff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c\nindex 660ceb10cbe..fda14539455 100644\n--- a/net/lwip/net-lwip.c\n+++ b/net/lwip/net-lwip.c\n@@ -27,7 +27,7 @@\n #if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER)\n void (*push_packet)(void *, int len) = 0;\n #endif\n-static int net_try_count;\n+int net_try_count;\n static int net_restarted;\n int net_restart_wrap;\n static uchar net_pkt_buf[(PKTBUFSRX) * PKTSIZE_ALIGN + PKTALIGN];\n", "prefixes": [] }