From patchwork Tue Apr 15 21:17:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 881387 Delivered-To: patch@linaro.org Received: by 2002:adf:f902:0:b0:38f:210b:807b with SMTP id b2csp665111wrr; Tue, 15 Apr 2025 14:18:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXa7Sr+BTmdRVuMGZo2aoAM3eeuGuJDhcKldjr3tZovcTH3+mbyrtqnCTDsSLtaPC7iVHEnMA==@linaro.org X-Google-Smtp-Source: AGHT+IGYMVhEDrcLhNZjnByCxNbb3jB38LLvmLbLx1IQWRQCh/rHW7wN3xcMhqf3Ht6Zr1bwMBif X-Received: by 2002:a05:6102:5c14:b0:4bd:39c7:804d with SMTP id ada2fe7eead31-4cb516152e0mr1012110137.0.1744751915800; Tue, 15 Apr 2025 14:18:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1744751915; cv=none; d=google.com; s=arc-20240605; b=gxDpcpPSt2w9krb6XEtTXzxmmhrDbJrQMRoXXrpvtNDdax+iyUucQR0dYOrvnhz2Ek qV4OjeZGuOGZcr32xUJM35xinpzbH0NTkLmiroyAlVzNCbzfOZJkJYFAIhSu/CjlBXvJ 3ZGqFQVab1AWxp9lKXUutVfC40fFDqp0VC/A2UpfeZ9YehQ5z6R9E+WwtgTI9GhRE3ZJ Y7qX6xeZIcP2Og2e/mjAKI5oviteFRBDLykaZVgqANyBFjA+kXcV0FQuS1JJP6FsUlkH kfRU2/VMm+fFx0uWKWAp3/qKi+1V0ay8xN5yioSfCfGvMwQ2Ir/beooe6fYjgF0Ro9i9 e3+w== 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=98aEjzoxoMJoGkG7Yru4U6Ly1/QE8ScrxPks+qRCVTQ=; fh=Qza+R7BrEXS6X0OHzWCqsrwh80uIRt8eyRa5IirshgE=; b=QJcqcc/GiCs4KQI9bLeARfJDFgbMlrquCFc87BA8zOBHKlyDssQ6km7LaacevnecbN y14XGQb5ddjOPkztNW6PvZI9QKkwr8BIoreD9QnK78fws2C6rX4CJl+2kfbvgi4nlP8I YSkxHUhaLHZMBzqe4IfghLHuj4MHSjjV9nOi4h1ex9/W6/ywjC/kA60QXDcwfQ38dtjN IAvt6Ett3tq1LUrWUoRcO+MCmExEI0/HCqL7NgqNrhbLWuLMkVomBt4ZnCSwmr2bLBX5 aAci1TGmU8EbEnH1c+tw+8GhXImA8Ana1C0LkD4FmuTFVu3FvnuWA19OivjIGBkTLmQ8 xYvw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NlxMPq7Z; 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 ada2fe7eead31-4c9c992157esi4939140137.688.2025.04.15.14.18.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Apr 2025 14:18:35 -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=NlxMPq7Z; 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 E011181F7E; Tue, 15 Apr 2025 23:18:33 +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="NlxMPq7Z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 79E06808AF; Tue, 15 Apr 2025 23:18:32 +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-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (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 4E9A5808AF for ; Tue, 15 Apr 2025 23:18:30 +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-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-43cf034d4abso66316525e9.3 for ; Tue, 15 Apr 2025 14:18:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1744751909; x=1745356709; 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=98aEjzoxoMJoGkG7Yru4U6Ly1/QE8ScrxPks+qRCVTQ=; b=NlxMPq7ZMQo/OY5slt0pCVs6v0X+jGvZc77AO0AjyVGj0yz0W8oAIQ48Vc6mU0eIqj KoIAQXrhHkB9zLM1r5zbApKx/Em6xhRoeIakhLcLv/+YBYKaDlyRtFPzjlIYRiE5KuZ6 SrmtK0/wAuVdYQIaZdUwq9U8h9icXQLYd3N30y1+KGY7WtjNvNbo7OTmMueWNtCrKD4N gyIbLcABUK1ntmUMi54cbUSIwUyRy7j/i2CPLlwpqzMeLVc83CDE7teb+M4LubvSsa++ P0vUs5Y3r1a6ZYu1kQpMlIIzEvViKTs1fBMgkLRycgAtz0aqoyQAosehA8e6IfIDYtqr kA+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744751909; x=1745356709; 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=98aEjzoxoMJoGkG7Yru4U6Ly1/QE8ScrxPks+qRCVTQ=; b=Gnd21nG7ZGuGHmjJILjrxWhtO/rOegntR8BRpcLvDYN5gXzTjYtx0OxzHieXbJJKpT kuP6fK/Q7gnCfOrtUbDHt3dhSKIrhQUEG8PrwtKpPl6Yjf5D2pDS/Mpsnvkf5ld1Sd0Q BR/xNgjoh6U06Ymt+Qc8NtuseBOFbQLp+iM/noJvkkLNMdV/sM9mlXWWkQzOR9LQR0cB XEIPmdXWpMRJXt+ZEDmbGCAGDD2cKzluCZc7cLcANNw0P7EhdbDfdCtgi5EOXRefTgg+ ynj7EixzrXjQajjqd+x+ROnZc/hSTrLMGVanUQz5HD21BXgdrD9+RaHrZ+fO9tMxBPs+ 0UXA== X-Gm-Message-State: AOJu0YzTY6f6TX5r0bDruaxX4Wmd9/3Zo6bydtL3ZFH4Rm9GHdccwC0S RKjOHI//PwC/HH+gEPOdhmU7LTVuW3uZqoSD53iY6+Am7UnWWjcoJNQhHGQUoq++Y60jHI4d5FY Rl4o= X-Gm-Gg: ASbGncu4ht6dcsyz3sKFVUYuzBCeja/cp2mJDHaQL+N/4ARPFKSgip5ge0pneeMbs22 FFkmSjOj2TivtjIpPXdeaVGA6evpgyTCiIorKXv4PXkaiHz9H8HcJBhF63bbzMnzc0C4DMBun/I 7X4noknbms+/FAtC7Hpu0rUj6IGYv74+2Q9ugEUlKTfXs6vbDJ4aCguHVc4+Fo4/U6cANW3Zr6G y/QuKnj+D4imU5XFaWf5d42C27pnSaCm/9rn8GG7+jzXl6TvlCrPvO7jcv6wJncZI+/pf0P6sH0 81GaMJW7xPT+4tdu5mYsxrf1kEv5+xM4zcj/ECRWaiLKtKWr X-Received: by 2002:a05:6000:381:b0:391:4052:a232 with SMTP id ffacd0b85a97d-39ee276fd0fmr643496f8f.55.1744751909554; Tue, 15 Apr 2025 14:18:29 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:6ebc:6ce:770e:95f9]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39eaf43cce3sm15530917f8f.74.2025.04.15.14.18.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Apr 2025 14:18:29 -0700 (PDT) From: Jerome Forissier To: U-Boot mailing list Cc: Jerome Forissier , Adriano Cordova , Boon Khai Ng , Christophe ROULLIER , Hanyuan Zhao , Heinrich Schuchardt , Ilias Apalodimas , Jiaxun Yang , Joe Hershberger , Marek Vasut , Marek Vasut , Mario Six , Markus Gothe , Mikhail Kshevetskiy , Patrick Rudolph , Philip Oberfichtner , Ramon Fried , Robert Marko , Romain Naour , Simon Glass , Svyatoslav Ryhel , Tom Rini , Weijie Gao Subject: [PATCH v2 00/11] lwIP sandbox tests Date: Tue, 15 Apr 2025 23:17:35 +0200 Message-ID: <20250415211819.1254435-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 ** Note ** I am resending essentially to have Simon's R-b tag on all commits in patchwork; no review requested. Sorry for the noise. This series enables most of the driver model tests for network features with NET_LWIP (test/dm/eth.c and test/dm/dsa.c). - Patches 1-4 fix a few bugs (device selection) and add missing features (sandbox timer, restart support) to NET_LWIP - Patch 5 decouples the sandbox ethernet driver from NET - Patch 6 adds missing static IP addresses that NET_LWIP needs - Patches 7 and 8 update the tests to use a common interface to send ICMP packets (do_ping(...) instead of net_loop(PING)) - Patch 9 enables DM_DSA and the associated tests with NET_LWIP - Patch 10 adds a sandbox64 configuration with NET_LWIP=y - Patch 11 adds that configuration to the CI Changes in v2: - Rebase on master and therefore drop patch "net: lwip: do_ping() should return CMD_RET_FAILURE when no device" which is merged already - Apply Simon's Reviewed-by: tag to each and every commit Jerome Forissier (11): net: lwip: fix initialization sequence before a command net: lwip: provide net_start_again() net: lwip: add restart support to ping net: lwip: use timer_early_get_count() when CONFIG_SANDBOX_TIMER=y drivers: net: sandbox: add support for NET_LWIP sandbox: provide static IP addresses for eth{2,3,5,6,7} net: ping: make do_ping() available via test: dm: eth, dsa: update tests for NET_LWIP net: lwip: allow DM_DSA=y when NET_LWIP=y configs: add sandbox64_lwip_defconfig CI: add sandbox64_lwip .azure-pipelines.yml | 2 + .gitlab-ci.yml | 11 ++ board/sandbox/sandbox.env | 5 + cmd/net.c | 3 +- configs/sandbox64_lwip_defconfig | 5 + drivers/net/Kconfig | 14 +- drivers/net/Makefile | 1 - drivers/net/sandbox-lwip.c | 85 ----------- drivers/net/sandbox.c | 240 ++++++++++++++++++++----------- include/net-common.h | 15 ++ include/net-legacy.h | 3 - include/net-lwip.h | 10 +- net/Makefile | 2 +- net/lwip/dhcp.c | 3 +- net/lwip/dns.c | 3 +- net/lwip/net-lwip.c | 86 +++++++++-- net/lwip/ping.c | 11 +- net/lwip/tftp.c | 5 +- net/lwip/wget.c | 6 +- test/dm/Makefile | 2 - test/dm/dsa.c | 8 +- test/dm/eth.c | 77 +++++----- 22 files changed, 350 insertions(+), 247 deletions(-) create mode 100644 configs/sandbox64_lwip_defconfig delete mode 100644 drivers/net/sandbox-lwip.c