Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0825AC433FE for ; Tue, 29 Nov 2022 23:05:57 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C89AA85272; Wed, 30 Nov 2022 00:05:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="ZKSoAyql"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ADFDD85134; Wed, 30 Nov 2022 00:05:54 +0100 (CET) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (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 E550F85272 for ; Wed, 30 Nov 2022 00:05:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-ed1-x52e.google.com with SMTP id a16so338624edb.9 for ; Tue, 29 Nov 2022 15:05:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=I5zRSA4s9TUegm+UwepvltI7OWI0pcjWAk1LYkWL8Vc=; b=ZKSoAyqlg1sgyHg0WXKO6FWKeqPvZ52AClldJcvmWRrF0K3t5D0bjHOJm7/B+WtYUX KZ/PEfzgK6whvxqT4uaJPbroh174vO/kKNA4RL1a0d7zKbPYXzgVRpKiqzdIgdllWqEl /wA8HitMNBMslp61DlgllLYknqnepLsPt9wZo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=I5zRSA4s9TUegm+UwepvltI7OWI0pcjWAk1LYkWL8Vc=; b=AfwAJnokz54QOAASHbUBC2rZMcro/U77Io+QPW0aEgyWiGuM8tyOT2/FElF+ZDtyNx k3p90kdNWEZYOk6m+8ROrZREAtzpnKg3HfxtIzFmaJ4bL5Cc2ZrVAW/VuN0JuLmxxLez wPVjNI6eM2rdKmo+RXHgkPUnUMy/i650suFWccgbYriC+WN+XcqVUR/1wnXeCk1wTuSa cdU96tGkT4fnd+Z7cGDT72L7dmCujZnuLxFP2/91k3s0RxntzHY0fXgCHQEAX8aK1DsU toeo7f4DNlk4v3szCFYJHjkqQ9hUM9KwZt0/zcFpn9MRwT1wuy3oZE/JWUl5iOBhC7N3 ke6w== X-Gm-Message-State: ANoB5pkxjurOzUNNwT9KF6vxmU6tn50CnugkZReUX0roBJwb7K2rJclH epa3h3QEdnjMQIhv7OHJLjpB1w== X-Google-Smtp-Source: AA0mqf5ER02E7x/eUEe3yWL8cMGy3gE+dBDmgA3W23mwvZAlt2uPP6SuBes6niqaHSeYYnwb/4dRXg== X-Received: by 2002:aa7:d417:0:b0:46b:203:f389 with SMTP id z23-20020aa7d417000000b0046b0203f389mr14380994edq.303.1669763151510; Tue, 29 Nov 2022 15:05:51 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-00f2-cafa-5a7e-526c.res6.spectrum.com. [2603:6081:7b00:6400:f2:cafa:5a7e:526c]) by smtp.gmail.com with ESMTPSA id l1-20020a1709063d2100b0079800b8173asm6673595ejf.158.2022.11.29.15.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 15:05:51 -0800 (PST) Date: Tue, 29 Nov 2022 18:05:47 -0500 From: Tom Rini To: Tim Harvey Cc: u-boot@lists.denx.de, Joe Hershberger , Ramon Fried , Vladimir Oltean , Stefano Babic , Fabio Estevam , "NXP i . MX U-Boot Team" , Marek =?iso-8859-1?Q?Beh=FAn?= , Fabio Estevam Subject: Re: [PATCH v8 4/8] net: dsa: allow rcv() and xmit() to be optional Message-ID: <20221129230547.GV3787616@bill-the-cat> References: <20221028004937.3752914-1-tharvey@gateworks.com> <20221028004937.3752914-5-tharvey@gateworks.com> <20221128155823.GA2577274@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="h1Kgj0J7YauQlxie" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett 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.6 at phobos.denx.de X-Virus-Status: Clean --h1Kgj0J7YauQlxie Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 29, 2022 at 02:53:15PM -0800, Tim Harvey wrote: > On Mon, Nov 28, 2022 at 7:58 AM Tom Rini wrote: > > > > On Thu, Oct 27, 2022 at 05:49:33PM -0700, Tim Harvey wrote: > > > > > Allow rcv() and xmit() dsa driver ops to be optional in case a driver > > > does not care to mangle a packet as in U-Boot only one network port is > > > enabled at a time and thus no packet mangling is necessary. > > > > > > Suggested-by: Vladimir Oltean > > > Signed-off-by: Tim Harvey > > > Reviewed-by: Vladimir Oltean > > > Reviewed-by: Fabio Estevam > > > > This causes: > > FAILED test/py/tests/test_ut.py::test_ut[ut_dm_dm_test_dsa] - Assertion= Error: assert False > > > > In sandbox, and I don't know if the test or the code is wrong. > > >=20 > Tom, >=20 > I'm not familiar at all with U-Boot's sandbox or unit test > infrastructure and am trying to learn. >=20 > I've figured out how to build sandbox and run the dm_test_dsa > (./u-boot -T -c "ut dm dsa") and see the same failure as you but I > don't understand how to debug this as it seems prints I add in > dsa_port_send and dsa_port_recv (which is what this patch modifies) > don't get print when run from the test infrastructure. >=20 > When I boot u-boot sandbox (./u-boot) I don't see any network devices > at all - perhaps I'm not booting sandbox with dm or something? I need > to understand what devices/drivers sandbox is using and how to > recreate the network environment that the dm_test_dsa function is > using which calls 'net_loop': >=20 > net_ping_ip =3D string_to_ip("1.2.3.5"); >=20 > env_set("ethact", "eth2"); > ut_assertok(net_loop(PING)); >=20 > env_set("ethact", "lan0"); > ut_assertok(net_loop(PING)); > env_set("ethact", "lan1"); > ut_assertok(net_loop(PING)); >=20 > env_set("ethact", ""); This is, I think, covered by: https://u-boot.readthedocs.io/en/latest/develop/tests_sandbox.html and that you want ./u-boot -T (or -d path/to/test.dtb) --=20 Tom --h1Kgj0J7YauQlxie Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmOGkEcACgkQFHw5/5Y0 tywKNwwAjIIq7DHAfEzioVw7VGwtPA9raD+dJM7A8AFVQywOdNr7vpOcUIuxoA5+ w3yUxwzaEutYKz2YQKZ5QnKOxdABsgKyFn/t+sNSsKnPh3f46s8c5Z24cgK320yu WIXPF9eSH+i0nLNzUzAyktxGgvzW50d4EFx1STbWg/WGiBLqRfzOT07BU7vG7cn1 i0VBRVhOiXlCO5eI6yE9sFTs/LTj/hObU60za9QblQaCT86YDvqlfaxKv9/1r8Vv FXqudRLw300zsIilSxWePOZxLX8QR8AY0/ljhHsnw7ckxKTZWeKRnSOx06RIk2fz OODWrTw091ocEdsWELD/kFeZO+vO+CGYKA8vkQGsOQ9Ri5fp7uuTxau66HBHsH7i e8u+GBy4Nv/OEZSwGv2GpJBbtebeb2j7p856xhZZhMxBNggbEPNF/2XpwVl6AORq JnojzS0LW7fhIPguG3zw5zbDNkYV9NTTLTXSU3D4zDTS3KpyWwkJRdR8j3y5mG1u rJV3uGqO =yZXH -----END PGP SIGNATURE----- --h1Kgj0J7YauQlxie--