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 C7FC8C77B7A for ; Fri, 19 May 2023 13:17:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 818AD86131; Fri, 19 May 2023 15:17:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="C8DaZQ9f"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1931A86249; Fri, 19 May 2023 15:17:13 +0200 (CEST) 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 1774484706 for ; Fri, 19 May 2023 15:17:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f41dceb9c9so22229125e9.3 for ; Fri, 19 May 2023 06:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684502229; x=1687094229; 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=ReL3oAYX/2YMSnwlTqWXC/0n6avq2dBcm/wQJkzbdmg=; b=C8DaZQ9fWcWUiZyaqv2dxaVkrtBeL0xdf76nnkkXE/0sNr6KLRZ5zw5YZbE6B0NpE+ 9XK9/exIpb/8/d0Ts8aQU+QpWrxFRc0IRjzBU0RzVqBRUq5tMqT0JZk7XGLSvQs3zciI vxjFxnWVPA1wzq2eCDzEzODU66rQ/bE84IZyHBU6BdO1n7g7o3KMGICN/haK+0cs37p4 AVfevuSztiGMmhnV6EAf7XWzoKYVDb6kkESM81SB5G9ALtxQXYM3UGQYNBrCjiyRX4W2 Hh9SZQaBNSAsKOnK5E2cBOUEi4fMut7R45o7rsKENyhvoCA2F00oKD2W0T0qZD1qe5r5 KPpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684502229; x=1687094229; 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=ReL3oAYX/2YMSnwlTqWXC/0n6avq2dBcm/wQJkzbdmg=; b=jmgvv1GWI4TP+8upln2V+4k7ixTd9O52fP3dmLIc4Pe2INTsu9/aZEAFF398wXuA4N qyEU4twzHt2T1B3niLb12QKXar5Lx9vlkJ9fl+B3qDgGXIJzB5P7MTK10ZOMUgbc9051 kZj4yQDH4aBYRSICebkkJ3R9JL22OUQI1brBq6L/0d4r9hlSIIVzU6qdau1U8v3HZHS2 ZcZEexT325JPVTkQRLmOK0fn0WGtzMBnO+VPpB5Ow+VppxR2P27229QH7dCu2Yt6mSPK hd9PxysEkrwfmQX/bds0a3NeEjbr58tFHfkFYii119Zy76blyy9nrau17J9nNLYnO+yT RzXQ== X-Gm-Message-State: AC+VfDy+BZP4XjdWC30WZuYOXxrqOu1zxWXI8dPruBlKXHdmESBLyR2a D7fpjiK/RDW71URS3tkWssnv0A== X-Google-Smtp-Source: ACHHUZ60XXL87Co/JlPABiwxHnQwruWGARSn9e5vNxDZX/jrNaXP7i6HO3uEDieJaJohZdIReTyjHw== X-Received: by 2002:a1c:c911:0:b0:3f5:772:f333 with SMTP id f17-20020a1cc911000000b003f50772f333mr1253942wmb.4.1684502229525; Fri, 19 May 2023 06:17:09 -0700 (PDT) Received: from hades (ppp176092130041.access.hol.gr. [176.92.130.41]) by smtp.gmail.com with ESMTPSA id y9-20020a05600c364900b003f4266965fbsm2435676wmq.5.2023.05.19.06.17.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 06:17:08 -0700 (PDT) Date: Fri, 19 May 2023 16:17:06 +0300 From: Ilias Apalodimas To: Tom Rini Cc: Maxim Uvarov , u-boot@lists.denx.de, pbrobinson@redhat.com, joe.hershberger@ni.com, rfried.dev@gmail.com Subject: Re: [RFC PATCH 0/5] LWIP stack integration Message-ID: References: <20230505102529.1254445-1-maxim.uvarov@linaro.org> <20230511135204.GW2398826@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230511135204.GW2398826@bill-the-cat> 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 Hi Tom, Apologies for being late to the party > On Thu, May 11, 2023 at 09:52:04AM -0400, Tom Rini wrote: > On Fri, May 05, 2023 at 10:25:24AM +0000, Maxim Uvarov wrote: > > > Greetings, > > > > This RFC patchset is an attempt to try to use an already existing IP network stack inside U-boot. > > U-Boot recently got basic TCP/IP support, implementing wget, but in order to get a full IP stack > > with new features (e.g ipv6), it would be preferable to use an established embedded ip library, > > instead of rewriting the code from scratch. > > > > For this experiment LWIP network stack was selected: > > https://savannah.nongnu.org/git/?group=lwip > > > > LWIP main features include: > > - Protocols: IP, IPv6, ICMP, ND, MLD, UDP, TCP, IGMP, ARP, PPPoS, PPPoE > > - DHCP client, DNS client (incl. mDNS hostname resolver), AutoIP/APIPA (Zeroconf), > > SNMP agent (v1, v2c, v3, private MIB support & MIB compiler) > > - APIs: specialized APIs for enhanced performance, optional Berkeley-alike socket API > > - Extended features: IP forwarding over multiple network interfaces, TCP congestion control, > > RTT estimation and fast recovery/fast retransmit > > - Addon applications: HTTP(S) server, SNTP client, SMTP(S) client, ping, NetBIOS nameserver, > > mDNS responder, MQTT client, TFTP server. > > > > This RFC work is a demo to enable lwIP (lightweight IP) which is a widely used open-source > > TCP/IP stack designed for embedded systems for U-boot. That will allow using already > > written network applications for microcontrollers. > > > > lwIP is licensed under a BSD-style license: http://lwip.wikia.com/wiki/License. > > Which should be compatible with u-boot. > > > > In the current RFC I tried to use minimal changes to better see how LWIP code can be embedded into > > U-boot. Patches implement ping and wget commands work. Both commands are currently copy pasting and > > reusing lwIP examples. Whether we want to add the final application in U-Boot or lwIP is up to > > discussion, but the current approach was the easiest one for an RFC. > > I'm honestly not sure this is the most useful way of doing an RFC. The > long term goal would be that we replace our existing net/ with lwIP, > yes? So what I'd see as more valuable is what it looks like to limit > yourself to either sandbox or some QEMU target, disable the current > network stack, and instead use lwIP to support just cmd/net.c so that > the scope of the conversion is visible. Then the size comparison you do > should be between platform + net + cmd/net.c (and the rest of networking > turned off) and platform + lwip + cmd/net.c converted. This might be a bit too much imho. How about replacing the TCP stack which is new an under heavy devel as well. If we do that we could replace lwip with the version Maxim proposes and check the difference between U-boot + homegrown TCP + wget U-Boot + LWIP (for tcp only) + new wget That would give us an idea before trying to replace the UDP portion which is way bigger Regards /Ilias > > -- > Tom