From patchwork Fri Mar 14 21:55:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 873473 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp936554wrq; Fri, 14 Mar 2025 14:55:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVTXkZUm8RCu1kWMvF1yI5g6Niw+ydCrwJ10EngWHbKjZiPPG63iZq8lFzLZiOMDSwpD6Vbkw==@linaro.org X-Google-Smtp-Source: AGHT+IH1/VaKSkkMy8ufvL+w4Z6V3XYPFpm+hHMkhDG4+mIFaNLLUWuat9GsnIXKG8hBkvuegKDU X-Received: by 2002:a17:907:928c:b0:ac2:c06:ad9d with SMTP id a640c23a62f3a-ac330175ec2mr512946366b.14.1741989358624; Fri, 14 Mar 2025 14:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741989358; cv=none; d=google.com; s=arc-20240605; b=fjtPefPXQ0ZKWJrkJwJOQlx018NSh8RYcqBggnpHcwa+5t1MzgTFARGvfjhn5+3beK FDT77ssZx0SHzzYbAYGi+sI6IDPqjrM0O9Gkq4wa6+6ALcLONtPjUKSTltSLNLOO+fv2 +em+pCGwJnMDyLxHli2SUm77iBHVDoD4gBo8emmM1zLWcMv2kbu/jx8XrHVC8QWEwKIJ +FT28vC/t8Wn9LFbfXPwSigvxQuYp5etj6/OrEhKP8csCY9uX9UPz4yYKWT1obJCNwJL hgPohReNGrsUouuV7puHEq/URXONDkVDudfMKRfbLwKrY0Yh2pU0sJvPFUfWcGzilRFF 13Ew== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MkEy+yYpDiWI1xn9Iqd6bWhKPoRVgufqD0gFZd7roZ8=; fh=OddbLhSOmySdyzKIXdEczbNoEC943ie3Te872v58/v8=; b=O2MCDaJKBL6iuUcN67mLHaXh2X0BIWa2PoI/HliWPTtbY1LRBJzp2wP+vWxh8SzE3x SVcpYoFGjzo2QhWaZBwAJWXUmLcE3Iw19QkFqSdbu+GVMVc1Critp+ivM8O+QRllkLOH DXO21tfxqoPg1eXHkRlIIwyWj5KGLzcAgEUkcf42YZk7S9hsz+pHQUkV5+L1GZ0TPOa9 rSlPIjAldAFkDtY8W+Nbk5QhDXVIStKE/ELI6W1tWZnAOmaghyLzNTKhIDAAxH173lgR 17cl26DXPETsA6GRzHUhIU6FaEwcqsa9tM6H8CCelncAWkSUKJVR5VBlFieNGpz14vTx DSww==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xC4vpx/V"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-ac3146ac95fsi381424166b.38.2025.03.14.14.55.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:55:58 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xC4vpx/V"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 DDC5681FC0; Fri, 14 Mar 2025 22:55:50 +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="xC4vpx/V"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4BC5682012; Fri, 14 Mar 2025 22:55:49 +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-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (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 511FE81F7E for ; Fri, 14 Mar 2025 22:55:47 +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-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3965c995151so1585216f8f.1 for ; Fri, 14 Mar 2025 14:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741989346; x=1742594146; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MkEy+yYpDiWI1xn9Iqd6bWhKPoRVgufqD0gFZd7roZ8=; b=xC4vpx/VGRhmPYcaAqrzEMvIvshOGTsD8YfSq5ZSyXmL2VJD69NVAREkgQPMrFhLUM yXpB7DQbgJLf0EbjsxSKZl1o1U0XWe5OAJnCjyQ137YhfcpXGRXeZzaaJFxRapoTIr6+ rs4isFP2MOlSUukCtgdLd8JS5ZV9kvo7q09i0BUwGrJnSZkZn/GK6WzxfmI0zw+7nrNL 61DeC1LfPpRknkOWwA9m4FB3jUY0AO3dUV5DJ+IdOIgjGLtEVfwQnnCuvOIWNFn0OLBX zzTK8grsvezKJ6OqAQEfuEzFyJaACMxrrYpBLNpeV3zTLAneUNeR+pood1TsxPVhHlwL MpZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741989346; x=1742594146; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MkEy+yYpDiWI1xn9Iqd6bWhKPoRVgufqD0gFZd7roZ8=; b=WwxzqGuzbXGFecjBsjRqbm2BDWx8173KtC6N2E5Hus/wO1r9YWslwV/7XBnWFBgHVh Oro3jNgaDTU+d/b9N+XQhD43xn6lfPRmOl7IpRk7d20p6zAGY4tBC+Z0/QXssTmEjtrP vWxgt83xzKbxO6CbEO4LlAwkf2Sv/zgwSMmEzEWwOLQxJVet52vOHvkuGDgpys6aM8zP yqFHZhCfoRz0nNYwnNmTtQR6LkWEmKnr7ZrCyrcAWUTMH35ma1j9Ys9TDlk0SQLU/lad n6Zsu8WUnjcYfZBtQeOSn4Uicb9KxU/J6haF7eWs+FqCgVN9bU9VjqFIQ/FFIY30jwLe +e2A== X-Gm-Message-State: AOJu0YwnsfgDGhU6ezeK5z2Won7Fz32aYQg8sdI9k6dy6UzkAP1ggMWb MbFfCDMjbmBxRiCHqZYUjUIXd5XaFPHgN/7f7zpJQCT9N3wS6XiK876d538sJmEWoR6u5y3xxHp LeJc= X-Gm-Gg: ASbGncvx+FqvVotD8X4M3THn+9Vwe0alnr8tXqZNMvt4JhkmJtyZaTxnVYwdaJQ8aYk zmOHcGOwoIQrz6qShzIBwz+R6SCwxqZdyEEjMntUMw4kAUn6xXHAQBxWBlVgHwrbIWUIAPuIxaH d3zRsquhaJVOFq79sZMh/1lCZHUhVdqKwCtr4NZrML5sRCQGWbirs2yr5wXjFZHvREUoF/6elXt jgl4V5pNyr2UIoBiLoite8sbbngaf5Up9rpo3lEi7kB+v+v2z+RXOaE7lVOo6vT8ZkClPkP3X73 mK+dGAKaCrJfivy/C/aC4wKJvTjXbEHTFAVgILyOXQg5RN6C75eo0Q== X-Received: by 2002:a5d:64a2:0:b0:38f:28dc:ec23 with SMTP id ffacd0b85a97d-3971d23799cmr5968286f8f.19.1741989346671; Fri, 14 Mar 2025 14:55:46 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:55:46 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini Subject: [PATCH 01/12] net: lwip: do_ping() should return CMD_RET_FAILURE when no device Date: Fri, 14 Mar 2025 22:55:03 +0100 Message-ID: <20250314215525.579655-2-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250314215525.579655-1-jerome.forissier@linaro.org> References: <20250314215525.579655-1-jerome.forissier@linaro.org> 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 do_ping() expects ping_loop() to return a negative value on error, so that it can propagate it to the caller as CMD_RET_FAILURE. This is not the case when no ethernet device is found, so fix that. Signed-off-by: Jerome Forissier Reviewed-by: Ilias Apalodimas --- net/lwip/ping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/lwip/ping.c b/net/lwip/ping.c index 200a702bbb5..c586a96806d 100644 --- a/net/lwip/ping.c +++ b/net/lwip/ping.c @@ -121,7 +121,7 @@ static int ping_loop(struct udevice *udev, const ip_addr_t *addr) netif = net_lwip_new_netif(udev); if (!netif) - return CMD_RET_FAILURE; + return -ENODEV; printf("Using %s device\n", udev->name); From patchwork Fri Mar 14 21:55:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 873474 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp936593wrq; Fri, 14 Mar 2025 14:56:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXYBfqBlgyR/nOEqBkqdmz/vLsNjovTQg4C3cGmWyLpT0T7F1sXGnOaDrrpU9RPqrROssUdfg==@linaro.org X-Google-Smtp-Source: AGHT+IFtIk4eX/87SMTRA80/CIpr5nDFE+Hhb5YpvHU/68s2lae3xdiuTW5BXotDHvHcw8ZBvKIV X-Received: by 2002:a05:6402:278a:b0:5e4:d192:2373 with SMTP id 4fb4d7f45d1cf-5e89fa26c49mr4474280a12.10.1741989369327; Fri, 14 Mar 2025 14:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741989369; cv=none; d=google.com; s=arc-20240605; b=ghVZxCzdGWW97k6gY5baaytEdk2/D2LpeFwr/ZvXKuHGzOsae97+2ULS9JlavMEE++ RAur9j9eNfQz9p1fPNZL3VnSt0N3clf4SlORzvJ5BM7cFsNOT6STe3kMbgBz2snCR3wB k3UYWhBnQuhY4yjhs4pmGIdoBYZk6c4UkS4+dLC3G59rQZvnam8GhFAlzjRUAJMNH61I fN4bHt0Qm6PHviizu1jCd3QVYn8jHrwUaTYgOCfgrMGgVQ0hYddvb7AV5r1AJoLjOQB0 7Fzw6paDWOYU34UtOCvFu60v6kpl837rcHYqdXhAzZLlBtgFACu9cHoIZlMyu2XE+edX 0QqA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rM8yyD7hLE0F63l8d+wL/RERC0XiFCUSmruDbI8tQhs=; fh=d9hib/SvymYSAHukfuA9RRy3TqTPCEz//tQ82o5IX70=; b=iuEWWf2Jp8352YV6H4kU4t8RQ2rz4Uygd8gPzwiJDNshdCbMYTaBx3uVsw+9pifoEh jGa5RHmW310UsWe9il7f1L1cb6IPmwLDiFRPjlnT/yMIpSa9/8ZSVr1l82vy6KdFJ1UG HKXqT6PBXMedpZtwkif/EBuxVrwGW+GFQ0U6XjFd+X5dG9iVdz+ApDBH1nIdKAcUYMSg npIqV0y2Cc1bgZ+stQd8kv8IUgT+ZkiL8Ydfp/KbPnVTUAmomnvxOzKCKQIcokeCnE5w nCrX2oPGZcEhu1tiCwrUxZj895m6O5P8noBl9Ls9bv9pWH4f0l1j5+iwZUvTFkg2tchi osBA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mn9Pz3+J; 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 4fb4d7f45d1cf-5e816b54949si3893996a12.416.2025.03.14.14.56.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:56:09 -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=mn9Pz3+J; 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 3B3D58206E; Fri, 14 Mar 2025 22:55:54 +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="mn9Pz3+J"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2209881F7E; Fri, 14 Mar 2025 22:55:53 +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-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 0C1508201E for ; Fri, 14 Mar 2025 22:55:51 +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-x32c.google.com with SMTP id 5b1f17b1804b1-43d0a5cfd7dso1299115e9.1 for ; Fri, 14 Mar 2025 14:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741989350; x=1742594150; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rM8yyD7hLE0F63l8d+wL/RERC0XiFCUSmruDbI8tQhs=; b=mn9Pz3+Jb2CzNRvVom5vGsMpYyTjCQvnmd0wHY6iawoe92oSAaGOytVE4Gd3XbAd/2 L65oP6GN+hJwZYSigdyLn/Ya/ZzqEZ4CJat140fInBjjFgOMTF0QVdBoVMWwU0GmsDN8 33LYECfstBUbKu8Skj8kcSNjb8Nmk8+lgtH3GNQ8XNsqednhWqG6zqc3qvSr6w1YX+mj fySFj0yJXOykHjsc5o6VcU9RXRwGcdgr2va9wJUeieRyl7NJtc25rwPYsm5+VPn4gejO Ly+nvnAr+fkWa+zGJK0KPlBdYAdQCErtUAPJxlx3PUN7frWpzm/El92YeSDJjEyVYc/O np2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741989350; x=1742594150; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rM8yyD7hLE0F63l8d+wL/RERC0XiFCUSmruDbI8tQhs=; b=OeYyMNUmbIo7pr4XRUIyIfOhHNa0o3vDcAs3UbU/fs97bEcUCgddaxBTL/cRBpmHgE 9Q7yxNKo0lBBtLyIykkvHiTadF/UN0uoUnychf7QZQY7dyqgdFl78LJmW0pJhwlb8RBX j+bHtRPJOuI/vxVn2QMfrfxcIT/o7jCxZ54PC9ZgC5QpPpdI831iFGo32QKySoyHNCwQ Am+V6blz/KUHkZED3Ti/f2t1LNFfRkkCkRlqJaT4+Aj5VaWvnJk0DwIJQaJurCQSVQJY HE1u+xpgMPDXeUWsPx/Z7bV68rdyPu6nYnz3kxksyb1C3ReEhfnWNrpZfsdMyuYhUu82 K/Iw== X-Gm-Message-State: AOJu0Yz3kK1dqd3baOmWQuPx5JjHCno0U7Dlq+6ElhwtdZjCleUJuOOy EBCqUbD1FDi9wtHIzJKTBk1MkRjOOfjTK/93fWXzXsNJfrrCdSjgUoMMVXidzFpm9dYByw/QHDn VrCs= X-Gm-Gg: ASbGnctkfNoH43LTpzw7c0e92iOozOf3sN7IjqI3VyZVcp3t5vB7ugIdn0MImx2SZrZ rUy64XcrIfnn8+OIqrQ44SWTUsW7Mdds74+VnvN+6kk81hr4l2aNCMUCtzO+g8iTw6WSbwCT7mC railqHW4HcWuIIOI15m6qEdLSGUdvQmqqus0E9PUJn1QY8iKS0/l6tcvWLin7lm4HcvhNi5PCAw iDJ8mAQSKpTOnN8bteXq6MPNAJF8TvoQ2/9zhapHZY+ThoYmvBwBCMsr7wS34pLgqNCPuUEtXft K+vuy985s2lE4htueXAHlfE5N8grAkZfguo0yFEcmaHGcnnWrw9Azw== X-Received: by 2002:a05:600c:4fcc:b0:43c:fab3:4fad with SMTP id 5b1f17b1804b1-43d1ec80ebcmr61793435e9.16.1741989350298; Fri, 14 Mar 2025 14:55:50 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:55:49 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Adriano Cordova , Heinrich Schuchardt , Simon Glass Subject: [PATCH 02/12] net: lwip: fix initialization sequence before a command Date: Fri, 14 Mar 2025 22:55:04 +0100 Message-ID: <20250314215525.579655-3-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250314215525.579655-1-jerome.forissier@linaro.org> References: <20250314215525.579655-1-jerome.forissier@linaro.org> 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 The things that are done prior to executing a network command with NET_LWIP are not consistent with what is done with NET. It impacts the selection of the current device, and more precisely if the active device is invalid NET would return an error while NET_LWIP would try to pick a new device. This incorrect behavior was detected thanks to the eth_rotate sandbox test (dm_test_eth_rotate()). Fix it by re-using a sequence similar to what NET has in net_loop(). This piece of code is inserted in a function called net_lwip_eth_start() renamed from net_lwip_eth_set_current(). Signed-off-by: Jerome Forissier --- include/net-lwip.h | 9 ++++++++- net/lwip/dhcp.c | 3 ++- net/lwip/dns.c | 3 ++- net/lwip/net-lwip.c | 40 +++++++++++++++++++++++++++++----------- net/lwip/ping.c | 3 ++- net/lwip/tftp.c | 5 ++++- net/lwip/wget.c | 6 +++++- 7 files changed, 52 insertions(+), 17 deletions(-) diff --git a/include/net-lwip.h b/include/net-lwip.h index 64e5c720560..0d3bb8a8bd8 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -10,7 +10,14 @@ enum proto_t { TFTPGET }; -void net_lwip_set_current(void); +static inline int eth_is_on_demand_init(void) +{ + return 1; +} + +int eth_init_state_only(void); /* Set active state */ + +int net_lwip_eth_start(void); struct netif *net_lwip_new_netif(struct udevice *udev); struct netif *net_lwip_new_netif_noip(struct udevice *udev); void net_lwip_remove_netif(struct netif *netif); diff --git a/net/lwip/dhcp.c b/net/lwip/dhcp.c index 3b7e4700c6e..92bd7067a7f 100644 --- a/net/lwip/dhcp.c +++ b/net/lwip/dhcp.c @@ -115,7 +115,8 @@ int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) int ret; struct udevice *dev; - net_lwip_set_current(); + if (net_lwip_eth_start() < 0) + return CMD_RET_FAILURE; dev = eth_get_dev(); if (!dev) { diff --git a/net/lwip/dns.c b/net/lwip/dns.c index 149bdb784dc..19172ac959a 100644 --- a/net/lwip/dns.c +++ b/net/lwip/dns.c @@ -121,7 +121,8 @@ int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) if (argc == 3) var = argv[2]; - net_lwip_set_current(); + if (net_lwip_eth_start() < 0) + return CMD_RET_FAILURE; return dns_loop(eth_get_dev(), name, var); } diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c index c00a7fe97cd..1e60fa31bfb 100644 --- a/net/lwip/net-lwip.c +++ b/net/lwip/net-lwip.c @@ -134,18 +134,27 @@ static int get_udev_ipv4_info(struct udevice *dev, ip4_addr_t *ip, return 0; } -/* Initialize the lwIP stack and the ethernet devices and set current device */ -void net_lwip_set_current(void) +/* + * Initialize the network stack if needed and start the current device if valid + */ +int net_lwip_eth_start(void) { - static bool init_done; + int ret; - if (!init_done) { - eth_init_rings(); - eth_init(); - lwip_init(); - init_done = true; + net_init(); + if (eth_is_on_demand_init()) { + eth_halt(); + eth_set_current(); + ret = eth_init(); + if (ret < 0) { + eth_halt(); + return ret; + } + } else { + eth_init_state_only(); } - eth_set_current(); + + return 0; } static struct netif *new_netif(struct udevice *udev, bool with_ip) @@ -224,11 +233,20 @@ void net_lwip_remove_netif(struct netif *netif) free(netif); } +/* + * Initialize the network buffers, an ethernet device, and the lwIP stack + * (once). + */ int net_init(void) { - eth_set_current(); + static bool init_done; - net_lwip_new_netif(eth_get_dev()); + if (!init_done) { + eth_init_rings(); + eth_init(); + lwip_init(); + init_done = true; + } return 0; } diff --git a/net/lwip/ping.c b/net/lwip/ping.c index c586a96806d..542ef2cb148 100644 --- a/net/lwip/ping.c +++ b/net/lwip/ping.c @@ -168,7 +168,8 @@ int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) if (!ipaddr_aton(argv[1], &addr)) return CMD_RET_USAGE; - net_lwip_set_current(); + if (net_lwip_eth_start() < 0) + return CMD_RET_FAILURE; if (ping_loop(eth_get_dev(), &addr) < 0) return CMD_RET_FAILURE; diff --git a/net/lwip/tftp.c b/net/lwip/tftp.c index 123d66b5dba..4f9b2049187 100644 --- a/net/lwip/tftp.c +++ b/net/lwip/tftp.c @@ -280,7 +280,10 @@ int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) goto out; } - net_lwip_set_current(); + if (net_lwip_eth_start() < 0) { + ret = CMD_RET_FAILURE; + goto out; + } if (tftp_loop(eth_get_dev(), laddr, fname, srvip, port) < 0) ret = CMD_RET_FAILURE; diff --git a/net/lwip/wget.c b/net/lwip/wget.c index ec098148835..a3b82908877 100644 --- a/net/lwip/wget.c +++ b/net/lwip/wget.c @@ -471,7 +471,11 @@ static int wget_loop(struct udevice *udev, ulong dst_addr, char *uri) int wget_do_request(ulong dst_addr, char *uri) { - net_lwip_set_current(); + int ret; + + ret = net_lwip_eth_start(); + if (ret < 0) + return ret; if (!wget_info) wget_info = &default_wget_info; From patchwork Fri Mar 14 21:55:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 873475 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp936663wrq; Fri, 14 Mar 2025 14:56:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXq3GCUNSJ7r3TScOrxlORbTX8QjNWqAAltthOa0QuZ2nCnJKv5VlBVkvjMlPkrltxbt3QWVw==@linaro.org X-Google-Smtp-Source: AGHT+IF6h6TBXV5rAg51F14cSv9D75/jUViMDoiIzwx1utzIBXl5ohhPZX6Mb9qqKttq7cYewhVS X-Received: by 2002:a50:99d1:0:b0:5e6:de5:312f with SMTP id 4fb4d7f45d1cf-5e8a0c14582mr3579796a12.23.1741989380257; Fri, 14 Mar 2025 14:56:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741989380; cv=none; d=google.com; s=arc-20240605; b=j4bcLdqpwJLVR+IXki20IDeRYdUWag6SvuiCnpUogRRFzxTlUPcmX+/1spGh0ky92g sUW/tL7cUGsok/xVEhTRwegMCckMSyoJR4AGuaJBF/ncq5bCHTk9kn7v0+NLHqoH1ieM JMylQbPGOr04icetRw9ijVlQXfk0MH/Ra6Ursa7OkrN7l/pdreCuI8mkSjtMvqHtiCTj iqfwXujosFgUZPw5GjFklBMtwMEa/YRaumzg/QcWPN/2/LKvHwoF0DdqiQ5OoTZKAhpL kYZkAM1hbwxvSkbUnFSIlZBz49FfmYB5L4xukpB4K8+KJ3v5rpNRM1JfVdL8FpCGvpvD xZTA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qQ58S4yr3/jWGDftx2dT9GQVf9dKPPP9jrjrxEj+Pw4=; fh=AWMzEuhuoem06h7FdNjvWoPkJjiuBCtTEMl6AFKNuXw=; b=BUyi900NrSvHQhljto+VwwhURSM45Nlzi18J1qvoD42P84Omk8V08Im+8VihjTK3Wx Sjmf5xM0S/MEvMedB6esrLpmEGwbYha8RM6CD6rLOODLgk8AfM+E/kWxShBZYWay4ehU uC14SvopWhz1xCZ1MjQBh0cjdI27ZWlBuKtr2zfMUR5vzVSZped5DX0m3UBlQzSYy7oG udtQjURS84HWeSY1GzWSgEIzf/ZzIyuy/yIlnRxzkEhPx0liO9F/2HpK1s6TxwzrcP/s nMDbgPraaNCbHpVHImc0O5Fdc2rWANC8n7i+2qc+fURy0dtS7Tuv01FJgbLPFljFifQ0 O7ww==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mDaMkbb3; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5e81697fe41si4148833a12.167.2025.03.14.14.56.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:56:20 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mDaMkbb3; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 82A338201E; Fri, 14 Mar 2025 22:55:57 +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="mDaMkbb3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B81BC81F0B; Fri, 14 Mar 2025 22:55:55 +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 A679282061 for ; Fri, 14 Mar 2025 22:55:53 +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-43cfdc2c8c9so972605e9.2 for ; Fri, 14 Mar 2025 14:55:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741989353; x=1742594153; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qQ58S4yr3/jWGDftx2dT9GQVf9dKPPP9jrjrxEj+Pw4=; b=mDaMkbb33255LQjwHxRTXuMbarYHMbq0l0meS7l0Pbjr4LcM2c5W0eSvXyicnbZ9MI yKFQokWAeIix2XKCVXrmTUWwwV9db3DiFiS3rts1ystsnAFyZMyaHZ3DjehbOrq6xL4D /9i82mQcOhlBlweycTHdT8/Ko+3N5JQdEI9f1aqba7Xv+f1mSLFty5TeWqJlj/o5c3Kw UD1Sq4UKwR2zRlZNlN3Yz5xlvjYQQCk95uLSqObjfrpYNzXfw245L5vG5MaRf9pUdodb +wna0hID65m+hwm3C2gd3p9fXbSLdKQ4LReuFgrSmyPrC5DpbX5rtUUTJw2t4TM8r9Kk 9R/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741989353; x=1742594153; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qQ58S4yr3/jWGDftx2dT9GQVf9dKPPP9jrjrxEj+Pw4=; b=YyQg5/KArN8ZETXfE+67PR+Xmkuh56/4DSNLN/5ktUnQmBbbUC2XBPqZ/8G7dw662k N3Zxf6nSGcBpMEgjmIMK9udwHH4OncjLct+z2ZfRc641UiElBdIO93V4i+qQxnS/hE1z PnnkO4NHMZgTftKMipKPYBewYZlFi6oB7EHLOA8XHUeTN7WPIHr+qCH53LhcEKopHlKC +bD6MWU55xOJ2NziN6L3HPEcFCaau6TEyMt5jHKhBUAHzIj7Kb9r2UPnlxUFjT01PlpD bglL877zKloLK/vL15uyXt84G+mhe0YOITuCwMx7iUNVCJWuWBQ132SX1+cH4zSqF4My afAQ== X-Gm-Message-State: AOJu0YycAwrz+yPzxisB6PRSsShLnOhAsrbbxtYRinAFSx/afqnE7ajA JdDWJcwUKJ0hmC2V8ITBYXfkKTeFg9aAd+aG0EjiBmu7x0RHv3Ssp23UGm3u+xUiB9QL2ZIFthN MzNM= X-Gm-Gg: ASbGncuEYw6nbGcthCFFB1HMbFuT1GDhy3O79TPCyl3eI+dNqnJ073mEH3l3QGBamvC jfNxsEpJVWEgdXtG7uB3Sa6BlMYXTj90+d0n3nuKhmhOtD++R8P2QypQUMqjJHNBAu3WOp14ZdP LTtmJs2/11AsAOsm9XjO4XdzBuNIijsCVbVt2NQPQBXhnXep2VBD4gLQHDhAXhlg56aZ5zrldbg FpRbFQu8CN+JJgeJW1/4nid4ndG5VXI+/hIy2qff4hY4thMGhYoxzJbYdN5qfJ0kplPBw7UThg/ 7ggdTrZconLAMi0A0Wm1IXoSzugsEmTm/p+FHB3MwklbXMnWd8ySJg== X-Received: by 2002:a5d:64e5:0:b0:391:496b:5646 with SMTP id ffacd0b85a97d-3971e2adae5mr4586741f8f.28.1741989352963; Fri, 14 Mar 2025 14:55:52 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:55:52 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Adriano Cordova , Heinrich Schuchardt , Simon Glass , Marek Vasut , Mikhail Kshevetskiy Subject: [PATCH 03/12] net: lwip: provide net_start_again() Date: Fri, 14 Mar 2025 22:55:05 +0100 Message-ID: <20250314215525.579655-4-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250314215525.579655-1-jerome.forissier@linaro.org> References: <20250314215525.579655-1-jerome.forissier@linaro.org> 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 Implement net_start_again() when NET_LWIP=y in a very similar way to NET. This will be used in a future commit to determine if a failed ping needs to be tried again on a different interface. Signed-off-by: Jerome Forissier --- include/net-common.h | 3 +++ include/net-legacy.h | 3 --- net/lwip/net-lwip.c | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/include/net-common.h b/include/net-common.h index 1d507b13b06..52c2a6ce027 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -471,6 +471,9 @@ static inline struct in_addr env_get_ip(char *var) int net_init(void); +/* Called when a network operation fails to know if it should be re-tried */ +int net_start_again(void); + /* NET compatibility */ enum proto_t; int net_loop(enum proto_t protocol); diff --git a/include/net-legacy.h b/include/net-legacy.h index bc0f0cde9fe..51780999a88 100644 --- a/include/net-legacy.h +++ b/include/net-legacy.h @@ -347,9 +347,6 @@ extern int net_ntp_time_offset; /* offset time from UTC */ int net_loop(enum proto_t); -/* Load failed. Start again. */ -int net_start_again(void); - /* Get size of the ethernet header when we send */ int net_eth_hdr_size(void); diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c index 1e60fa31bfb..5d862e038a9 100644 --- a/net/lwip/net-lwip.c +++ b/net/lwip/net-lwip.c @@ -21,6 +21,8 @@ #if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER) void (*push_packet)(void *, int len) = 0; #endif +static int net_try_count; +static int net_restarted; int net_restart_wrap; static uchar net_pkt_buf[(PKTBUFSRX) * PKTSIZE_ALIGN + PKTALIGN]; uchar *net_rx_packets[PKTBUFSRX]; @@ -339,3 +341,42 @@ u32_t sys_now(void) { return get_timer(0); } + +int net_start_again(void) +{ + char *nretry; + int retry_forever = 0; + unsigned long retrycnt = 0; + + nretry = env_get("netretry"); + if (nretry) { + if (!strcmp(nretry, "yes")) + retry_forever = 1; + else if (!strcmp(nretry, "no")) + retrycnt = 0; + else if (!strcmp(nretry, "once")) + retrycnt = 1; + else + retrycnt = simple_strtoul(nretry, NULL, 0); + } else { + retrycnt = 0; + retry_forever = 0; + } + + if ((!retry_forever) && (net_try_count > retrycnt)) { + eth_halt(); + /* + * We don't provide a way for the protocol to return an error, + * but this is almost always the reason. + */ + return -ETIMEDOUT; + } + + net_try_count++; + + eth_halt(); +#if !defined(CONFIG_NET_DO_NOT_TRY_ANOTHER) + eth_try_another(!net_restarted); +#endif + return eth_init(); +} From patchwork Fri Mar 14 21:55:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 873476 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp936698wrq; Fri, 14 Mar 2025 14:56:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVQrqdXAwoCSFOywylu6ZlYOGnqS5YdOtNJ6oufwaalg8UJe6OBdxhIdz25yLFBNcpKo9DWsQ==@linaro.org X-Google-Smtp-Source: AGHT+IFeHOT2Epuj8PWI0XKzB/6AVEYBRlccyEfWYG2vXKBS0/FWxVG1eZKeqPmIpBjyMlAaX488 X-Received: by 2002:a05:6402:234b:b0:5e6:17a4:29d2 with SMTP id 4fb4d7f45d1cf-5e89f54e171mr4653211a12.15.1741989391075; Fri, 14 Mar 2025 14:56:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741989391; cv=none; d=google.com; s=arc-20240605; b=CZc4fmx8e6a+kFK9z+vxyRIt61CwBjk9I+06hW+eG5TrQT5c5llUdXj5tnL5B83gc0 jRJ4glv361vKalQyS6toSoXUXiy6Yis2Xoq1/Zhij16cEy1tgRjB9IVjILVT3YRnrO/o MtsEWB8CR0DnL/IcDBPCfnkdVfXFh31+asCU3YEudt4gWj5qL7ayl9VWTeEhhJWH3cUg Q2AjSYH/76IZKTQrXbt5DyvUTGWXaxpljXZPmiNNkl06JOHlix2eFMOzlWrxq6j1PMxN 65XToEpw93ThsKHwjn4juCtx2XR5OwRod4RQycxJXNbNs3g00w5Zk2K++vmg3xJGXRPr /qNg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GMLWgywAHFcHbwiGXV5JqudcSZvy0UIXqie+KljbLV4=; fh=OddbLhSOmySdyzKIXdEczbNoEC943ie3Te872v58/v8=; b=HEf2ylwlUpRGa/y0LBQy1g+jWOLXV9pYsmQAoUGjZAoyyPLjrXYhCGpEwDoE519ZkG WuKPIPmhM2V3Uz+QwIGjcCO4s2U8ULLkORq9hwojdGUP4s2oxNYjijAvPLPM+leKuhqx XKhFvDG93Cm6HwaR/HwfAmU1p3sMxTMv267bF/8AHt33nAtN9vM/5V7PeOOEtZrYBI2O eKONmuEPrWnVeLpgXYyyNUuv3R7fsGvdQzF27eQuJNYLrlEdRKfq+oItEw2BWpUyu4qd c23T9Y6uBrB8VMG/28l1xd8cFmSiNBe0mQHRq6MKhxaDa2i9GbUItzuHEdIzbY+u+elX wY5w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hXGOru51; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5e816b7855csi3905414a12.498.2025.03.14.14.56.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:56:31 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hXGOru51; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 C93AB82051; Fri, 14 Mar 2025 22:55:58 +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="hXGOru51"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1D40382012; Fri, 14 Mar 2025 22:55:57 +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-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (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 2AC1482045 for ; Fri, 14 Mar 2025 22:55:55 +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-x32d.google.com with SMTP id 5b1f17b1804b1-43cfebc343dso1126585e9.2 for ; Fri, 14 Mar 2025 14:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741989354; x=1742594154; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GMLWgywAHFcHbwiGXV5JqudcSZvy0UIXqie+KljbLV4=; b=hXGOru51TAaHxzG2WYMgTZ3xolMEN12yC7Wf7+P4XHOKnAx7/PDw9Rkc1XL9rH5Vgs vX6Oj1xLIWlZtcmIzMAkaS1qInNapa1feQcvccyu9wXp8DJ8yPcgnU1p8W3nzApqGM9e 0jlWTyB7dD4BDL5FQC1QRskOJtLPDZ/T0xERUOTteFoY1XddV7d6o7QxS/Y7z3O/UxDK 4Xr1Fuxilqi+o+LL79lNza5xO1PUhMl7hm+UvDJZTO/Col7t24I8p/xSdpAsboOLasrc +HT1gPN+eQgwRWY/XphAGZGoCqdeUQf5bM7w161QM3bSvLqqgN/sMloyQp+wwT/VPUQa d0Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741989354; x=1742594154; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GMLWgywAHFcHbwiGXV5JqudcSZvy0UIXqie+KljbLV4=; b=P6Tojjd5ORwUsIQergg/U0v4OU/+CzfEuaaD+NuFMEj0bnyZvyECLLy1+U/uj7FYsP f+KdSbSABf2WWfhxZ1Et50nt7lf/q4YHHKR8qtMP5h4VGXwsFGTwSIt/4pp9CsREWtdF v584vf6N9pensYmm+sDwLWmr57w8lJ3W50P5MHu68XtJzfBP3HrqGLFy488Fa0b+JYxT fLEDdppUA0Zwg2BT+Yex5V0mBlXUguD9MG6s5sId9V1dsVHfLyNKxXjfnPfnWVUSegMR ZpswgFb+h3qRQ8M2l1kLnCYNDQs5cv1f6TaZfqJubsb4kmOfJRg/o5m4mvghlX3DICXo +arg== X-Gm-Message-State: AOJu0Yz4l9aaFHJX2Yn+AsKSoXWURnPrjDBTFEdtSyojqt3qOovg6vcN e9HGKPNUMqpyHy5EPq1xJuhxNyjAxFWGOtRrAqVOxwaDudg5HU9A1tTRZj3A0+g2iylfM//Dm7Y 5vxo= X-Gm-Gg: ASbGncs61kF0YvGXVtu4eN1X1UzYbhkprlYCilObjZYx89mGBZNAaMLHJqU87wngcdw bG9V3mfPdiy945hBZvT3avOKuK/7p8Rd+hliR4aS46Ut6wVZuPahLfERpVvZEEIoNhCwaww1uIq 2/nzR6MAOGbibvqVguIKxMgB57eIZbgqXsdGSA2SRsCmRJVgwVjTczykjFxciBouGJuGbL0PhKD e7s+8NT0misUp4cMb6WURTbKPjUcQbiDR3+exQmL2MBUD426UedV83PiPyooLgRQRnEYZxJIxPl 61SGMEhOm9ZRzB644T9Ff5YtdMGhozUYgN8RZUE5sNQf+XGBGJCy3xuXA9mvVGQH X-Received: by 2002:a05:600c:3108:b0:43c:fe15:41e1 with SMTP id 5b1f17b1804b1-43d1ec66daamr53303725e9.4.1741989354321; Fri, 14 Mar 2025 14:55:54 -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.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:55:54 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini Subject: [PATCH 04/12] net: lwip: add restart support to ping Date: Fri, 14 Mar 2025 22:55:06 +0100 Message-ID: <20250314215525.579655-5-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250314215525.579655-1-jerome.forissier@linaro.org> References: <20250314215525.579655-1-jerome.forissier@linaro.org> 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 Use net_start_again() in do_ping() to determine if a failed ping should be restarted on a different interface. Signed-off-by: Jerome Forissier --- net/lwip/ping.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/net/lwip/ping.c b/net/lwip/ping.c index 542ef2cb148..d8042ceecf9 100644 --- a/net/lwip/ping.c +++ b/net/lwip/ping.c @@ -168,11 +168,13 @@ int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) if (!ipaddr_aton(argv[1], &addr)) return CMD_RET_USAGE; - if (net_lwip_eth_start() < 0) - return CMD_RET_FAILURE; - - if (ping_loop(eth_get_dev(), &addr) < 0) - return CMD_RET_FAILURE; +restart: + if (net_lwip_eth_start() < 0 || ping_loop(eth_get_dev(), &addr) < 0) { + if (net_start_again() == 0) + goto restart; + else + return CMD_RET_FAILURE; + } return CMD_RET_SUCCESS; } From patchwork Fri Mar 14 21:55:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 873477 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp936732wrq; Fri, 14 Mar 2025 14:56:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUnni6RlxKQHgJ9hUIhc6fHG2KHHxWMiUBRSu+wGJ/tuEbhy1+4Ud+jSeO3wuTVdGULu6NXNA==@linaro.org X-Google-Smtp-Source: AGHT+IEHfpIyxRjh0+vOs5FZdhPpIYjqocsg7OOzq9gSop1VK4e+TTfHVM7buECMhLK8DpX58KzP X-Received: by 2002:a05:6402:5186:b0:5e5:b572:a6d7 with SMTP id 4fb4d7f45d1cf-5e89e6b0648mr5537210a12.6.1741989400902; Fri, 14 Mar 2025 14:56:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741989400; cv=none; d=google.com; s=arc-20240605; b=DO5fnRaXX92CXabfMDN6TTmssGhxABG2J2ZeVdstw4+J3KnMSCcefqE6DwtH7HA/Wu IqNxd508R5FxbHkPWaqALjWcbz4vX/yjUi1xN6zEJ4jpPBblCDaouq1RCmNO1woYYsjH jOlIMp6sC4utlwybRuFdP6CcoGfF0q/zchkJ2XQ/LKEMZMyZpvTufPnm9jy6NoA1sFKw AQhrKGotRxhWwnS8hFNNZIc0slpc1cg2gLNg2+EapsCaiMU8itqzp/momWtgoYf6vWcC RwMV2Ltjk7TJUOfbLkNtGO4xw/LCycplcmdjF9Cc79vU+relB4G8iFtqQw4Vop+y04ii 4tNQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8vutLLp6mDmf9uD3PMZBJ8FR3riSioyMt/NxuHW024A=; fh=OddbLhSOmySdyzKIXdEczbNoEC943ie3Te872v58/v8=; b=ELUD+6D6leBQGv08poKLtq1g/TOdryUGafmZSx94nJDkvprCm5UVG9ptH58GxNmaQ+ EXbq45mXp9/ZosGjNjOk2L897l/YFGhe1QaNWP257Y229ezwGHiTYbObFvwW0keVklDh CYKU0efznsMRKo4j2UT8Dwrr8Q7DTUgxcj7FoSzON7xmaMLgInGZG0wQTf/Z+qwK/ntu NHQUA6/cn6OomFpU9ZNjhy5mXUrzpOowiBQ6U5mm0Y9/x6SZdml8zpvKyggHpQ6Cmf0x P2SVaHKuELXm8g7ONU85ckOfmGMdFMmlT8GpDxAj2wDW2RZ6s1M4N8rqK2awBHpAMnSV 3YQQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sK+eQY23; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5e816b2c463si3864102a12.187.2025.03.14.14.56.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:56:40 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sK+eQY23; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 28F6481FC7; Fri, 14 Mar 2025 22:56:01 +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="sK+eQY23"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 63EA282051; Fri, 14 Mar 2025 22:55:58 +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-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 6E35581F0B for ; Fri, 14 Mar 2025 22:55:56 +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-wr1-x436.google.com with SMTP id ffacd0b85a97d-390fdaf2897so2302384f8f.0 for ; Fri, 14 Mar 2025 14:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741989356; x=1742594156; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8vutLLp6mDmf9uD3PMZBJ8FR3riSioyMt/NxuHW024A=; b=sK+eQY23j2gkif8jkKLaEGzA/pNKc52eBVduPO3N/0PuRqfdMakc/Tt4fWHvzvaQYE g0fezAdX2QCPXQvnWhBl0DqcDQ+lMJ1XkyfPf0ie9SJPCZWCZCHWJDLeXHRXR5dOEFIC LC5DfocKFpYls0oxUPtq4RtGy7t91CcBEduerKIUAuJduuLiEO4ymM7CtOLzQIKk/n6l 2P9zQI0JvlxW/uEGtqAbY5ggypzc65eSI7ZJuIamFd5R22mDymRZ/TD+P/FTy9c4zzV1 sUer5SzDkB2mkQ8XMByDrb4QWTMFGXBo0+uq8jA3Voxsl1MKYLLP6mKAjKyNzP6pvtI1 X+zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741989356; x=1742594156; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8vutLLp6mDmf9uD3PMZBJ8FR3riSioyMt/NxuHW024A=; b=XtlxMBkQV94WLZv8iqZnrDKouTZOP1PLKb3dUwquaXYtCH4WqueYmsiBIPlHJQZQSl j3bD9o0O8GFcyHabo75NFjA2cuZAIMWFrCo7xlnQ3Vp30nkhVXHXiqrx4wZ2Hc/XkacZ MH/ZudqTpYwBbodLScvyIDcIJMfVQh+7dy5dNgocoGlzj8A3ZN30ME+ELw7RjMCg3sMl ESg3C6MkQVI8s9Dr1rzJAW97E0px2etbZNUDE+sd/OF9h7x82vbOTgvx2pcV/nRxBV5M y7h2UuF47VlGtz88xiWUBCiLdLVcUDyQzUiHhH1rvG4rRCzm26XkZGO4LKWHA4//yUYz 4aFw== X-Gm-Message-State: AOJu0YwBhOskKmauLFrpeHI6NxF2BplnAQ+qWR5Cce0w5XYNEh2XXM2t fTMnAl0Ufqla61WlKV3B0xHLlGNasmPudBhhpoPo0TmnOHJMPbMXkKUyv6F+thCOUlMad4OsQXb 3wHM= X-Gm-Gg: ASbGncs+0IG8zKGZO9jXNF6wBAxSiALQJZLZZwo3z6s+lt/8vNC1PDVP27WhgNaRxCN Gv/YFQP4aTnZN87sJrQAhtdDzmXIvp0n+vxeh7gwlpVEuqWWFrD1RNOEUlsMmFQbblii8u2sIo+ /X1hVBHU43UUH6pDD5EmPitlHMQ7mdbHS14CA5F9OBTNSVIh058IWQRpddBpJTK+za6RmjuLCQn VVoedh5+RmkhKgVtkpcABHxmkKvbzr1CA97qf2hEYFqslj6osGnS4Tfc4MaP34TcI0vpwUhOlCs e53zyxKifBZoFw4/+XeeXfEUHwD9LanDwXUNFC1mxBpaxftvaXxmgw== X-Received: by 2002:a5d:6d08:0:b0:391:4940:45c3 with SMTP id ffacd0b85a97d-39720e3c9bcmr6173583f8f.54.1741989355672; Fri, 14 Mar 2025 14:55:55 -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.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:55:55 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini Subject: [PATCH 05/12] net: lwip: use timer_early_get_count() when CONFIG_SANDBOX_TIMER=y Date: Fri, 14 Mar 2025 22:55:07 +0100 Message-ID: <20250314215525.579655-6-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250314215525.579655-1-jerome.forissier@linaro.org> References: <20250314215525.579655-1-jerome.forissier@linaro.org> 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 When the sandbox timer is available, use it. This allows skipping time in the tests (sandbox_eth_skip_timeout()). Signed-off-by: Jerome Forissier --- net/lwip/net-lwip.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c index 5d862e038a9..c20bdaf8086 100644 --- a/net/lwip/net-lwip.c +++ b/net/lwip/net-lwip.c @@ -14,6 +14,7 @@ #include #include #include +#include /* xx:xx:xx:xx:xx:xx\0 */ #define MAC_ADDR_STRLEN 18 @@ -339,7 +340,11 @@ int net_loop(enum proto_t protocol) u32_t sys_now(void) { +#if CONFIG_IS_ENABLED(SANDBOX_TIMER) + return timer_early_get_count(); +#else return get_timer(0); +#endif } int net_start_again(void) From patchwork Fri Mar 14 21:55:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 873479 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp936816wrq; Fri, 14 Mar 2025 14:57:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVKWYBuX7UvQWoLtPB8uiK7upouD08BTf1Z54vTd3IpU5hFo3AJgkJfnJ8NrN6qecYjyV52Hg==@linaro.org X-Google-Smtp-Source: AGHT+IEWxkvY2weQw/KbYjkCS6QKKc8V+MjQ81r6HmxLVeaQlFWV/WYkgRPcLWXFIVkXuvvyCu8o X-Received: by 2002:a17:907:3f97:b0:ac3:47b1:d210 with SMTP id a640c23a62f3a-ac347b1e834mr96627066b.39.1741989410235; Fri, 14 Mar 2025 14:56:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741989410; cv=none; d=google.com; s=arc-20240605; b=P91XpsYAmejvkXr8uAJimeGfClvhSkQ1E4Mkf1RMzoGnxQ2VezWIp2d6pQsoDd437B 1lTDqH/LuVKbCJHxUNgeQAVOWaGQO4lcKVdWaOuGewq+0Kms05ufFcKax8V3o/0EMQf6 6eVoQrsIqZqI+n12l758D7yDSHEdtNc9G62UUbafht5g/LUXv/XEl5DoYjl2dG0n4y9P /M1Y373CdaLA8wPMsWdDA7Y3wtJmt5GEz/mSXjxB/x7DnYTLgw6r3VXlssieihXW9tOn mRbGubrT3o++VfQPYlft5VWJ/YMkFkgF8ztwK1qMXCAX58G2oqEodtwDEMdFyOlsoYj6 z4eg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hDKvoRf4CBNId6VlxtZ8TbnYRtbGMmAJh+xQ16DgIaU=; fh=pO+tgvMqmJPf2JsUjhntWZUI6YqUw+kRYaWAe0rrB0U=; b=Ex/FDVjyYiSHxjDKrotkh36bC2FZ/m3YQM49RV6fZOxviEyrpBr/VyKr7fMHcuWJba BlRmyRv0p95f3NzP8nykqH3dxCZA3SSqitPnAE8Gol7apdrBqBT121mHg0imiF092851 3ROUFHg5ub3DO9JGmZxSSgOhxNHbdpwlOKXU2pEimGTRGI99JD0n2hliJt6sT7p1Gj+J ZM6SQgvy7m8RY6flknRyykj5q7XE49LiQpcIo3NKM5f4yViMPii0dzZFRpiGTyPxlhos DrL+unE70J5FOhZqTPPEGyD98tEEuiSAhj2Zq4yxicsTjVcmtcR5TuSkb19rF/gq5PMT IJug==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oQltzK0b; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-ac314aa6937si377457566b.499.2025.03.14.14.56.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:56:50 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oQltzK0b; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 6F1E3820B7; Fri, 14 Mar 2025 22:56:03 +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="oQltzK0b"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9B95281F0B; Fri, 14 Mar 2025 22:56:00 +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-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (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 42F0F82054 for ; Fri, 14 Mar 2025 22:55:58 +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-x342.google.com with SMTP id 5b1f17b1804b1-43cf848528aso1423905e9.2 for ; Fri, 14 Mar 2025 14:55:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741989357; x=1742594157; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hDKvoRf4CBNId6VlxtZ8TbnYRtbGMmAJh+xQ16DgIaU=; b=oQltzK0bxD7a4ryMilZzC+jv26tmS13Rp3MkvdW7sgZl5acCc0hlsIzVyGWMrxHtxg IsV5QF/VeqsH/QJPxB6KL4NhV3twMrlZcbJXgt+6/J6StQak4ZloOkAt0Omb9nI31jWO W5+16XHhFvfzMsoyqyBSmxtMdWxAt1CMb+pT1bCzX6GtMhZSwVylOOe8vQn778geHTps MDC1KkQFEH8vnNU2QRhRzCGc+R1GCEbTdr4qDRuoatIKt7amVVotxoR6Xso5vjPI51rt kuq9Kl8ygVOE748QljZTauVYjRRshdxpYERljF8Gpb6l/SmNZWeRn5cjZz1czm0iGAxt pd2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741989357; x=1742594157; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hDKvoRf4CBNId6VlxtZ8TbnYRtbGMmAJh+xQ16DgIaU=; b=XSZCPqahNJs1GHLdZHCgmCjFkx4+uuLbTdrGNvZuHljuiJS9SM7Ya8dGvhBqR6ON0b EQc1FwIKhOWF6kvg28/TMzX3Srj3cM7kbC3LCNgVrmqpBfgR5IXF/eibL4YFKy5+lMwY tnOcorbSjCGOT3orRj+ORQhoscZtCpFM5A13V1wCX89603LtcqHMtpfYO6vM+/wYXpaa 40ZK4h91exISu4HQjFEJ7N/zb5FkW1rt5lrC3K1wIH3yia/d/JS4oUiRhbdtyNtYnp96 exVvmi1pCmyazN9L1+l4lGNIu+pMFs5Z2WPMt1M38d4VWxGvAbIh8+bbzn7jcrFYywCI gWVw== X-Gm-Message-State: AOJu0YwVRZDqZ7Mm58U2Z5Ww++bN4NE8PiMZ41ZYmaJ4juStEHDhN1yu QjLjLraHwWyaYkf1jPiVQqz4NkNqvGBFj32lei70b7Bp4RQ0st6rmric9+LZM4bmyvihuXhv4zh 9gpciBg== X-Gm-Gg: ASbGncuUQHlUkRZAGYtPBT9z3lC0laY8R9pg3FBSqHVexZLEX7Arz8p7Y1ojdTGucq6 dMHrnu33qqagwDhGtuSJR6IQomvFmQ5C/JqGdLBLfCRbSqOoMwZtxM+HtlP/TpaMO816DIIRJ4y EQPDKRoJnjJT8d2vxJABFZ270LdeDbMouCqOnULmzdPzX9ksPMkKUCXbdbW9t4CpidW4zXrLBb9 ELqWe7PAOsU28d+DF6k1l3ZK3XttUWDjeq5NmTp0/J32e8GI4tAH8egTJHRXbKtY1sgNWxNxmpT /gfVpD4TwI7sZp6jMCzOfyGCuChqQByCRQaZUOQyzT5C62j6BU+O+g== X-Received: by 2002:a05:600c:1c86:b0:43c:f4b3:b0ad with SMTP id 5b1f17b1804b1-43d1ecd0f21mr52217075e9.19.1741989357351; Fri, 14 Mar 2025 14:55:57 -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.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:55:57 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Simon Glass , Hanyuan Zhao , Weijie Gao , Markus Gothe , Boon Khai Ng , Marek Vasut , Romain Naour , Patrice Chotard , Christophe ROULLIER , Robert Marko , Philip Oberfichtner Subject: [PATCH 06/12] drivers: net: sandbox: add support for NET_LWIP Date: Fri, 14 Mar 2025 22:55:08 +0100 Message-ID: <20250314215525.579655-7-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250314215525.579655-1-jerome.forissier@linaro.org> References: <20250314215525.579655-1-jerome.forissier@linaro.org> 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 Make the sandbox mock ethernet driver (drivers/net/sandbox.c) compatible with NET_LWIP by not relying on any of the structures or functions defined in net-legacy.h. This is done by providing local definitions of the various protocol structures (Ethernet, ARP, IPv4, ICMP). Drop the stub driver that was introduced specifically for NET_LWIP (drivers/net/sandbox-lwip.c). Signed-off-by: Jerome Forissier --- drivers/net/Kconfig | 13 +- drivers/net/Makefile | 1 - drivers/net/sandbox-lwip.c | 85 ------------- drivers/net/sandbox.c | 240 ++++++++++++++++++++++++------------- 4 files changed, 160 insertions(+), 179 deletions(-) delete mode 100644 drivers/net/sandbox-lwip.c diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 1563404ca17..e683c18cad7 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -343,7 +343,7 @@ config ESSEDMA config ETH_SANDBOX depends on SANDBOX - depends on NET + depends on NET || NET_LWIP default y bool "Sandbox: Mocked Ethernet driver" help @@ -352,17 +352,6 @@ config ETH_SANDBOX This driver is particularly useful in the test/dm/eth.c tests -config ETH_SANDBOX_LWIP - depends on SANDBOX - depends on NET_LWIP - default y - bool "Sandbox: Mocked Ethernet driver (for NET_LWIP)" - help - This driver is meant as a replacement for ETH_SANDBOX when - the network stack is NET_LWIP rather than NET. It currently - does nothing, i.e. it drops the sent packets and never receives - data. - config ETH_SANDBOX_RAW depends on SANDBOX depends on NET diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 80d70212971..519a623dc1c 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -39,7 +39,6 @@ obj-$(CONFIG_ETH_DESIGNWARE_SOCFPGA) += dwmac_socfpga.o obj-$(CONFIG_ETH_SANDBOX) += sandbox.o obj-$(CONFIG_ETH_SANDBOX_RAW) += sandbox-raw-bus.o obj-$(CONFIG_ETH_SANDBOX_RAW) += sandbox-raw.o -obj-$(CONFIG_ETH_SANDBOX_LWIP) += sandbox-lwip.o obj-$(CONFIG_FEC_MXC) += fec_mxc.o obj-$(CONFIG_FMAN_ENET) += fm/ obj-$(CONFIG_FMAN_ENET) += fsl_mdio.o diff --git a/drivers/net/sandbox-lwip.c b/drivers/net/sandbox-lwip.c deleted file mode 100644 index 3721033c310..00000000000 --- a/drivers/net/sandbox-lwip.c +++ /dev/null @@ -1,85 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (c) 2015 National Instruments - * - * (C) Copyright 2015 - * Joe Hershberger - */ - -#include -#include -#include -#include -#include -#include -#include - -DECLARE_GLOBAL_DATA_PTR; - -static int sb_lwip_eth_start(struct udevice *dev) -{ - debug("eth_sandbox_lwip: Start\n"); - - return 0; -} - -static int sb_lwip_eth_send(struct udevice *dev, void *packet, int length) -{ - debug("eth_sandbox_lwip: Send packet %d\n", length); - - return -ENOTSUPP; -} - -static int sb_lwip_eth_recv(struct udevice *dev, int flags, uchar **packetp) -{ - return -EAGAIN; -} - -static int sb_lwip_eth_free_pkt(struct udevice *dev, uchar *packet, int length) -{ - return 0; -} - -static void sb_lwip_eth_stop(struct udevice *dev) -{ -} - -static int sb_lwip_eth_write_hwaddr(struct udevice *dev) -{ - return 0; -} - -static const struct eth_ops sb_eth_ops = { - .start = sb_lwip_eth_start, - .send = sb_lwip_eth_send, - .recv = sb_lwip_eth_recv, - .free_pkt = sb_lwip_eth_free_pkt, - .stop = sb_lwip_eth_stop, - .write_hwaddr = sb_lwip_eth_write_hwaddr, -}; - -static int sb_lwip_eth_remove(struct udevice *dev) -{ - return 0; -} - -static int sb_lwip_eth_of_to_plat(struct udevice *dev) -{ - return 0; -} - -static const struct udevice_id sb_eth_ids[] = { - { .compatible = "sandbox,eth" }, - { } -}; - -U_BOOT_DRIVER(eth_sandbox) = { - .name = "eth_lwip_sandbox", - .id = UCLASS_ETH, - .of_match = sb_eth_ids, - .of_to_plat = sb_lwip_eth_of_to_plat, - .remove = sb_lwip_eth_remove, - .ops = &sb_eth_ops, - .priv_auto = 0, - .plat_auto = sizeof(struct eth_pdata), -}; diff --git a/drivers/net/sandbox.c b/drivers/net/sandbox.c index fe3627db6e3..2011fd31f41 100644 --- a/drivers/net/sandbox.c +++ b/drivers/net/sandbox.c @@ -9,13 +9,84 @@ #include #include #include -#include #include #include #include +#include + +/* + * Structure definitions for network protocols. Since this file is used for + * both NET and NET_LWIP, and given that the two network stacks do have + * conflicting types (for instance struct icmp_hdr), it is on purpose that the + * structures are defined locally with minimal dependencies -- is + * included for the bit types and that's it. + */ + +#define ETHADDR_LEN 6 +#define IP4_LEN 4 + +struct ethhdr { + u8 dst[ETHADDR_LEN]; + u8 src[ETHADDR_LEN]; + u16 protlen; +} __attribute__((packed)); + +#define ETHHDR_SIZE (sizeof(struct ethhdr)) + +struct arphdr { + u16 htype; + u16 ptype; + u8 hlen; + u8 plen; + u16 op; +} __attribute__((packed)); + +#define ARPHDR_SIZE (sizeof(struct arphdr)) + +#define ARP_REQUEST 1 +#define ARP_REPLY 2 + +struct arpdata { + u8 sha[ETHADDR_LEN]; + u32 spa; + u8 tha[ETHADDR_LEN]; + u32 tpa; +} __attribute__((packed)); + +#define ARPDATA_SIZE (sizeof(struct arpdata)) + +struct iphdr { + u8 hl_v; + u8 tos; + u16 len; + u16 id; + u16 off; + u8 ttl; + u8 prot; + u16 sum; + u32 src; + u32 dst; +} __attribute__((packed)); + +#define IPHDR_SIZE (sizeof(struct iphdr)) + +struct icmphdr { + u8 type; + u8 code; + u16 checksum; + u16 id; + u16 sequence; +} __attribute__((packed)); + +#define ICMPHDR_SIZE (sizeof(struct icmphdr)) + +#define ICMP_ECHO_REQUEST 8 +#define ICMP_ECHO_REPLY 0 +#define IPPROTO_ICMP 1 DECLARE_GLOBAL_DATA_PTR; +static const u8 null_ethaddr[6]; static bool skip_timeout; /* @@ -59,17 +130,19 @@ int sandbox_eth_arp_req_to_reply(struct udevice *dev, void *packet, unsigned int len) { struct eth_sandbox_priv *priv = dev_get_priv(dev); - struct ethernet_hdr *eth = packet; - struct arp_hdr *arp; - struct ethernet_hdr *eth_recv; - struct arp_hdr *arp_recv; + struct ethhdr *eth = packet; + struct arphdr *arp; + struct arpdata *arpd; + struct ethhdr *eth_recv; + struct arphdr *arp_recv; + struct arpdata *arp_recvd; - if (ntohs(eth->et_protlen) != PROT_ARP) + if (ntohs(eth->protlen) != PROT_ARP) return -EAGAIN; - arp = packet + ETHER_HDR_SIZE; + arp = packet + ETHHDR_SIZE; - if (ntohs(arp->ar_op) != ARPOP_REQUEST) + if (ntohs(arp->op) != ARP_REQUEST) return -EAGAIN; /* Don't allow the buffer to overrun */ @@ -77,27 +150,29 @@ int sandbox_eth_arp_req_to_reply(struct udevice *dev, void *packet, return 0; /* store this as the assumed IP of the fake host */ - priv->fake_host_ipaddr = net_read_ip(&arp->ar_tpa); + arpd = (struct arpdata *)(arp + 1); + priv->fake_host_ipaddr.s_addr = arpd->tpa; /* Formulate a fake response */ eth_recv = (void *)priv->recv_packet_buffer[priv->recv_packets]; - memcpy(eth_recv->et_dest, eth->et_src, ARP_HLEN); - memcpy(eth_recv->et_src, priv->fake_host_hwaddr, ARP_HLEN); - eth_recv->et_protlen = htons(PROT_ARP); + memcpy(eth_recv->dst, eth->src, ETHADDR_LEN); + memcpy(eth_recv->src, priv->fake_host_hwaddr, ETHADDR_LEN); + eth_recv->protlen = htons(PROT_ARP); - arp_recv = (void *)eth_recv + ETHER_HDR_SIZE; - arp_recv->ar_hrd = htons(ARP_ETHER); - arp_recv->ar_pro = htons(PROT_IP); - arp_recv->ar_hln = ARP_HLEN; - arp_recv->ar_pln = ARP_PLEN; - arp_recv->ar_op = htons(ARPOP_REPLY); - memcpy(&arp_recv->ar_sha, priv->fake_host_hwaddr, ARP_HLEN); - net_write_ip(&arp_recv->ar_spa, priv->fake_host_ipaddr); - memcpy(&arp_recv->ar_tha, &arp->ar_sha, ARP_HLEN); - net_copy_ip(&arp_recv->ar_tpa, &arp->ar_spa); + arp_recv = (void *)eth_recv + ETHHDR_SIZE; + arp_recv->htype = htons(ARP_ETHER); + arp_recv->ptype = htons(PROT_IP); + arp_recv->hlen = ETHADDR_LEN; + arp_recv->plen = IP4_LEN; + arp_recv->op = htons(ARP_REPLY); + arp_recvd = (struct arpdata *)(arp_recv + 1); + memcpy(&arp_recvd->sha, priv->fake_host_hwaddr, ETHADDR_LEN); + arp_recvd->spa = priv->fake_host_ipaddr.s_addr; + memcpy(&arp_recvd->tha, &arpd->sha, ETHADDR_LEN); + arp_recvd->tpa = arpd->spa; - priv->recv_packet_length[priv->recv_packets] = - ETHER_HDR_SIZE + ARP_HDR_SIZE; + priv->recv_packet_length[priv->recv_packets] = ETHHDR_SIZE + + ARPHDR_SIZE + ARPDATA_SIZE; ++priv->recv_packets; return 0; @@ -114,22 +189,22 @@ int sandbox_eth_ping_req_to_reply(struct udevice *dev, void *packet, unsigned int len) { struct eth_sandbox_priv *priv = dev_get_priv(dev); - struct ethernet_hdr *eth = packet; - struct ip_udp_hdr *ip; - struct icmp_hdr *icmp; - struct ethernet_hdr *eth_recv; - struct ip_udp_hdr *ipr; - struct icmp_hdr *icmpr; + struct ethhdr *eth = packet; + struct iphdr *ip; + struct icmphdr *icmp; + struct ethhdr *eth_recv; + struct iphdr *ipr; + struct icmphdr *icmpr; - if (ntohs(eth->et_protlen) != PROT_IP) + if (ntohs(eth->protlen) != PROT_IP) return -EAGAIN; - ip = packet + ETHER_HDR_SIZE; + ip = packet + ETHHDR_SIZE; - if (ip->ip_p != IPPROTO_ICMP) + if (ip->prot != IPPROTO_ICMP) return -EAGAIN; - icmp = (struct icmp_hdr *)&ip->udp_src; + icmp = (struct icmphdr *)(ip + 1); if (icmp->type != ICMP_ECHO_REQUEST) return -EAGAIN; @@ -141,19 +216,19 @@ int sandbox_eth_ping_req_to_reply(struct udevice *dev, void *packet, /* reply to the ping */ eth_recv = (void *)priv->recv_packet_buffer[priv->recv_packets]; memcpy(eth_recv, packet, len); - ipr = (void *)eth_recv + ETHER_HDR_SIZE; - icmpr = (struct icmp_hdr *)&ipr->udp_src; - memcpy(eth_recv->et_dest, eth->et_src, ARP_HLEN); - memcpy(eth_recv->et_src, priv->fake_host_hwaddr, ARP_HLEN); - ipr->ip_sum = 0; - ipr->ip_off = 0; - net_copy_ip((void *)&ipr->ip_dst, &ip->ip_src); - net_write_ip((void *)&ipr->ip_src, priv->fake_host_ipaddr); - ipr->ip_sum = compute_ip_checksum(ipr, IP_HDR_SIZE); + ipr = (void *)eth_recv + ETHHDR_SIZE; + icmpr = (struct icmphdr *)(ipr + 1); + memcpy(eth_recv->dst, eth->src, ETHADDR_LEN); + memcpy(eth_recv->src, priv->fake_host_hwaddr, ETHADDR_LEN); + ipr->sum = 0; + ipr->off = 0; + ipr->dst = ip->src; + ipr->src = priv->fake_host_ipaddr.s_addr; + ipr->sum = compute_ip_checksum(ipr, IPHDR_SIZE); icmpr->type = ICMP_ECHO_REPLY; icmpr->checksum = 0; - icmpr->checksum = compute_ip_checksum(icmpr, ICMP_HDR_SIZE); + icmpr->checksum = compute_ip_checksum(icmpr, ICMPHDR_SIZE); priv->recv_packet_length[priv->recv_packets] = len; ++priv->recv_packets; @@ -171,8 +246,9 @@ int sandbox_eth_ping_req_to_reply(struct udevice *dev, void *packet, int sandbox_eth_recv_arp_req(struct udevice *dev) { struct eth_sandbox_priv *priv = dev_get_priv(dev); - struct ethernet_hdr *eth_recv; - struct arp_hdr *arp_recv; + struct ethhdr *eth_recv; + struct arphdr *arp_recv; + struct arpdata *arp_recvd; /* Don't allow the buffer to overrun */ if (priv->recv_packets >= PKTBUFSRX) @@ -180,23 +256,24 @@ int sandbox_eth_recv_arp_req(struct udevice *dev) /* Formulate a fake request */ eth_recv = (void *)priv->recv_packet_buffer[priv->recv_packets]; - memcpy(eth_recv->et_dest, net_bcast_ethaddr, ARP_HLEN); - memcpy(eth_recv->et_src, priv->fake_host_hwaddr, ARP_HLEN); - eth_recv->et_protlen = htons(PROT_ARP); + memcpy(eth_recv->dst, net_bcast_ethaddr, ETHADDR_LEN); + memcpy(eth_recv->src, priv->fake_host_hwaddr, ETHADDR_LEN); + eth_recv->protlen = htons(PROT_ARP); - arp_recv = (void *)eth_recv + ETHER_HDR_SIZE; - arp_recv->ar_hrd = htons(ARP_ETHER); - arp_recv->ar_pro = htons(PROT_IP); - arp_recv->ar_hln = ARP_HLEN; - arp_recv->ar_pln = ARP_PLEN; - arp_recv->ar_op = htons(ARPOP_REQUEST); - memcpy(&arp_recv->ar_sha, priv->fake_host_hwaddr, ARP_HLEN); - net_write_ip(&arp_recv->ar_spa, priv->fake_host_ipaddr); - memcpy(&arp_recv->ar_tha, net_null_ethaddr, ARP_HLEN); - net_write_ip(&arp_recv->ar_tpa, net_ip); + arp_recv = (void *)eth_recv + ETHHDR_SIZE; + arp_recv->htype = htons(ARP_ETHER); + arp_recv->ptype = htons(PROT_IP); + arp_recv->hlen = ETHADDR_LEN; + arp_recv->plen = IP4_LEN; + arp_recv->op = htons(ARP_REQUEST); + arp_recvd = (struct arpdata *)(arp_recv + 1); + memcpy(&arp_recvd->sha, priv->fake_host_hwaddr, ETHADDR_LEN); + arp_recvd->spa = priv->fake_host_ipaddr.s_addr; + memcpy(&arp_recvd->tha, null_ethaddr, ETHADDR_LEN); + arp_recvd->tpa = net_ip.s_addr; priv->recv_packet_length[priv->recv_packets] = - ETHER_HDR_SIZE + ARP_HDR_SIZE; + ETHHDR_SIZE + ARPHDR_SIZE + ARPDATA_SIZE; ++priv->recv_packets; return 0; @@ -212,9 +289,10 @@ int sandbox_eth_recv_arp_req(struct udevice *dev) int sandbox_eth_recv_ping_req(struct udevice *dev) { struct eth_sandbox_priv *priv = dev_get_priv(dev); - struct ethernet_hdr *eth_recv; - struct ip_udp_hdr *ipr; - struct icmp_hdr *icmpr; + struct eth_pdata *pdata = dev_get_plat(dev); + struct ethhdr *eth_recv; + struct iphdr *ipr; + struct icmphdr *icmpr; /* Don't allow the buffer to overrun */ if (priv->recv_packets >= PKTBUFSRX) @@ -223,31 +301,31 @@ int sandbox_eth_recv_ping_req(struct udevice *dev) /* Formulate a fake ping */ eth_recv = (void *)priv->recv_packet_buffer[priv->recv_packets]; - memcpy(eth_recv->et_dest, net_ethaddr, ARP_HLEN); - memcpy(eth_recv->et_src, priv->fake_host_hwaddr, ARP_HLEN); - eth_recv->et_protlen = htons(PROT_IP); + memcpy(eth_recv->dst, pdata->enetaddr, ETHADDR_LEN); + memcpy(eth_recv->src, priv->fake_host_hwaddr, ETHADDR_LEN); + eth_recv->protlen = htons(PROT_IP); - ipr = (void *)eth_recv + ETHER_HDR_SIZE; - ipr->ip_hl_v = 0x45; - ipr->ip_len = htons(IP_ICMP_HDR_SIZE); - ipr->ip_off = htons(IP_FLAGS_DFRAG); - ipr->ip_p = IPPROTO_ICMP; - ipr->ip_sum = 0; - net_write_ip(&ipr->ip_src, priv->fake_host_ipaddr); - net_write_ip(&ipr->ip_dst, net_ip); - ipr->ip_sum = compute_ip_checksum(ipr, IP_HDR_SIZE); + ipr = (void *)eth_recv + ETHHDR_SIZE; + ipr->hl_v = 0x45; + ipr->len = htons(IPHDR_SIZE + ICMPHDR_SIZE); + ipr->off = htons(IP_FLAGS_DFRAG); + ipr->prot = IPPROTO_ICMP; + ipr->sum = 0; + ipr->src = priv->fake_host_ipaddr.s_addr; + ipr->dst = net_ip.s_addr; + ipr->sum = compute_ip_checksum(ipr, IPHDR_SIZE); - icmpr = (struct icmp_hdr *)&ipr->udp_src; + icmpr = (struct icmphdr *)(ipr + 1); icmpr->type = ICMP_ECHO_REQUEST; icmpr->code = 0; icmpr->checksum = 0; - icmpr->un.echo.id = 0; - icmpr->un.echo.sequence = htons(1); - icmpr->checksum = compute_ip_checksum(icmpr, ICMP_HDR_SIZE); + icmpr->id = 0; + icmpr->sequence = htons(1); + icmpr->checksum = compute_ip_checksum(icmpr, ICMPHDR_SIZE); priv->recv_packet_length[priv->recv_packets] = - ETHER_HDR_SIZE + IP_ICMP_HDR_SIZE; + ETHHDR_SIZE + IPHDR_SIZE + ICMPHDR_SIZE; ++priv->recv_packets; return 0; @@ -398,7 +476,7 @@ static int sb_eth_write_hwaddr(struct udevice *dev) debug("eth_sandbox %s: Write HW ADDR - %pM\n", dev->name, pdata->enetaddr); - memcpy(priv->fake_host_hwaddr, pdata->enetaddr, ARP_HLEN); + memcpy(priv->fake_host_hwaddr, pdata->enetaddr, ETHADDR_LEN); return 0; } From patchwork Fri Mar 14 21:55:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 873478 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp936815wrq; Fri, 14 Mar 2025 14:56:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUo460fY00l8GQKpIhRYzW6OKa3xYRxUhBvbL+cNnNyXA22u2sptsl/6q1GFPCsVBHqM+/4Og==@linaro.org X-Google-Smtp-Source: AGHT+IH45mQWEqN9nuTb8oRKtqZXaKpD62myXjMlBDba6UKJbi9yIsW8MxzVMS6UoSOprDI9KRbO X-Received: by 2002:a17:906:c10d:b0:abf:70fb:7f05 with SMTP id a640c23a62f3a-ac3304d6057mr443327466b.50.1741989419134; Fri, 14 Mar 2025 14:56:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741989419; cv=none; d=google.com; s=arc-20240605; b=WlaC4kA4/Esm5gA97IyWgQkuZ3lhZXQLFhW+JyOFYPcynC2orqbd9Ca8LNUFxo+fAV DawLEfTOotKCpXeMmUY1zg1MFGSzCfe4oqBhLAT66WDeti4InARRlnrM3docbEj7fU3H NxPnP6rG8RrD4u+xEzQIDJCewFKWv427fIF9XtIBWxu3T7NME75ulktRfWR1QaRvlBUD /M1TrF6mlugAuUfV4JFTI65o3k10hzqxN6fZeiUZZi4fu1eWs7vG/3Y7twdVohZ/aXXJ bM5pLt/tWxmbNZotOG+BqAa1pcxBNbGS9hm4dzZaPdomNcn2qm2ZO46FBh7L/ZAqbKMe JhFw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FIp+IINUH4o2qysWT7PhU6RsES0TsmNz1MD21hoDmyo=; fh=5k4NjZRFbhwYTCbiQxVDVPvhe462UCL62JnmvFfw7Vs=; b=J4jXukaFd2pRCrVezq3qkiv59lNzcLxBMP8LuijxOI+pokXZXZfbFAWs6dTAFsC91b 5CI73vYlcjLKo6kSF0jVAKLyxnl9c32BhFy04JGBlA8e6NlrVHoIqeYDugOlFNuo+fau Us/n+xnQVANFughwnabVkiib1EKeKVAYNsuFvnhsY5kKoiIXj+OrrBp9UDTA0oDaZSXu KgKxrTa03mou11NPqohjxogyOIxniQwUmsNA8aaol1Pfzux6pn+DmjCx/ugjQ+xU3KFk bs652buXwoJXHRUIMqWfeOXyWhf02sUe1Iyx2fC+3PjYccIazslQBZkW7oeVFTRYmCO/ EHzw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JJA+IMqt; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail 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-ac314a47980si380924366b.354.2025.03.14.14.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:56:59 -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=fail header.i=@linaro.org header.s=google header.b=JJA+IMqt; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B32C182075; Fri, 14 Mar 2025 22:56:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (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=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="JJA+IMqt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B7A0F82076; Fri, 14 Mar 2025 22:56:05 +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-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 08C9A82063 for ; Fri, 14 Mar 2025 22:55:59 +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-x331.google.com with SMTP id 5b1f17b1804b1-43ce71582e9so1160985e9.1 for ; Fri, 14 Mar 2025 14:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741989358; x=1742594158; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FIp+IINUH4o2qysWT7PhU6RsES0TsmNz1MD21hoDmyo=; b=JJA+IMqtU90jrAknWvh8CFvnFTdHfd3ZVugBJ3nvUDRN8KiVhLu/jcXMGlEphVQFx4 MweuPa6KXY88svWapUFYLeVJZwu1bkpSe2fZ4r3oaH0AdNrDvLVxiYVji71b1CNLygiE nzxva+2kUVGDPXgr7HyxmNAL/BP52muJZ4ECp0Q0X8YWVJtTeN1GYdClIYOyuDhaikvr 91Eht8VWxSRPHHBXDh+Zz0D24zYDocVQmrDsfess6HBvTvjwhUK+68iiQ8P7DgDmT7hN WAlFGDu5NKSCrh5adr6AGGSkc3yKpryUi7rNg1bL0EH8bS1RC8+b73/0Qotg/6FGSt99 Y9ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741989358; x=1742594158; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FIp+IINUH4o2qysWT7PhU6RsES0TsmNz1MD21hoDmyo=; b=r8Xw+zKhtzFNnfeTZ/a8N4LTgPFxUQNRZiME+VI0AwRk9Ft8eTkZBXigTRGYFIhV6r GzV63tPrCZ4fFqKgyS6odGiA0Zuky0RVU6PqIwpvLhiaXytgEwGymY24nuDuJ1E41jNv YXgOk0xLuiESQiGo+tHSrDFJjGpdu3UlROtzg0jZQJeNb8MkYBh6cAENkhLkEmj1cXoE kZazWiYZdZfbISc/BATIKUKe4pWImskPu+oyqoOMk7L247C83yOc5PvjKbEo8zgucZ0y 9xDMpnHqdJI+ZsLxaNguKnzvumrfpoy6twNQieDd6nG4LArrYfH8+xbN7EI2jWvOUrpf ZXNQ== X-Gm-Message-State: AOJu0YyNM4H7ZG0jHV9ycIg28j+ISzoirCcqma6bjk2ycqPikzK0kYb3 uLPbHoruH0H1Y9FrJP469wS6TnIrhEJIygPaDN8lteRMok6WfwR0kuiaGv8OniBjDau/0GfsrpO utXY= X-Gm-Gg: ASbGncu067xgQ2UMr4rNqHCdlzdnTNVWxwf9yfesjFZGgT/6RxVrMHfYZDzXK6PcNls BZc6uWO8mDs/Zqu7pxX2XRIMl3UyN6+XXLFgBu1JNd+/3Z8TQVO/cqyu72eXnQek3dPVyNQpaGT UJfg5mXn6MPdspI4r2sDEIWaO4KNPNYSHGm17uItNdvLod0Lah7EpX1IeSWip6Xa3TO33ZsMjxg JhOQ+7HDaZ48GPo/9Ys4UnZA4py4LwCuJV4AG99RW+IuqxTWRp9iOa2TvfFFyGNOXGTFs0DxW7J Hy1dCO/1gLQKhiKuCL4lHGb3m/JgKjBbidwHiVeUfDhqVNBdrkYjvg== X-Received: by 2002:a05:600c:470a:b0:43c:eec7:eabb with SMTP id 5b1f17b1804b1-43d1ec76e4emr49569075e9.8.1741989358279; Fri, 14 Mar 2025 14:55:58 -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.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:55:57 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Jerome Forissier , Simon Glass , Mario Six , Tom Rini Subject: [PATCH 07/12] sandbox: provide static IP addresses for eth{2, 3, 5, 6, 7} Date: Fri, 14 Mar 2025 22:55:09 +0100 Message-ID: <20250314215525.579655-8-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250314215525.579655-1-jerome.forissier@linaro.org> References: <20250314215525.579655-1-jerome.forissier@linaro.org> 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 The tests in test/dm/eth.c and test/dm/dsa.c use interfaces that have no static IP addresses configured in the board's default environment file. That will be a problem when NET_LWIP=y because the lwIP stack refuses to send ICMP packets through an interface that doesn't have an IP ("no route to host"). Therefore and in preparation for enabling the sandbox tests with NET_LWIP, provide such addresses in board/sandbox/sandbox.env. Signed-off-by: Jerome Forissier --- board/sandbox/sandbox.env | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/board/sandbox/sandbox.env b/board/sandbox/sandbox.env index a2c19702d64..29197f56e95 100644 --- a/board/sandbox/sandbox.env +++ b/board/sandbox/sandbox.env @@ -8,6 +8,11 @@ stderr=serial,vidconsole ethaddr=02:00:11:22:33:44 eth6addr=02:00:11:22:33:47 ipaddr=192.0.2.1 +ipaddr2=192.0.2.3 +ipaddr3=192.0.2.4 +ipaddr5=192.0.2.6 +ipaddr6=192.0.2.7 +ipaddr7=192.0.2.8 /* * These are used for distro boot which is not supported. But once bootmethod From patchwork Fri Mar 14 21:55:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 873484 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp936997wrq; Fri, 14 Mar 2025 14:57:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWmauMDP7i7k0F/W4uHpI4Ai2VfdrwftdfvyRg25Hx0WlieR0YZ6gpFnhh3CcKMPDUunYDT5w==@linaro.org X-Google-Smtp-Source: AGHT+IFVcPIdNvDwzalZkCuc+ZtV8+sYx9HddKVkn9GFZ0V0yGZQyjVWSK6OWyH3ClpFyEAgGnJ1 X-Received: by 2002:a17:907:6ea9:b0:abf:52e1:2615 with SMTP id a640c23a62f3a-ac3301db85emr512973166b.7.1741989459669; Fri, 14 Mar 2025 14:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741989459; cv=none; d=google.com; s=arc-20240605; b=aWdNYGJ2fLqH72JBfcIohzSkSU0Oy+c5zJyqmMc60T/t70VpBf9/dhM9LLxtvRnLpb r11tfsBgHc6p15a7GnIAhNys4ky+KPGudF32+KuISE8CGA44EBkknUnuwqU4VZSlofzN bx151QKlJZArD4nCzl8bappyb65QlaOm9F+2K0GHYjGKClVPPkO1EUptfi0GND6HF3Nc pllaDR6Nb7fQT7YqVnmDbwegSnaZSrUJafNfbCnlT1dpNee6hLVea3BbNDkRRmhz1GxN DMynDmgXk1BGUMTXUBTF7NGV+vp5njdtPJI9Z6XfXfWoETgA7t+uX3PK9l/KkEnLfihx 0+dA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3uh9BWQXC5LG7icgnrxqAiZkLllavTtcmLG+JZPHSiI=; fh=L/xGH2+cg6+kEdvBmhcxLUOS5ZM6KDZQgqiktYqjtcs=; b=KU54sI7w+g3a5ps+W2AIvv0kkT1AFO60iruCZRkHjd/N8VRs66Mn07wPEcmLw87N6D m81uupq7wSVcG2nLdLkDfuzYbiP+1cGk06c+6zCkX5iqIXWQtxU3HVuntHdT9fvZzV+n ponhe2cOU7OXlueiEAjjzRMLM5Xg+sgZtW3CxbYKfJAK3XJB7C5e8flk2YiaRHkRYleb 8yunzN+9NOETokn6x/QmVDby5UEbV3YGht9WQPUuEDVQ4+ZuuaKhUX/fUsv8oMZCD0FI KLlaYplEb3SBi3cYDExrSKhWzr55N0CLdGzyn6J2GkJqbf711OzhK3ZVfGS7+d7oRo/T Xltg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LP34lHEr; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-ac314a9d1bbsi397101466b.429.2025.03.14.14.57.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:57:39 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LP34lHEr; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 28FDD820EB; Fri, 14 Mar 2025 22:56:11 +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="LP34lHEr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 558DB8205A; Fri, 14 Mar 2025 22:56:08 +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-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (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 01A5282064 for ; Fri, 14 Mar 2025 22:56:00 +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-x335.google.com with SMTP id 5b1f17b1804b1-43ce71582e9so1161115e9.1 for ; Fri, 14 Mar 2025 14:56:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741989360; x=1742594160; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3uh9BWQXC5LG7icgnrxqAiZkLllavTtcmLG+JZPHSiI=; b=LP34lHEr4LEBAFyND6/433iri1K3eKo/zlZVz8pR27edHdAYp6OoAB3GzmW7OBGMfT Vmn3nJfrUtYyuH3vgWj83Cb1EuMORpM1e+xhf+iJjT9As8rJFLXnItpgydpo6kaoaVsL 8ibV2CD5pQ9Bs7/2+pfktAwqOAcCNafPFLOwgKE/UHr13YAwqNdeB2vbnsuYEKI1LCOR /f7O3CUgBd4P/k1U9Jad5P/8lKaNH+pWR2ZFEII2Sj/qOEGpJy+5eB2aMbNELyuVwCQv bbc+NnxwuPRzdkoWkn83bM51QOdemP69jTlYXyNbNQUSB2/jIUn7xeRGUzDlkN5MsBSZ YEpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741989360; x=1742594160; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3uh9BWQXC5LG7icgnrxqAiZkLllavTtcmLG+JZPHSiI=; b=tFLhJVz8Rg2xPvJFXqvoyhcAD8NJqydyZ9La+x3BD+CNuWvB5g0oO24q5ugKlK1TrL xdRZfZULBwSou8bpVYycIccLwouSOnySWjeFqPixWhxvdgNaiVI3I5YHUEfx5yWFrJO6 UHMcR1bIvb8+gZ+TBxZDL4V0rHBHc63kYpnDkk4sXomvRGmk5d0iJuOOFEMzMF0VI50s zGkFDOoZtu5PVFYO3oE0QZzlVsZ4KEk6l+/8nzA3vzYjN667x83nveiLcitdzt65lEDM X41JPS/1EJhz5/qJWvfibgTrd7QRVkx1Z3c0cnAmjeQ6fUc4sMn6TuQQS1ymyhK5ATz5 UhRA== X-Gm-Message-State: AOJu0YzOoD5Pk4HOHO/Gw26mrL/ycKs+ZrWsEqeQj72z9OUiZvc88FZF /P8d6Yqfc6zJLKapQ/XsL3W1OVJs5dowMyrr06+P8qtHW/DAS70hAfBBb0mXEUmnVmcr0nviGWV n99g= X-Gm-Gg: ASbGnct0UOiggqbIZaHFahrkhljghJN20tjBZcE25cAn66Rk1JLkSaPxukWdrT5pYR7 ESmqbC72PQTzMlw5jsSMKWmKwv4KChGG+XPH318tigSynSB9ExP/QqX0UsqFC+gZHPEz0YM7d8l crlMI+8XAM0A807iQkiwneCLzbAUeRmVeplf2r+OrSxE+EaqakVAMK737VWXZuA/cxARBcKFH2a 1b1+DXYqnadjbQQHu+l7yIm2Y1p+yNoI77gRqyKg99TS0xqdO6qqu8iZ/7GvuX0wgiQRpqmw8Ku cKMAuXGeAQZDg/4GW+g2eAOQ4spM6fkYrh1wkVQg+VvB2YGhrWb81Q== X-Received: by 2002:a05:600c:150a:b0:43d:2313:7b4a with SMTP id 5b1f17b1804b1-43d23137bd4mr33856675e9.3.1741989359957; Fri, 14 Mar 2025 14:55:59 -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.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:55:59 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Jerome Forissier , Tom Rini , Marek Vasut , Adriano Cordova , Heinrich Schuchardt , Simon Glass Subject: [PATCH 08/12] net: ping: make do_ping() available via Date: Fri, 14 Mar 2025 22:55:10 +0100 Message-ID: <20250314215525.579655-9-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250314215525.579655-1-jerome.forissier@linaro.org> References: <20250314215525.579655-1-jerome.forissier@linaro.org> 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 Make the do_ping() function in cmd/net.c a global one by getting rid of the static qualifier, and move the prototype declaration from net-lwip.h to net-common.h. This makes the function available to other parts of U-Boot when CONFIG_NET=y, as was already the case when CONFIG_NET_LWIP=y. This is a peparation step to make the sandbox tests use a common API between NET and NET_LWIP. Signed-off-by: Jerome Forissier --- cmd/net.c | 3 +-- include/net-common.h | 12 ++++++++++++ include/net-lwip.h | 1 - 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cmd/net.c b/cmd/net.c index 79525f73a51..eaa1de5295f 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -456,8 +456,7 @@ static int netboot_common(enum proto_t proto, struct cmd_tbl *cmdtp, int argc, } #if defined(CONFIG_CMD_PING) -static int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) +int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { if (argc < 2) return CMD_RET_USAGE; diff --git a/include/net-common.h b/include/net-common.h index 52c2a6ce027..025b8a0363e 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -493,6 +493,18 @@ int net_loop(enum proto_t protocol); */ int dhcp_run(ulong addr, const char *fname, bool autoload); + +/** + * do_ping - Run the ping command + * + * @cmdtp: Unused + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * Return: result (see enum command_ret_t) + */ +int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); + /** * do_tftpb - Run the tftpboot command * diff --git a/include/net-lwip.h b/include/net-lwip.h index 0d3bb8a8bd8..b762956e8fd 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -34,7 +34,6 @@ bool wget_validate_uri(char *uri); int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); -int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]); #endif /* __NET_LWIP_H__ */ From patchwork Fri Mar 14 21:55:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 873481 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp936898wrq; Fri, 14 Mar 2025 14:57:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUI1cRbLloNA+NN5kF/Y6XTNMILGipp/ywljc8nNTL9ZDQ7r8CQ5KRnrVWr6FpkZGDZ96Jmzg==@linaro.org X-Google-Smtp-Source: AGHT+IEble6NY0iJ2WensZ7xAGeF/uTSo1pHMn+RhdGAk80FssvHdTlgc90B/GG9/nHaXDwVCEf6 X-Received: by 2002:a05:6402:2550:b0:5e5:3610:8b7a with SMTP id 4fb4d7f45d1cf-5e89fa4f900mr4676174a12.17.1741989435275; Fri, 14 Mar 2025 14:57:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741989435; cv=none; d=google.com; s=arc-20240605; b=BFIRQ1vL9GfPi+Y3GtxFqLbP78Gy2BgN292ESdHRlyHdVOKlOZ7kYaPnuNie08SSnh 0fx+aQ4keicxs/8f6r2gX//EK248XEF3PK+LhmBM70niKrRNn7IuDVFBKdPji2Bd2Aqx +dzka0CyjB5cYPiJb2rdSaXeoGsU5AYFHJ5UHeu0p5Sjyy6S9Zh1YdlW/Swb0rHRzb5j VwwKDOYLzFWarZPkJiVJ1pFS/fXS0QbT0qyhgk0FIEssoPY4KGYpTiNMi3N6L8MEP2RW 2fsp3MblSiKoqCPY2ygEvhfGJsakb3dWFdmeGwmgR39sQ08x3B5ZcTT7tnWzjVyr4EbS wQvA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GgtSU0Mj7V/hLPJpEVQCUEOx0HhiMC10py8+ZHeO9dA=; fh=JKdLe5J5UjwhLzHZKNvtrymMZkEDkc7aNw7KbJiAfHk=; b=RnYi1MPTaO12VC/RJMiBzeKe6XJpKpK4I711cg7rFeYyUozaRqUvlDhfThzMnY40BK KWo89a/otPq4qM1JZomPQMfy7xjg/RNh1DyorSiA+KGZpp6WKvbKtdLYpMajGSrHSevz 9Y74+dvDAZ/V/++7rH2vLqR37mpz6zOIhoRHttfpzgWBMEobDB/vHsiQljK4VjSfnJdZ 6GIUDjl3QOnbYlhptmFK4LeWdKZo9Nz42Tf+24e5jHKh5nrAXwVKnd7fNkSfIEozS9z/ phFcKjLcSqi8KlQDIar/oa2PH4KOFvV+00ITymMd0NY9fthzBi7RLIaSK7thSkQKS4Yi Yn9A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wncJ+W5v; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5e8169802ffsi3929304a12.168.2025.03.14.14.57.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:57:15 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wncJ+W5v; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 4865982012; Fri, 14 Mar 2025 22:56:08 +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="wncJ+W5v"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 547BD82027; Fri, 14 Mar 2025 22:56:06 +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-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 B70B1820AA for ; Fri, 14 Mar 2025 22:56:02 +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-x336.google.com with SMTP id 5b1f17b1804b1-43948f77f1aso1263315e9.0 for ; Fri, 14 Mar 2025 14:56:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741989362; x=1742594162; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GgtSU0Mj7V/hLPJpEVQCUEOx0HhiMC10py8+ZHeO9dA=; b=wncJ+W5vI0UxxwQ4plENayj0vlFSZqx5kp5zFwzJp41RQpGsG5eoUxPm3ZWtxxfsEO vIB5NBLfO5x4/KWKUZMu1rkqudFRQFABYgmCyymljDRQSzmis1B6jEHACtjnMJPHoArq kN3Pn5Js5GwgrqmveXGkRrx968U531BwUuPtK5GxMi7doTpoETG6/PQKUFynbz9d2qgj YcJovlEPR3Suqt15XFBv3da0WW8hdlKnAioHuyVBcPc8V2+vyWa/hoLe2aws/fvg6jog aKcduPsL9zxKSH48sImUeWAAZmCyJeVApQB5A/Qk2qZ0J3GWJIeGTmAFJrqTWRm0oNZh 5iDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741989362; x=1742594162; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GgtSU0Mj7V/hLPJpEVQCUEOx0HhiMC10py8+ZHeO9dA=; b=o5hkiqdsQw6OzReUt4g2buA1KiqhrMjR0ivoMkxxc5I4jbsIRDxb1baKQgysqsWf2K ltu/6dCMAPQSUIseMwdUOZdmfAAuMuba8iohkaovH/GmDkdsEm/gOSW0k/uKFdNguAbe 1dG3D0zl0e5daknaijSrWTofOcuhs9ghaWVKfdaJutJYq5KJk/dyZ5XwKhIQ6XFq1Gt5 g8l9g0b16ZW/dlE82+xMZNHBXzSrXnqS+qJYLaGr/BYbOBZoyGZ/Eivx9rx1C3rmasZd 3qm0XSkSkDARS6N8vLwPaJRa5TVkQ3NKfN49xG5N9fSVj3xshTRhCGnUyXQ8JoMjpl1S uhZg== X-Gm-Message-State: AOJu0YxUKUTYs7cR3BRJUZ8TKeb2CkVIhc8zZDY+IUEpRq3hnhhc3i/X nfKMh7St2QTl6+UCqP23Js1XCgSk7+jQtUV+6zX0g7jZWUTSPXDu6Z/6gc6hIJkDYlwx3VIMSKd xQzI= X-Gm-Gg: ASbGnctUCw1boB8z/RPkq7MkXc9X9yBt0JwOCm3VgY2UGp+r6kPpGXTKeA5DWtYwEuq 84Hi0jOcLnJLZhfEKgViZwcUt3U64rvvGIPFxQFYeDt1vKcscJ4Qk9qlo3b8ZQPpvKzojj77U3V OtxYAy84r1gdVeHUrb1365AiPpNArC/dYKXUCZIfYXr2QMZJIkitEm9petfYn3bkAuQ0vO9qoNz KYHqeQ+HVIl6bhbHUZn4geMJy4Vsjp/IYVqSSLExH2YhiBEJc5Gp7h0pC1eRzgOPYKHa5PoNs9X YBdP1S3NrFfNthyZUhcJhcpDuO5vle/l2E3boqR4Xh4vt4t7fm4/tw== X-Received: by 2002:a05:600c:4982:b0:43d:b3:f95 with SMTP id 5b1f17b1804b1-43d1f60a3e1mr47345735e9.28.1741989360871; Fri, 14 Mar 2025 14:56:00 -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.56.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:56:00 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Jerome Forissier , Simon Glass , Tom Rini , Marek Vasut Subject: [PATCH 09/12] test: dm: eth, dsa: update tests for NET_LWIP Date: Fri, 14 Mar 2025 22:55:11 +0100 Message-ID: <20250314215525.579655-10-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250314215525.579655-1-jerome.forissier@linaro.org> References: <20250314215525.579655-1-jerome.forissier@linaro.org> 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 Convert the tests to use the do_ping() interface which is now common to NET and NET_LWIP. This allows running most network test with SANDBOX and NET_LWIP. A few things to note though: 1. The ARP and IPv6 tests are enabled for NET only 2. The net_retry test is modified to use eth0 (eth@10002000) as the active (but disabled) interface, and therefore we expect eth1 (eth@10003000) to be the fallback when "netretry" is "yes". This is in replacement of eth7 (lan1) and eth0 (eth@10002000) respectively. Indeed, it seems eth7 works with NET by chance and it certainly does not work with NET_LWIP. I observed that even with NET, sandbox_eth_disable_response(1, true) has no effect: remove it and the test still passes. The interface ID is not correct to begin with; 1 corresponds to eth1 (eth@10003000) as shown by debug traces, it is not eth7 (lan1). And using index 7 causes a SEGV. In fact, it is not the call to sandbox_eth_disable_response() that prevents the stack from processing the ICMP reply but the timeout caused by the call to sandbox_eth_skip_timeout(). Here is what happens when trying to ping using the eth7 (lan1) interface with NET: do_ping(...) net_loop(PING) ping_start() eth_rx() sb_eth_recv() time_test_add_offset(11000UL); if (get_timer(0) - time_start > time_delta) ping_timeout_handler() // ping error, as expected And the same with NET_LWIP: do_ping(...) ping_loop(...) sys_check_timeouts() net_lwip_rx(...) sb_eth_recv() time_test_add_offset(11000UL); netif->input(...) // the packet is processed succesfully By choosing eth0 and sandbox_eth_disable_response(0, true), the incoming packet is indeed discarded and things work as expected with both network stacks. Signed-off-by: Jerome Forissier --- test/dm/Makefile | 2 -- test/dm/dsa.c | 8 ++--- test/dm/eth.c | 77 +++++++++++++++++++++++++++--------------------- 3 files changed, 47 insertions(+), 40 deletions(-) diff --git a/test/dm/Makefile b/test/dm/Makefile index e44f3d89e77..d21cba9632d 100644 --- a/test/dm/Makefile +++ b/test/dm/Makefile @@ -46,9 +46,7 @@ obj-$(CONFIG_VIDEO_MIPI_DSI) += dsi_host.o obj-$(CONFIG_DM_DSA) += dsa.o obj-$(CONFIG_ECDSA_VERIFY) += ecdsa.o obj-$(CONFIG_EFI_MEDIA_SANDBOX) += efi_media.o -ifdef CONFIG_NET obj-$(CONFIG_DM_ETH) += eth.o -endif obj-$(CONFIG_EXTCON) += extcon.o ifneq ($(CONFIG_EFI_PARTITION),) obj-$(CONFIG_FASTBOOT_FLASH_MMC) += fastboot.o diff --git a/test/dm/dsa.c b/test/dm/dsa.c index c6b4e12a758..9a31ae39d95 100644 --- a/test/dm/dsa.c +++ b/test/dm/dsa.c @@ -63,15 +63,15 @@ DM_TEST(dm_test_dsa_probe, UTF_SCAN_FDT); */ static int dm_test_dsa(struct unit_test_state *uts) { - net_ping_ip = string_to_ip("1.2.3.5"); + char *argv[] = { "ping", "1.1.2.2" }; env_set("ethact", "eth2"); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); env_set("ethact", "lan0"); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); env_set("ethact", "lan1"); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); env_set("ethact", ""); diff --git a/test/dm/eth.c b/test/dm/eth.c index 467495863e1..1087ae9572d 100644 --- a/test/dm/eth.c +++ b/test/dm/eth.c @@ -171,18 +171,18 @@ DM_TEST(dm_test_ip6_make_lladdr, UTF_SCAN_FDT); static int dm_test_eth(struct unit_test_state *uts) { - net_ping_ip = string_to_ip("1.1.2.2"); + char *argv[] = { "ping", "1.1.2.2" }; env_set("ethact", "eth@10002000"); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); ut_asserteq_str("eth@10002000", env_get("ethact")); env_set("ethact", "eth@10003000"); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); ut_asserteq_str("eth@10003000", env_get("ethact")); env_set("ethact", "eth@10004000"); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); ut_asserteq_str("eth@10004000", env_get("ethact")); return 0; @@ -191,22 +191,23 @@ DM_TEST(dm_test_eth, UTF_SCAN_FDT); static int dm_test_eth_alias(struct unit_test_state *uts) { - net_ping_ip = string_to_ip("1.1.2.2"); + char *argv[] = { "ping", "1.1.2.2" }; + env_set("ethact", "eth0"); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); ut_asserteq_str("eth@10002000", env_get("ethact")); env_set("ethact", "eth6"); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); ut_asserteq_str("eth@10004000", env_get("ethact")); /* Expected to fail since eth1 is not defined in the device tree */ env_set("ethact", "eth1"); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); ut_asserteq_str("eth@10002000", env_get("ethact")); env_set("ethact", "eth5"); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); ut_asserteq_str("eth@10003000", env_get("ethact")); return 0; @@ -215,18 +216,18 @@ DM_TEST(dm_test_eth_alias, UTF_SCAN_FDT); static int dm_test_eth_prime(struct unit_test_state *uts) { - net_ping_ip = string_to_ip("1.1.2.2"); + char *argv[] = { "ping", "1.1.2.2" }; /* Expected to be "eth@10003000" because of ethprime variable */ env_set("ethact", NULL); env_set("ethprime", "eth5"); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); ut_asserteq_str("eth@10003000", env_get("ethact")); /* Expected to be "eth@10002000" because it is first */ env_set("ethact", NULL); env_set("ethprime", NULL); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); ut_asserteq_str("eth@10002000", env_get("ethact")); return 0; @@ -249,6 +250,7 @@ DM_TEST(dm_test_eth_prime, UTF_SCAN_FDT); */ static int dm_test_eth_act(struct unit_test_state *uts) { + char *argv[] = { "ping", "1.1.2.2" }; struct udevice *dev[DM_TEST_ETH_NUM]; const char *ethname[DM_TEST_ETH_NUM] = {"eth@10002000", "eth@10003000", "sbe5", "eth@10004000"}; @@ -258,7 +260,6 @@ static int dm_test_eth_act(struct unit_test_state *uts) int i; memset(ethaddr, '\0', sizeof(ethaddr)); - net_ping_ip = string_to_ip("1.1.2.2"); /* Prepare the test scenario */ for (i = 0; i < DM_TEST_ETH_NUM; i++) { @@ -281,7 +282,7 @@ static int dm_test_eth_act(struct unit_test_state *uts) env_set("ethact", ethname[0]); /* Segment fault might happen if something is wrong */ - ut_asserteq(-ENODEV, net_loop(PING)); + ut_asserteq(CMD_RET_FAILURE, do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); for (i = 0; i < DM_TEST_ETH_NUM; i++) { /* Restore the env */ @@ -334,15 +335,17 @@ DM_TEST(dm_test_ethaddr, UTF_SCAN_FDT); /* The asserts include a return on fail; cleanup in the caller */ static int _dm_test_eth_rotate1(struct unit_test_state *uts) { + char *argv[] = { "ping", "1.1.2.2" }; + /* Make sure that the default is to rotate to the next interface */ env_set("ethact", "eth@10004000"); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); ut_asserteq_str("eth@10002000", env_get("ethact")); /* If ethrotate is no, then we should fail on a bad MAC */ env_set("ethact", "eth@10004000"); env_set("ethrotate", "no"); - ut_asserteq(-EINVAL, net_loop(PING)); + ut_asserteq(CMD_RET_FAILURE, do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); ut_asserteq_str("eth@10004000", env_get("ethact")); return 0; @@ -350,14 +353,16 @@ static int _dm_test_eth_rotate1(struct unit_test_state *uts) static int _dm_test_eth_rotate2(struct unit_test_state *uts) { + char *argv[] = { "ping", "1.1.2.2" }; + /* Make sure we can skip invalid devices */ env_set("ethact", "eth@10004000"); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); ut_asserteq_str("eth@10004000", env_get("ethact")); /* Make sure we can handle device name which is not eth# */ env_set("ethact", "sbe5"); - ut_assertok(net_loop(PING)); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); ut_asserteq_str("sbe5", env_get("ethact")); return 0; @@ -368,9 +373,6 @@ static int dm_test_eth_rotate(struct unit_test_state *uts) char ethaddr[18]; int retval; - /* Set target IP to mock ping */ - net_ping_ip = string_to_ip("1.1.2.2"); - /* Invalidate eth1's MAC address */ memset(ethaddr, '\0', sizeof(ethaddr)); strncpy(ethaddr, env_get("eth6addr"), 17); @@ -396,6 +398,7 @@ static int dm_test_eth_rotate(struct unit_test_state *uts) /* Restore the env */ env_set("ethaddr", ethaddr); } + /* Restore the env */ env_set(".flags", NULL); @@ -406,26 +409,28 @@ DM_TEST(dm_test_eth_rotate, UTF_SCAN_FDT); /* The asserts include a return on fail; cleanup in the caller */ static int _dm_test_net_retry(struct unit_test_state *uts) { + char *argv[] = { "ping", "1.1.2.2" }; + /* - * eth1 is disabled and netretry is yes, so the ping should succeed and - * the active device should be eth0 + * eth0 is disabled and netretry is yes, so the ping should succeed and + * the active device should be eth1 */ - sandbox_eth_disable_response(1, true); - env_set("ethact", "lan1"); + sandbox_eth_disable_response(0, true); + env_set("ethact", "eth@10002000"); env_set("netretry", "yes"); sandbox_eth_skip_timeout(); - ut_assertok(net_loop(PING)); - ut_asserteq_str("eth@10002000", env_get("ethact")); + ut_assertok(do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); + ut_asserteq_str("eth@10003000", env_get("ethact")); /* - * eth1 is disabled and netretry is no, so the ping should fail and the - * active device should be eth1 + * eth0 is disabled and netretry is no, so the ping should fail and the + * active device should be eth0 */ - env_set("ethact", "lan1"); + env_set("ethact", "eth@10002000"); env_set("netretry", "no"); sandbox_eth_skip_timeout(); - ut_asserteq(-ENONET, net_loop(PING)); - ut_asserteq_str("lan1", env_get("ethact")); + ut_asserteq(CMD_RET_FAILURE, do_ping(NULL, 0, ARRAY_SIZE(argv), argv)); + ut_asserteq_str("eth@10002000", env_get("ethact")); return 0; } @@ -434,8 +439,6 @@ static int dm_test_net_retry(struct unit_test_state *uts) { int retval; - net_ping_ip = string_to_ip("1.1.2.2"); - retval = _dm_test_net_retry(uts); /* Restore the env */ @@ -446,6 +449,7 @@ static int dm_test_net_retry(struct unit_test_state *uts) } DM_TEST(dm_test_net_retry, UTF_SCAN_FDT); +#if CONFIG_IS_ENABLED(NET) static int sb_check_arp_reply(struct udevice *dev, void *packet, unsigned int len) { @@ -511,7 +515,9 @@ static int sb_with_async_arp_handler(struct udevice *dev, void *packet, return sb_check_arp_reply(dev, packet, len); } +#endif +#if CONFIG_IS_ENABLED(NET) static int dm_test_eth_async_arp_reply(struct unit_test_state *uts) { net_ping_ip = string_to_ip("1.1.2.2"); @@ -529,7 +535,9 @@ static int dm_test_eth_async_arp_reply(struct unit_test_state *uts) return 0; } DM_TEST(dm_test_eth_async_arp_reply, UTF_SCAN_FDT); +#endif +#if CONFIG_IS_ENABLED(NET) static int sb_check_ping_reply(struct udevice *dev, void *packet, unsigned int len) { @@ -613,6 +621,7 @@ static int dm_test_eth_async_ping_reply(struct unit_test_state *uts) return 0; } DM_TEST(dm_test_eth_async_ping_reply, UTF_SCAN_FDT); +#endif #if IS_ENABLED(CONFIG_IPV6_ROUTER_DISCOVERY) From patchwork Fri Mar 14 21:55:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 873480 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp936853wrq; Fri, 14 Mar 2025 14:57:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUIAJmpx14lz7ynPNkZiNpi0WBv7P5AvD36/UT0hVNzxwfQwaWSRuz7kZMgxS1lyCzsVsQBeg==@linaro.org X-Google-Smtp-Source: AGHT+IE4zf9WyZSLMOAYXPkvQSObdvhRc6QuaMbC52OqN0lcaarXFRZo0J2FXOo8b7XKg/8nrerg X-Received: by 2002:a17:907:928c:b0:ac3:154e:1386 with SMTP id a640c23a62f3a-ac3301df978mr545339166b.6.1741989427319; Fri, 14 Mar 2025 14:57:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741989427; cv=none; d=google.com; s=arc-20240605; b=Vn+jeBIms5jQdsWH7MTKzUY5nVbNCKhBnHO9b5euIvud+e+EOFvD9Udem64z92thkq pZacdbEbiNGOkIaw5NGRMPRScP2ngiaP9sFxocBHqTtMmXtDnIO6w0KUlPALP5LM21Qt rfZFsyEuRFC4tfaIIv2ZAgxh/1/k6cWcbHxSY3ltyIZeNAP/8XX1duz8TtZLd75nxinR kcVEudPUDzAEa/cQbh6JvnXcYZj12v07Nja+Fa96rT9wBiiOeB9fuNJfaLS0Mwho765F w7/Di83/JvOGPdsrBhRoFp7K+j/bOML8eC1A4aYBFRTfdGo+wdb2v1St9Qpg4sXAtG21 Xs/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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=smOmwzgFZwd5TuZNpf2g+cWTwWJAVBKSC38OcsVOuEk=; fh=8mWZgDAtxkdA0jmMa5SqkBziyKXCbfC77zuumnpI6Aw=; b=YAKNC+LZKT2fWqbZMmhNjVuVXzGcfrplvqns9uE9vAPxLfGyq/anF3mcQA4VxgZiHK 2kG96dbgnw6hmcc0dbMDWIX/+/YW3QWokxWqdxl1y+MPxr7FRKLXYbtwtLZp8rUpOXVn ayQWQ7N8V14srWZvsYRf46GF+3WJtGhr0CFCz9pVbQ9KDYHOwFHAUyueQn0w6pDHwX/y YRQ//Md9Nx+VfwbNMFAbceIp7TOAykrY2zlzz+FJ+qMQPhx93QI6YYiqh+EE3xVV9ohZ R0TNDL4r8q7zUvB1qzBy/mUTfpmrbBmJRIhTJHNi0WEx4IvCw84ssI1onvo2IDEQLn6P QVdA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QCIg+gnA; 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-ac3147e86e2si381549266b.241.2025.03.14.14.57.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:57:07 -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=QCIg+gnA; 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 034308209D; Fri, 14 Mar 2025 22:56:08 +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="QCIg+gnA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 22A548207A; Fri, 14 Mar 2025 22:56:06 +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-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 93DC1820A0 for ; Fri, 14 Mar 2025 22:56:02 +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-x332.google.com with SMTP id 5b1f17b1804b1-43ce70f9afbso1926245e9.0 for ; Fri, 14 Mar 2025 14:56:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741989362; x=1742594162; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=smOmwzgFZwd5TuZNpf2g+cWTwWJAVBKSC38OcsVOuEk=; b=QCIg+gnAvyDIX3KTzVbCex4sCsf17MoH0aO/RfOrT6/JJV0P6DDRUCxtWxzq8/iR8p sdMvtrg91LCj46gLLrm+wJz/l8LpuCuQZfMOrtdxmQ/+rKM1Q50C3OUvxIKHcKk5hxex sYaiGto/58wyQRBvoe+akupGmdvIiS0B2XgtL7qAtHa8yMimwO5CfUFXlpdNZMgvddBz 6AXT1FX49b+hN3QKK2fIOooAMtF4egxMtDWzeiY8KxkoFAY/EJ8jfpNdJJBgu5N6Zr6B WtxDmxryAiSj+aDjL2YIAAIyOaPzAbwY2eK9s4Kl65Y+0ObKWpKoDwmQoG+dBDKwzb3K rHZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741989362; x=1742594162; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=smOmwzgFZwd5TuZNpf2g+cWTwWJAVBKSC38OcsVOuEk=; b=DevvB+EWZzEltV4p6ZYBwjjSVAsP7lKVThgWM5VMgcUA8tq6PH+OTbgriUuEJe2WV+ s+EhsSWAoraI0cPiahwHNjAnChFL42OsYm75KG+HUQSgomjcPvDIQ6qdly3aGtSf0xLB 0OYgFdgJmeIXDZ7T7AErhtu/M8scv4feMFso7I+E1fXRUJuCrcTJqgXeKVG9QuZ2jQCO EXvQblqRYietgx3fIf+mIXvvDJ9aGUWe1McAAjsXaK3l31OGflfgM7PMRbQiG69EnfUN nJJR0nPcgIrF8mmgYiVwgmMPRp78rIMeYenxI5MN/mNt2kMguHx1YQ6iR4YfEK43rOfl Lo9Q== X-Gm-Message-State: AOJu0YzLCGwknSk02FlGXEH6cdeve340mTuiCBkmd8tgCJf/9W1dvdKN zt1wlYaqEtA8zVIWolPc+B1zue/GL64WY9Gbn9zlsbLJm3cjRqxyt4RukhHnaor2t31zjxw/ZWE Q0qg= X-Gm-Gg: ASbGncvjw3jcnSMm88DabGedg7GgsDQd8TexEw4NDvcTeU4try8/ogMkoG91dzBkaeA wj6q8D6ZrSUtYMuxjyKhJr+K3CzRlL5z+4fydVQEYJs3JqDlm4p3J3qRpky424qEaoRjJ3nljsd dQ5EVpgTMoMFjCHXRDb9FTDSyabs4ziMLIvgfIMuO8jq2Fr7ySiOw/O/zA1IDPnw4TxhmZRKEQO Jo3W7H2YUP9s2Vvj3WBsad/sBRr2rzCVIVP8c8kUcyyN8JAPwPA1GUqXaA95kKirn+cwQonm7xQ qoPtvAZcdOvlqCjqWEt0NoY4Ie2zBA3SvdkZdhtNi+GzKsHzAt8Gew== X-Received: by 2002:a5d:64cc:0:b0:391:4559:876a with SMTP id ffacd0b85a97d-3971f9e53bfmr5639963f8f.46.1741989361883; Fri, 14 Mar 2025 14:56:01 -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.56.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:56:01 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini , Hanyuan Zhao , Simon Glass , Weijie Gao , Boon Khai Ng , Marek Vasut , Romain Naour , Adriano Cordova , Heinrich Schuchardt Subject: [PATCH 10/12] net: lwip: allow DM_DSA=y when NET_LWIP=y Date: Fri, 14 Mar 2025 22:55:12 +0100 Message-ID: <20250314215525.579655-11-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250314215525.579655-1-jerome.forissier@linaro.org> References: <20250314215525.579655-1-jerome.forissier@linaro.org> 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 Now that the DSA tests in test/dm/dsa.c are compatible with NET_LWIP, remove the dependency of DM_DSA on NET. Signed-off-by: Jerome Forissier --- drivers/net/Kconfig | 1 - net/Makefile | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index e683c18cad7..eb53c5f0ca8 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -48,7 +48,6 @@ config DM_DSA bool "Enable Driver Model for DSA switches" depends on DM_MDIO depends on PHY_FIXED - depends on !NET_LWIP help Enable driver model for DSA switches diff --git a/net/Makefile b/net/Makefile index 7c917b318c0..88adc549acb 100644 --- a/net/Makefile +++ b/net/Makefile @@ -11,7 +11,6 @@ obj-$(CONFIG_NET) += arp.o obj-$(CONFIG_CMD_BOOTP) += bootp.o obj-$(CONFIG_CMD_CDP) += cdp.o obj-$(CONFIG_CMD_DNS) += dns.o -obj-$(CONFIG_DM_DSA) += dsa-uclass.o obj-$(CONFIG_CMD_LINK_LOCAL) += link_local.o obj-$(CONFIG_IPV6) += ndisc.o obj-$(CONFIG_$(XPL_)DM_ETH) += net.o @@ -39,6 +38,7 @@ CFLAGS_eth_common.o += -Wno-format-extra-args endif ifeq ($(filter y,$(CONFIG_NET) $(CONFIG_NET_LWIP)),y) +obj-$(CONFIG_DM_DSA) += dsa-uclass.o obj-$(CONFIG_$(XPL_)DM_ETH) += eth-uclass.o obj-$(CONFIG_$(PHASE_)BOOTDEV_ETH) += eth_bootdev.o obj-$(CONFIG_DM_MDIO) += mdio-uclass.o From patchwork Fri Mar 14 21:55:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 873482 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp936933wrq; Fri, 14 Mar 2025 14:57:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVN5dJnXVh0vovj3oCgoP6bhTzOwji7qJDMcKwsLkKY+wOXilRc2q9F4xh7O2zim7K2r0ygRQ==@linaro.org X-Google-Smtp-Source: AGHT+IHtepgupTQdcIHQ2q2XDzzWQRs85VuxuBK618jn80OgF/wR9nyYmNAOhIZsENz6YlGdJDP+ X-Received: by 2002:a17:907:7296:b0:abf:6e22:cac7 with SMTP id a640c23a62f3a-ac330263c1dmr499593666b.15.1741989443369; Fri, 14 Mar 2025 14:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741989443; cv=none; d=google.com; s=arc-20240605; b=fN4NEU5c8sBpSfVmR6FRtUae1wj2CesmRnbatT7QG/4ValISAmIn8IND5ppFv9peIf Bz5YVpI7Yar1wwEyMpJFcgKTM0Oc32uVv2jFo1mdcoU0CDZx94JD3eZXzg74bStcu6U7 k8t1s53vcHmNHtdhOLDwdAXykLOlkuECYC+utaaPRToqaBb6jV7qPR+SFaWszdG/u5Ym GMpspV7guamRR1WiF+sgHPOaB9Q3umZ0foWLfDf9xoZUQ69t+6us3VNwNOhBAEsvfCrZ IzlkavhodFNSrjDH+9BOXO85Z4sVW/PViZD9TRxsCW8uNzwyg5Q2ud9iy4gGyZDcI73d ixbQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lz9WtFGzw2gotl6qOgzVW1XbdBJN4oMfKJNLXeOxrLU=; fh=HaKHCOHL46OAAPpM3W6HDLkDmJxXWc+qggc/xnkS9u8=; b=XYtRCwT4T8WGBvIm3EwZzNFbvsRxzkumeLoCAkhcC/e+kt8Jxb/wXTpwCgoZpjMfIg C66haDfnEoRKjKxVPmSwv3kn2uJ59GV8aWLSKS15Dwld6mCNM8ED+x3QlHJhYoYMRTPp vjCguRCy2y9buKCIn4Oxi0aCWoby1uRXh5Ub2ZUCmmN47kd36RPSRTyFBtTcDyvC94Or aZzwE1sSUfNbDoVBi+C9nnF8qRROfnOXRNnITj65GINX2lckecV5SO2hniQBP/3eHFq0 KMMX6oWOnaBHqiuTdf1u6PbxogdfoYlwwNY2ULqcMNuNCkt51QO50b9bC1ZkF6n4M4Cj 9PhA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JceDNawo; 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-ac314cd23dfsi391849066b.663.2025.03.14.14.57.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:57:23 -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=JceDNawo; 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 8CC9582072; Fri, 14 Mar 2025 22:56:10 +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="JceDNawo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A379A82027; Fri, 14 Mar 2025 22:56:07 +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,TVD_SPACE_RATIO autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 68BD0820B0 for ; Fri, 14 Mar 2025 22:56:03 +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-wr1-x434.google.com with SMTP id ffacd0b85a97d-390fdaf2897so2302464f8f.0 for ; Fri, 14 Mar 2025 14:56:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741989363; x=1742594163; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lz9WtFGzw2gotl6qOgzVW1XbdBJN4oMfKJNLXeOxrLU=; b=JceDNawoPJzwGPaS71D8w5HcOVy3vDr7kiGqtK4WEe39PtD7yGOYaGuh0b2cdw9cAP BReDQizHt0n/5cJfF05rU9Q0fA8nrIUHcFQQxhBiuStJeEVYjYajlZ4LjxeqQmXigI82 gk93g3xbRsGcn17ebMbj7BlT79ezQDyS1tV7T7fAt1XrJkFr34vmaq/avoqPqnYqCzgy EeaQQuakhR2W3cz1U/BCj3sScJz35YuAVNYi1wxDA+EY4EmlHZk1AVVcFyPp3HFK+WMk apnXOpB7Z/1EidwQU/fPRV6JoNouIZTPbVL6h8lxrOJjZQp2KRlTouY4pZEOGw+2smNi FFdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741989363; x=1742594163; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lz9WtFGzw2gotl6qOgzVW1XbdBJN4oMfKJNLXeOxrLU=; b=omMGlbj83bXOjyS+4y4QCnhUy4mP0AuHNzdfGfL17yfuzGnkfJmuG7NTPH3/qFn5Uc R7JL26eN1irYgc3Ze88rOGN3QO3P0jgIwFwfTSehAR8Mk7e/bNOluf7sKzP+FaaAFUKp 99EPpMILioI4ite8EZHWNxmI9OoTr/tROszaqEY0YzeDjZveD5tXqEnlLfZvV94Ns1Y9 lK7aOzvkA2oXv0DkaDnFxr7PT2dCSww7wr0VDSSy32zJ35X5Uef2BxwCH9zTCoahH91w qt4vk6Xwyiz+6C0OXd90R4Dr8gcUmEbE2UrrnZc5Nx4IX6cjtyOALdc5BoPxy62BkGvA yVcg== X-Gm-Message-State: AOJu0YzJgF20/v8O4bbtpTfXLn/ct+w+jLPivfSODZ/Jwa1+7DfmXYL9 RgRSK4X9kgzjjaaTXtCvCpaoECNm9fBLrCG/rYzNaPFuALMpw0T4tJ+FpcERzMJcuHErx/Uviof sgac= X-Gm-Gg: ASbGncukJK/B2UJmIPPY/r0OtghBMCMVSr+s9R9c+tmaelot/0jQ+kXMUQOtp+O7rr0 32UIEW5mwk4iAYCnD4Mr9UE77EUQTpegj1AdeXndFiuuAcWxLR1e+mEIdYuKd41p2voYgBoa8t2 foE63Ii+LiK9uRMjb+hHPrnkmGa8WHTZ0osVBF/nnq1J8PYPMdAodWz+BJqR1YzuKa8IzLlJr3B y76IOWF9FO7g/O2NHTWTsFJMTWwjsMi3jGteUqBhQXDfkqdBTziui77WcTAWjsxusPB8nDRLWJD 7uffRJVqzexnaJIJVKrdc7IcJlHKs5pQfTkotniGRTYdR8bHwYny6Q== X-Received: by 2002:a5d:584b:0:b0:38f:577f:2f6d with SMTP id ffacd0b85a97d-3971ddd4b07mr5943119f8f.2.1741989362753; Fri, 14 Mar 2025 14:56:02 -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.56.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:56:02 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Jerome Forissier , Simon Glass , Tom Rini Subject: [PATCH 11/12] configs: add sandbox64_lwip_defconfig Date: Fri, 14 Mar 2025 22:55:13 +0100 Message-ID: <20250314215525.579655-12-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250314215525.579655-1-jerome.forissier@linaro.org> References: <20250314215525.579655-1-jerome.forissier@linaro.org> 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 Add sandbox64_lwip_defconfig based on sandbox64_defconfig with NET_LWIP enabled. Signed-off-by: Jerome Forissier --- configs/sandbox64_lwip_defconfig | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 configs/sandbox64_lwip_defconfig diff --git a/configs/sandbox64_lwip_defconfig b/configs/sandbox64_lwip_defconfig new file mode 100644 index 00000000000..0e92728533f --- /dev/null +++ b/configs/sandbox64_lwip_defconfig @@ -0,0 +1,5 @@ +#include + +CONFIG_SANDBOX=y + +CONFIG_NET_LWIP=y From patchwork Fri Mar 14 21:55:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 873483 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp936969wrq; Fri, 14 Mar 2025 14:57:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXbWPNl9qWSbbweUTDI7gQxK8FTDtpwO7iFlfKZVBlwcSgdeRDDAFOJViCcSB1leQ++rik63g==@linaro.org X-Google-Smtp-Source: AGHT+IGe1rmwR6NjJggQ798YF9kM0KKHAmVrliSjJMdzbA2phD4rb3LWaKVKJtPBGKlj4FM+9DCv X-Received: by 2002:a17:907:2dac:b0:abf:7a26:c486 with SMTP id a640c23a62f3a-ac33036fdc6mr534813266b.40.1741989451473; Fri, 14 Mar 2025 14:57:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741989451; cv=none; d=google.com; s=arc-20240605; b=gOEWISOKOrwFpBKLOo1ECm2mev3i70MPzi9eWvpXO2biYthj4ONXJaf1L/qhuzQIGA 9HbYUji36cy2ezh3zTUvXxsKoHRQvukQARUjLQJ6FTQc3SoXCzS8g9u1e2/3wdqvbuJO sdA8Av+Ej+lgwUeP3/DJ3yrZsvQJADR1HR4LNIu3hZBp+j8GCE/iTghvhCzxICrQpF+X 8F0qEITCyys3CvYgJA2CTo4P/xViuHxCM/S1mXNaXdHlMuvF3d6mE1yRp3bsOIsNZ33Q PzYTU6AzRRNYgR0ISUlSQ8zEbjRMken6qy06gZvW/FmXc4IWJJ4yVZy1Nz0M3zFMRF/l iN9Q== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0raDn9mV19b2df9THk+UzfKKGheEhUONpNkUdNQ72xE=; fh=wGMMB8X6TvARg4aqKj9U0hOflw84A4sqrLo7SBHMMGM=; b=GS/3KbYGiVxWVwdbKjOlBU1bcbnnWPtmsLaas/tfUmaE/b91DB8Kgffu76ADeCw6jI RAj4QZn4QJiImwnjD3LnRlDTDFGytooUfdx9UxmhP0+vaFBbS+muLFH0Lr8nIDkG5d/h LlCViYM0PHlHXeom3OWo6Ci2LHA4SQ9zq0xKMsKpgHXw3JUMWsC1P+ZXxeAE9CqZ0eGW An3xt8/yahNdBgC9VI5WkIdMDTm1NLv74K/Vtca21qhis8AIuxxuj9Z2nUNkHpMBbAkg uXJWHNNAcLIG5/+N4+BVk49HanxtbmJRH6Yrl8VuW6eXwWV4jVPoQkNRvzbU1UWZ97/g yvdw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dfZ2njeO; 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-ac3147e3133si391382166b.207.2025.03.14.14.57.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:57:31 -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=dfZ2njeO; 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 D47B0820B3; Fri, 14 Mar 2025 22:56:10 +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="dfZ2njeO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2322981F0B; Fri, 14 Mar 2025 22:56:08 +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-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) (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 56A3282054 for ; Fri, 14 Mar 2025 22:56:04 +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-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3965c995151so1585325f8f.1 for ; Fri, 14 Mar 2025 14:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741989363; x=1742594163; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0raDn9mV19b2df9THk+UzfKKGheEhUONpNkUdNQ72xE=; b=dfZ2njeO9ELDMGg2zj5QyqZXOCBa34mTPNuq4FG00PBdTRjToNxYpWGRG6+5E1V4Vg 4ZWLZAi9f/KyiEV8Wnge2XHaXLxm09n9dCnaxDeVZD8Fp0+zHc3del8AqpBeH3uFwJSL larD8soVLKqRqvxxtGyQ1G6w99RvWdFRG9XDKTSkdYgfgipnM/pHt0TtkutJMS/c72LY hocscC+AzKSUa3L7mh/M1ATX+AZ5JDy38DUcLfQg/8zE/M1Do2Q7EhdnwN0PsSXkSSl1 RhmMv5JWvU+7SgEAToBgbnKfQuJ3qHLZ7boVx9a5oySRVrgcMPjMFoj8vu2+xOeCjznM QnlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741989363; x=1742594163; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0raDn9mV19b2df9THk+UzfKKGheEhUONpNkUdNQ72xE=; b=UtnmsBMmmJB1ZBJTHnJKUIDk9qOlIoxzWOGvnGYtzNOjSSQqeARsh3f4WEMx5uqGqx KKl7XkUedmuhl34RY8pACVNsUHjJG8MPuI/DYfTNGGWEa1Hy5ckPkebLwjamhsojozDL HFxZMs2DUcQMNRgr1CKebc9IDUeshNueiDnH5qpsQ8bSRgwGQa10VJ3VxGgsY+UXeLX7 jm0L9cC5iIyGYR9M1dmsHzrwWR7iReTPeGteqOw2DfS+nE/M2G3NRV9htFqkc2bo5ESD zs+GIMCSydt6Bh95cXVG6S+WJ8eBJPHJ2jai37WvZaBFhbioq4efANpT89znVn/nKbyj DXhQ== X-Gm-Message-State: AOJu0YwB3HNeYnWYNA7OBaLhvCk2c70QHh9uYNMXpzpJnggzaO9ZeIa1 1P9eon1G2MyUEe9FlVoSeKRwIaUdU7R+6MfcRWvWa2A5xCvrFyYc/xhvhZtt+YL/Tc0y5h+vUv1 T0e8= X-Gm-Gg: ASbGncslat2ZYrQsxG1C9YI1spidQLUNRscnTJJ0cqMMbHuWcELK05kGCi8Do29/s1E slIjQ5OQdQF1PeJ3hgS37IfAhJnIM5qxV0BrmYrCV4ZMBPAdJL+n3P3nhjEn2M0bXaKlRMNa0wY ENNRHvitg2U5Gvh/pIAtNB2/VAezBRltGe4pLFjLECMHqyJLMJvi8QOKTB7n+ITXbPElNgsUBW8 aaiL/9ZdrqOihLCSgbe8mVnYZ3EmJ1y4ykMZd+J+X0buPIYzqnVtULi8uen0jNKF9oWv1mRqA9q g5WlD5Th/aip1WHBQ8+OUDVYelzdfWv7meHeZu6sFD6MPDvsQonddA== X-Received: by 2002:a5d:6da2:0:b0:391:2fe4:de0a with SMTP id ffacd0b85a97d-3971cd57412mr6715726f8f.2.1741989363670; Fri, 14 Mar 2025 14:56:03 -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.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 14:56:03 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Jerome Forissier , Tom Rini , Simon Glass , Jiaxun Yang , Patrick Rudolph Subject: [PATCH 12/12] CI: add sandbox64_lwip Date: Fri, 14 Mar 2025 22:55:14 +0100 Message-ID: <20250314215525.579655-13-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250314215525.579655-1-jerome.forissier@linaro.org> References: <20250314215525.579655-1-jerome.forissier@linaro.org> 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 Add sandbox64_lwip_defconfig to the list of tested boards. Signed-off-by: Jerome Forissier --- .azure-pipelines.yml | 2 ++ .gitlab-ci.yml | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index d5cfa59a8a6..2e894948507 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -346,6 +346,8 @@ stages: sandbox64_clang: TEST_PY_BD: "sandbox64" OVERRIDE: "-O clang-17" + sandbox64_lwip: + TEST_PY_BD: "sandbox64_lwip" sandbox_spl: TEST_PY_BD: "sandbox_spl" TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2dbe6325f33..8c31bab6604 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -287,6 +287,17 @@ sandbox64 with clang test.py: OVERRIDE: "-O clang-17" <<: *buildman_and_testpy_dfn +sandbox64_lwip test.py: + parallel: + matrix: + - HOST: "fast arm64" + - HOST: "fast amd64" + tags: + - ${HOST} + variables: + TEST_PY_BD: "sandbox64_lwip" + <<: *buildman_and_testpy_dfn + sandbox_spl test.py: variables: TEST_PY_BD: "sandbox_spl"