From patchwork Fri Mar 14 21:55:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 873472 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp936518wrq; Fri, 14 Mar 2025 14:55:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWF4T/vuCDZ6M6OnoJ+P8xB8f39fqmkWTSi8yskSkVJ3ZF9ofc8/NOoN1rIYMkrsJJZ5lB2YQ==@linaro.org X-Google-Smtp-Source: AGHT+IE7KHe6f1M/eZrqxnJHKMVx9gZAwVX3DGE/L9yfdIspDIPV8WY2U88BvYOQMBeBTRdutHpv X-Received: by 2002:a17:906:3710:b0:ac3:413a:b17d with SMTP id a640c23a62f3a-ac3413ab213mr204320166b.17.1741989349844; Fri, 14 Mar 2025 14:55:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741989349; cv=none; d=google.com; s=arc-20240605; b=eI6KBhIHwj/dkNPXnqAYkaVll6ftGfryg2fy2ATWrNq7PL6bk0nzw5RIB2WXC1a5ao G3ww6CtrIHxt6oNqKjBJ4edd03zeZy1Yk6fKFVEVODuOHHpcVE0duy6661jeMh81Z74l 2A/2APNE2PQf+4x7ppRBv5MHfHyFNS5bddnaNyG7erlIvrKwIypwwUvuAGaV5xPqRzBy Nf3IhKyTGQ948gdT6DI5KdGI7QwSuwL5d1cqresjtrujxyQbntLZFGlN60COQ6VKXiFD 23pxaqcNcvvqCQsAbZ4PwJFkariPnRZVs3/B6+ZgsccC0mvlPV2gHyWsbveHjWLSurlj boxg== 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=zsjXFDRS2kqtQzH+Ub/djx9Un2Dl63XcWyL/JX9cgDc=; fh=h6aAVEeZBlEjv+vPa+An2K+XRkhpZcjcZcS2M4TGdaU=; b=fDZFR5Md0Y1Ff3kFAKH2JNqVfuNWR2qyikrvhSmQQODJ+6PPd09QhcbiVFUeivQOt8 KhXkfBljSuoUOqBqwlkP5eMp4u1JNrR8hi1EHkLpLaXU6RHpDwhbbg+oG2X1om92X1m6 THbvSQxRKahykzfsPlcyi6z3MJqVFAI0yBbduxez/FIdQPrXGPvxRnBUcPigPl5xlVqO hhvJsDk0hjqiMHApfnkZ254a5a0DvLSmOgnzRqVw+S6zwQ3t2Uq8LCGxD/uCayt3xh0g KSyGiXcAAO3MCNG/xl6XJOmW0ZKwEbbO+2IBaOXK4DkzzT610Itqeszuu6tPPaPBdU47 9Npw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bb8csBbN; 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 a640c23a62f3a-ac314a49d1dsi380014466b.392.2025.03.14.14.55.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:55:49 -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=bb8csBbN; 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 97DB881F32; Fri, 14 Mar 2025 22:55:48 +0100 (CET) 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="bb8csBbN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4CF8481FC7; Fri, 14 Mar 2025 22:55:48 +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, 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-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (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 28FFB81F0B for ; Fri, 14 Mar 2025 22:55:46 +0100 (CET) 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-x32a.google.com with SMTP id 5b1f17b1804b1-43cfa7e7f54so985215e9.1 for ; Fri, 14 Mar 2025 14:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741989345; x=1742594145; 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=zsjXFDRS2kqtQzH+Ub/djx9Un2Dl63XcWyL/JX9cgDc=; b=bb8csBbN2Dd4K29EELAdvYMybkyrG0m5xF1kn9g3iuxuKb0IN+sLEypOIgIpE8CvdT CU1VbePhOZl/0K3omXUJAZv6zzGctSfzpUnVc7T5ltW6iZgP+NLkT/KYJuC6MDyBM/06 rIebErfp0ZIY898AsZrCd+OBLbIgZYeaUoEmSGw9ywDXvbVxbk3jukLlFIo7sOeKMW1d gjJ8si17ioQQqIJtsQj19maRiiUY1Wh7CX2O9I/YmDK097nXb5+9oPAdhD7JymNBwZz9 cE5d1AxXJircqapcR7b4jMAPOM1rlyyhvZzSnt+uiQwPowZzHlFILiddd7LksN5ZRIqG qxrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741989345; x=1742594145; 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=zsjXFDRS2kqtQzH+Ub/djx9Un2Dl63XcWyL/JX9cgDc=; b=MdDimuUKPx69yDnqO/BTsB0HS86JW6wmmM5ocodSnMKuGrNZca5DP3Yz1mhgfzaVFY piroCn6bNhQKIsSt1LVpjDPrlCSR7+MtJDCOtSElBF23YsIzieWXypep/XdotAmdVMF4 aONlcud347EvOKZNr4CtOsA2gUkKNr/E0DUSIELSLDrWw2wBtU+PKJV3W4M8oqvc5ucw VWlceDnVAyJv8Q1RUNtQt9+Y+DzRerCghLyBVr+Xq2Y1DeJxidAt5ZXFQPbd16GGVPLO vIoeSKfoSCY2/PMxjQSbkKIq5CRaJFCs4QR9M+4tPaITMOREI1EPh66Tuxa3xohaa+xU 17IA== X-Gm-Message-State: AOJu0YwUyraaCjn1VW98cEN3aG7E5LEuWrdHgIXWM7uFkO6u2F25t2vi kh37La65vHtWxLXvMkQGqtr7w1LoT8EkCUAnhmi+sftsHGMAp7lE+UqHyFZdkwJzMc2yacmILfC BCig= X-Gm-Gg: ASbGncvcD2RjD+6Trp6Mk1Ab/shKplJS4kV0KpEYx0cW1gS/SV6a3AXLpEDEaJ6/SYz thpYxx2niACNmVzkk6Bm1mCtl0EHrQ7f2QALXyxLNUZbmfMQ7kTwwYaz+dl9+Q9y8Qpe4Rb43Mq D8XmWVAC4SUI9w8jK8Rq5iMmWb60Q7DRJ1RdgAfe0LLgFsjnQQNXRdSwub7ah5Q8Tz7rmeN/h3r yyI3twfk4J3YRTtXU4/mqWCVHvdgteAPHpmImxTEmGmtxkW4IWs4x/w74Zdee1dLaDesDIG1Lk7 wcltQJ3PL5/N9uKAQPKNppGPHfpQ9S93/Hm0vInTtZ7VixreMwOKgA== X-Received: by 2002:a05:600c:3591:b0:439:8878:5029 with SMTP id 5b1f17b1804b1-43d1f1d26cdmr53139105e9.2.1741989345332; Fri, 14 Mar 2025 14:55:45 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:5485:bb38:c353:6b0c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d1fe05ff4sm29064395e9.10.2025.03.14.14.55.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:55:45 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Jerome Forissier Subject: [PATCH 00/12] lwIP sandbox tests Date: Fri, 14 Mar 2025 22:55:02 +0100 Message-ID: <20250314215525.579655-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 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-5 fix a few bugs (device selection) and add missing features (sandbox timer, restart support) to NET_LWIP - Patch 6 decouples the sandbox ethernet driver from NET - Patch 7 adds missing static IP addresses that NET_LWIP needs - Patches 8 and 9 update the tests to use a common interface to send ICMP packets (do_ping(...) instead of net_loop(PING)) - Patch 10 enables DM_DSA and the associated tests with NET_LWIP - Patch 11 adds a sandbox64 configuration with NET_LWIP=y - Patch 12 adds that configuration to the CI Jerome Forissier (12): net: lwip: do_ping() should return CMD_RET_FAILURE when no device 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 | 13 +- 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, 351 insertions(+), 248 deletions(-) create mode 100644 configs/sandbox64_lwip_defconfig delete mode 100644 drivers/net/sandbox-lwip.c