From patchwork Thu Apr 10 15:14:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 879754 Delivered-To: patch@linaro.org Received: by 2002:a5d:4882:0:b0:38f:210b:807b with SMTP id g2csp305190wrq; Thu, 10 Apr 2025 08:16:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX/wTdSO2gFUW1URjTPnoVrAQEFy5uAFd0JSXwtlBqbhPVinaxxTAyp8yh0oyo9OJCSiGVz7g==@linaro.org X-Google-Smtp-Source: AGHT+IF5sd9B+e1L7kwR9B6J4VXDMADjK7DheQpuaYkXoehNLwNHxF81luqxuhxQ8vM0KjPntyDy X-Received: by 2002:a05:620a:4515:b0:7c5:6b46:e1ee with SMTP id af79cd13be357-7c7a764cb6bmr462231085a.4.1744298179662; Thu, 10 Apr 2025 08:16:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1744298179; cv=none; d=google.com; s=arc-20240605; b=Ou3Y3m+Gg3ujrof5NNUYSR38dnSurdQL/aOUMKW7QaBliwRf+q9vVMben80ftq3Ia5 b1hBT/lBBwOn4DJCB8YJ8rnchjZI/B2DcxJYgDu5Aul/SWJmySzNvhC+I6+fVuBtgPLL C41NC+njGeK+6o4XU2v/VSf3VFia9UJ235F8h565acV/dqmFLL9ZY4tYdBKWJX8DWktn b6HLu69KiHwlT4bnPx9jxvAh7lcM+eQ7GTTpDXqlgSMSmtaG5IgrBszmzf+H5AFf5Nfz YsnpkL8MP1nzqFPy4cjYrbNXJA50d3+j2l15YjBkJ3KnTzYrU3dNYkbqRjjVZCcJ0MQW Lr/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=dpBVgM+BmozE7pt5BcxPi5KLq2WzONKbbONruSns3ig=; fh=+TzJuMMnKDMsbGyXcXAynrdn4hYe+uVLmq5NLJkVciY=; b=QzAjw4la0uNnzRI9gQlIsVy+nJXfdSNTvKjWVNY7yAqnRtCNiUfbP1bZU+ZvYjdQLX wY3BoLRjRPROMfhIIPWwLnkDIp503b+LKC5wJR8ZCFuQvQvBmrI7+O99AvsUIsVViYsG DvF9/HOdfK1aQcaIqc7lHTnSUGJB+eKfhU7o/Ilv4wqqLT+TzAOVL+vn0mErL6Swivnj Hbg1IY1bEP/m677GDK1b8huWVrzOylHm49wlFgxRw3Y8erUGToTtBOYidxnLFXKGDigI Q+1jYNjaJQPTwoAbPKFH71pnNvA2/zORO23gIE9GV+1RwKV/HWhRhdtViihVCgAxk+re SWlg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KoJs35of; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a1e0cc1a2514c-87557175785si1095401241.80.2025.04.10.08.16.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Apr 2025 08:16:19 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KoJs35of; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2EB1683D2E; Thu, 10 Apr 2025 17:16:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="KoJs35of"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CF6FA83D3D; Thu, 10 Apr 2025 17:16:16 +0200 (CEST) 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, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3606083B8F for ; Thu, 10 Apr 2025 17:16:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jerome.forissier@linaro.org Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-39ac9aea656so868972f8f.3 for ; Thu, 10 Apr 2025 08:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1744298173; x=1744902973; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dpBVgM+BmozE7pt5BcxPi5KLq2WzONKbbONruSns3ig=; b=KoJs35ofifl5cN/UeHzhzs6fNERTT6x3eDFAhIth0v28hTFmmh9vqRJJAxW5khnmKp LTAzv5pX2VrkF0A1KWNL97UUjQflJLwft1BZ+phwv0xg8jaSdeVOsEtvDEWeujfg/ZnV orUVKKbn+kf5CaFfjuyZc5R0DYDj8cdADnI36puSJox8x+o8RDpEl42RIe47pgZNojcD c9CqoA3S5oBEUZSJWXF5dhrO1vPDn6TiG0Jg/RHFC5IrEzKQM6TSET7h4bUnfDB1Bafm sHUhJEsPFjPuCQGApghjJcXKYaQR2yFWb5VWEcYJL7+nu/dxEPKairGEll7e6SYP7Dhb 7hyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744298173; x=1744902973; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dpBVgM+BmozE7pt5BcxPi5KLq2WzONKbbONruSns3ig=; b=Glldm0pVq0r9ReaxmiFiyRHOevZNHZteE450vzFNSsEengW7Ti9I5Q4HqHTMnlmtxF I77VjK3REsbKPEIo8s8tzU3HGJs0xiFLT8ZuubFkrCgx6nQUU/YvZROCLp+wru5RuTny NMq2Dv6r2y+IEFruUs7ME3hAC3cXo6rWrW22XaJCkfLSgecieOKwSDu80Gu/gNRZEeZD qvcqjVkT0F7X9ksquo8V8OxZLrShA2j5E+zLX/FCulCUoO1chb95VuOL9yPD7+mer14j ervUAEgDBQjPRyndfaLTMLUHADajwlcow4dvUS9lhO20cy51SznYuWRqsCd1LKkrxOqq cHdw== X-Gm-Message-State: AOJu0YyR8Tn53TI1IWn3aTfy+PWIMIlWJZbFKyUFigRwu8Myb6EUhuht DyOrpqGpvjOwCc0Slr4hfCbzHknuW0qNGayCBMSliCmz4eaGyjNQj+fBY2QmFGDlylB78PTNn/P HU/M= X-Gm-Gg: ASbGnctn3BzD8neWyZrhc9nL+bN7KabcbexHvOVxAbrJPNhuEdRKvjco/rrBnsS9Gvp ezyyCevHW4n7TICYIGjYAPSjiRNHP+f2PO7BjHlHrdVwb5wOKgWp5Z6bepME/uHLxrt7lFdMTl7 Bg5ksQjQctx80dx2dqGns6Y5eFoudRbgHsaGWEUZaZIhTI5kxMYCaJkyOqPcOrByaWPsEAKPSnj lOmkd7k+uXYjNQciJpp5X3vbRJ6u/5EgJo/4U955hkqVVSSNaODA5w25IYs7NJwi6TCb3Jdgqjr KekhclhDf6w8CMzeDoNfeIGxDa1rhHe0FhpWckuwVVs3tYa+QA== X-Received: by 2002:a05:6000:40c9:b0:391:4559:876a with SMTP id ffacd0b85a97d-39d8fd8a19bmr2295319f8f.46.1744298173404; Thu, 10 Apr 2025 08:16:13 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:7edb:df05:a425:37cd]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43f233c824bsm54873225e9.24.2025.04.10.08.16.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Apr 2025 08:16:13 -0700 (PDT) From: Jerome Forissier To: U-Boot mailing list Cc: Jerome Forissier , Adriano Cordova , Heinrich Schuchardt , Ilias Apalodimas , Joe Hershberger , Ramon Fried , Simon Glass , Tom Rini Subject: [PATCH v3 0/3] NET_LWIP LMB fixes Date: Thu, 10 Apr 2025 17:14:51 +0200 Message-ID: <20250410151600.3370247-1-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Two small patches fixing issues with tftp and wget when the network stack is NET_LWIP and LMB is enabled. Changes in v3: - New patch: net-lwip: wget_do_request(): do not print anything to the console - store_block() [wget]: add Sphinx-like documentation - store_block() [wget]: do not print to the console if ctx->silent - store_block() [tftp]: add Sphinx-like documentation Changes in v2: - httpc_recv_cb(): add a call to altcp_abort(). Otherwise the transfer continues and we try to write later blocks which makes no sense if one has been rejected already. Thanks Sughosh G. for testing and reporting. Jerome Forissier (3): net-lwip: wget_do_request(): do not print anything to the console net-lwip: wget: add LMB and buffer checks net-lwip: tftp: add LMB and buffer checks net/lwip/tftp.c | 56 +++++++++++++++++++++++------ net/lwip/wget.c | 96 ++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 120 insertions(+), 32 deletions(-)