From mboxrd@z Thu Jan 1 00:00:00 1970 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 A3C24C7EE29 for ; Fri, 2 Jun 2023 13:56:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 15596862FA; Fri, 2 Jun 2023 15:56:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1685714191; bh=YgGB5YEPs2WUs+/fbvFOg9gA/2IlTaH51JCcWnnzILk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vkf64ao0uHXZNqVyTkZBgQ7igTicLSfb4ojkPmg4VRKoUi3+RhEge8pGYuQRksBDE DsvJ4NyzDwvtbX3qYN+5XuyymnFLkim+tpdKdv5PTAQBc3807AvksupTgFhNezuVhP uVf4rIthyZveeIwZ/IwfM7QrwJE0RlPHRP7vmH9OQyEwuNnrRdLVlNeDCZWAnynhNy YgTrEV4Emq1QHZf4yKAZKcta1ViDQ/DGYOnkT+EJlFongJ0fWA4BMSPiAS1nmxXVel gozO1IJeQoSER79Ik5m0ERCG437g0Kh6//+RrT4QW8FYR8C29KgRr8hoAdBWXnZ5dz OoGS159pAWqzQ== Received: from wsk (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 7018C8617C; Fri, 2 Jun 2023 15:56:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1685714189; bh=YgGB5YEPs2WUs+/fbvFOg9gA/2IlTaH51JCcWnnzILk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jUJn8nKxlPDKFsydIcVvmhMtHskD9O4jNbXTZM6bd3jG0pjYpPOrRU5ltcKGsymWK cOr5c8dU/2EKucQ72MF/zayJv40DwOfornI4A/ySdBlJCOovWbmzLgA4boY2vpoAiA kZ34S462LmWY01CcmFZCZEvXG1KpppKCAaLX6qwoFCN/E3Qx86mMoumFD5XUD9s/u+ oHuUbqbc8lRCjX2FkHl9kzkV/mwES24DpMLdASLv6//L3kDFN5XHjzvK26nq4YNRGg KqeKtdUl/7gGhBQcyXnpFqmnR3XYNZ+jWFAHaO5mRuLnUTY2SBjZ2xXm+p5W8VCg3I joy926Dahq+Zg== Date: Fri, 2 Jun 2023 15:56:20 +0200 From: Lukasz Majewski To: Vladimir Oltean Cc: Marek Vasut , u-boot@lists.denx.de, Tom Rini , Anatolij Gustschin , Ramon Fried , Joe Hershberger , Marek Vasut , Michal Simek , Tim Harvey Subject: Re: [PATCH v1 2/6] net: mv88e61xx: Configure PHY ports to also pass packets between them Message-ID: <20230602155620.20ffa002@wsk> In-Reply-To: <20230601164651.tquily3zoi2hhgwt@skbuf> References: <20230601100005.2216345-1-lukma@denx.de> <20230601100005.2216345-3-lukma@denx.de> <0ab25898-2fe6-7d86-7d63-ff3d43e82b63@mailbox.org> <20230601130251.12f18dca@wsk> <83893eea-7a3e-8fc1-da43-aa50149fa11c@mailbox.org> <20230601164651.tquily3zoi2hhgwt@skbuf> Organization: denx.de X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/Id4qtur+0eHQuP.dT2tUwNQ"; protocol="application/pgp-signature"; micalg=pgp-sha512 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 --Sig_/Id4qtur+0eHQuP.dT2tUwNQ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Vladimir, > Hi Lukasz, >=20 > On Thu, Jun 01, 2023 at 01:44:30PM +0200, Marek Vasut wrote: > > I think after two years, it would be good to drop the RB tags and > > do another round of reviews. =20 >=20 > To expand on Marek's point. >=20 > In those past 2 years, Tim Harvey has put in a considerable amount of > effort to add another driver for mv88e6xxx that uses DM_DSA. I believe > the current "PHY" driver for the same hardware should be considered > obsolete until all platforms are converted to DM_DSA, then it can be > deleted. So, no new features for it. Ok. Thanks for the clarification. >=20 > Then, there's also the question of the sanity of the proposed change > itself. >=20 > I believe that we need to be humble enough to recognize that the > U-Boot network stack is not competent enough to handle the switching > capabilities of a switch, not even enough for it to be safe. It > doesn't handle STP (Spanning Tree Protocol), for one thing. So it > will never be capable of detecting switching loops, such as to block > one of its ports in order to not kill the network. >=20 > In principle, I would say: as long as there is no plan to handle STP, > there should be no plan to allow autonomous packet forwarding from > U-Boot. The U-Boot network stack is there so that you can TFTP a > kernel and boot it, which is also the only use case behind DM_DSA. >=20 > But you may say: I'm never going to allow packet forwarding from > U-Boot in a network with loops! >=20 > Okay, but your patch suggests otherwise. Which ports allow forwarding > is a compile-time option, which... is by definition contrary to any > runtime network topology determinations. >=20 > Maybe enabling forwarding between switch ports through a CLI command > that communicates with DM_DSA would be tolerable - assuming that users > are smart enough to not use it in a network with STP. No - adding extra command line option is not planned. > But again, I'm > not really sure what's the use case. This is a simple use case - the board on which I do work has two LAN ports, so the device is "attached" to the single LAN cable. When booting the device (even in u-boot) - packet's shall be forwarded between LAN ports to keep the ETH connection. However, I don't want to add STP for the u-boot network stack. I've also looked to Tim's patch set [1] (also in mainline), and I do believe that some extra features for this driver can be added; like ADDR4 (so the address is 'shifted' to 0x10) and !NO_CPU bootstraps (so ports need to be reset at power up). Those features are common for all mv88e6xxx devices. Links: [1] - https://patchwork.ozlabs.org/project/uboot/cover/20221130174251.82087-1-tha= rvey@gateworks.com/ Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de --Sig_/Id4qtur+0eHQuP.dT2tUwNQ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAmR59QQACgkQAR8vZIA0 zr2ECQgAqSelXWo6TN08xbktAPaXYdQmNZ45v0ZwiXr4q2GMGKJUN2qq3paBZOda wCu47wc55y4Le5JylhZFc475mmV/3dmZq8olCD0LR2gwAYW6U29RyVnDLNiaEbVF lSDKTcfWDjhntpyYPsOrHvIxjW56Cfy6fd5JihuvAIBTZbKdLupxnl1FuA8T0bIo +NBz1d2rk9W4DsUk+v5KluXbDnOve8yi19liA4PblB/PS6rW+Lj2kYW5QEkX6JRm xXce7B7uetb+1PPTKKqJ5iHgexrhFPKJAGF2BwYLt4PAL2kcyv/yaAIx7bPyOnQQ hM4uk8SrdfFDBZ2DpsbjuCKZ94oZAg== =IeCT -----END PGP SIGNATURE----- --Sig_/Id4qtur+0eHQuP.dT2tUwNQ--