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 D5B30EB64D7 for ; Fri, 30 Jun 2023 16:38:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6394886839; Fri, 30 Jun 2023 18:38:39 +0200 (CEST) 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="Ad3NXVNK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A617586839; Fri, 30 Jun 2023 18:38:36 +0200 (CEST) Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) (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 E070B86838 for ; Fri, 30 Jun 2023 18:38:33 +0200 (CEST) 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-yw1-x1131.google.com with SMTP id 00721157ae682-5728df0a7d9so22896457b3.1 for ; Fri, 30 Jun 2023 09:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1688143112; x=1690735112; 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=Hi2mKHObzvreTWpYqulcbFyDJ/7FWbTozl5N+oumxr0=; b=Ad3NXVNKa0WwLbzzizeTSJSB79IzEJdmTSbsDWuWSSlQ6Oj+gQqhSYsClYSaUcQfWd Obs5yDsHrlE4FNZfmb1z9M0/Km6TAF6Nf0z+SCzpLhUjHBpKlg3+PgTqQ/E5PTk9KXev 4SQ7BSLZKvxkK4HW9rRqpnZ0qhHYBghDIh4Cc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688143112; x=1690735112; 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=Hi2mKHObzvreTWpYqulcbFyDJ/7FWbTozl5N+oumxr0=; b=H7xjwXhpT8qoW6A7rstZksTVAxb2SyjwEPTvPIb3BfW6L1xs0HigVh6zsX+oky1v/N JAS043kJv7iWvaZjJwjqBjhuzNNVqQAq6V/6CcHnjmmEr/4ThEVkt23Xyzd4Jb4M424L 6qBY/CRApb+fpUHdRd+4ob/6rtuE9F1UrAIYdz6DbhVMrwU/Gp/7i3Nue8l6cBIhT9D+ 0XwCvrVC/EinLTUHKOw9ZMAxV5ft3aqzpVJrNMZbT2kgzQTN+IHYJhNMhsU07E3oOQ3V 0Y+xdNC3Ma9NSjhU+KKEH1yFvtBQtIcHBpZdr4RHzwrXl5dQ+A+0qx1/CyEV0hLSmk1n mYhQ== X-Gm-Message-State: ABy/qLZwW61lC8xIrXgcAjtt/f2qRsnOlSsIoEGyzZN0486jtYGhh3i4 TyFRxPduIWk8pbIZmNobTLuGOr8+SKojT3/RTmXa5g== X-Google-Smtp-Source: APBJJlHk3S/zFFPr+/yxt0LIky+lORGEds71kMoP+VuVAmzk7z3Fn0MlUP1lCrf2wPjiyVF8+nq+6Q== X-Received: by 2002:a81:c30b:0:b0:570:90a:3a67 with SMTP id r11-20020a81c30b000000b00570090a3a67mr3162507ywk.20.1688143112596; Fri, 30 Jun 2023 09:38:32 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-1dc5-0846-cf6b-8ae6.res6.spectrum.com. [2603:6081:7b00:6400:1dc5:846:cf6b:8ae6]) by smtp.gmail.com with ESMTPSA id f2-20020a0ddc02000000b00577044eb00esm1566676ywe.21.2023.06.30.09.38.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jun 2023 09:38:32 -0700 (PDT) Date: Fri, 30 Jun 2023 12:38:30 -0400 From: Tom Rini To: Maxim Uvarov Cc: u-boot@lists.denx.de, pbrobinson@redhat.com, ilias.apalodimas@linaro.org, joe.hershberger@ni.com, rfried.dev@gmail.com, goldsimon@gmx.de, lwip-devel@nongnu.org Subject: Re: [PATCHv2 3/3] net/lwip: add lwip library for the network stack Message-ID: <20230630163830.GO3931582@bill-the-cat> References: <20230629123430.3679-1-maxim.uvarov@linaro.org> <20230629123430.3679-3-maxim.uvarov@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EQPyOsGA071VA5a+" Content-Disposition: inline In-Reply-To: <20230629123430.3679-3-maxim.uvarov@linaro.org> 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.8 at phobos.denx.de X-Virus-Status: Clean --EQPyOsGA071VA5a+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 29, 2023 at 06:34:30PM +0600, Maxim Uvarov wrote: > This commit adds lwip library for the U-boot network > stack. Supported commands: ping, tftp, dhcp and wget. >=20 > Signed-off-by: Maxim Uvarov [snip] > diff --git a/lib/lwip/Kconfig b/lib/lwip/Kconfig > new file mode 100644 > index 0000000000..80d540ba54 > --- /dev/null > +++ b/lib/lwip/Kconfig > @@ -0,0 +1,108 @@ > +menu "LWIP" > +config LWIP_LIB > + bool "Support LWIP library" > + help > + Selecting this option will enable the shared LWIP library code. > + > +menu "LWIP options" > +config LWIP_LIB_DEBUG > + bool "enable debug" > + default n > +config LWIP_LIB_NOASSERT > + bool "disable asserts" > + default y > + help > + Disabling asserts reduces binary size on 16k. > +config LWIP_LIB_TCP > + bool "tcp" > + default y > +config LWIP_LIB_UDP > + bool "udp" > + default y > +config LWIP_LIB_DNS > + bool "dns" > + default n > +config LWIP_LIB_DHCP > + bool "dhcp" > + default y > + > +config LWIP_LIB_LOOPBACK > + bool "loopback" > + default n > + help > + Increases size on 1k. > +config LWIP_LIB_SOCKET > + bool "socket API" > + default n > +config LWIP_LIB_NETCONN > + bool "netconn API" > + default n > +config LWIP_LIB_MEM_SIZE > + int "mem size" > + default 1600 > + range 1 4096 > + help > + MEM_SIZE: the size of the heap memory. If the application will send > + a lot of data that needs to be copied, this should be set high. > + > +config LWIP_LIB_PBUF_LINK_HLEN > + int "pbuf link hlen" > + default 14 > + range 4 1024 > + help > + PBUF_LINK_HLEN: the number of bytes that should be allocated for a > + link level header. The default is 14, the standard value for = Ethernet. > +endmenu > + > +config CMD_LWIP > + bool "lwip cmd" > + default y > + depends on LWIP_LIB > + help > + lwip networking command. > + > +config CMD_LWIP_PING > + bool "ping" > + default y > + depends on CMD_LWIP > + help > + lwip ping command. > + > +config CMD_LWIP_REPLACE_PING > + bool "replace original ping command" > + default n > + > +config CMD_LWIP_WGET > + bool "wget" > + default y > + depends on CMD_LWIP > + help > + lwip wget command. > + > +config CMD_LWIP_REPLACE_WGET > + bool "replace original wget command" > + default n > + > +config CMD_LWIP_TFTP > + bool "tftp" > + default y > + depends on CMD_LWIP > + help > + lwip tftp command. > + > +config CMD_LWIP_REPLACE_TFTP > + bool "replace original tftp command" > + default n > + > +config CMD_LWIP_DHCP > + bool "dhcp" > + default y > + depends on CMD_LWIP > + depends on LWIP_LIB_DHCP > + help > + lwip dhcp command. > + > +config CMD_LWIP_REPLACE_DHCP > + bool "replace original dhcp command" > + default n > +endmenu So,, the spacing needs to be fixed up, and "default n" is the default when no "default" keyword is present. But here's the big change I want, if we enable LWIP it should replace the other commands. For debug / testing, it's OK for "lwip dhcp" to be how to run it, but since the goal is replacement, it needs to replace. I want to be able to do drop CONFIG_LWIP=3Dy in my CI script and have all of my boards use LWIP for the normal networking tests so I can report back that things work, or that there's problems to sort out. Thanks! --=20 Tom --EQPyOsGA071VA5a+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmSfBQYACgkQFHw5/5Y0 tyxv9wv/Q1hW9wWPkG53KOTziSNDTfd20kZ9wDvtnvyk8zxnGesjl24CGsk9eoEI WIeyVs2IpcLXzIPKKgdes5bKffVTTYhCDgfA52fizImXgJsRl9cu0Ki3FRr0mHHS tnWtg3yiBKuq3XKU55CpdR7W3xydMZ9gzj4hBDjvl1C1A4deG5mpaBIHDB/GxOAk Hq+8szYt5zE2Ms54EOdqpjKEujyOwZEcfjP5JlBHFST9VTkLOojkmFNOG+J8M8E7 KndVCq/5JwQQJJiaxopOk3zcY8Cpz2R9Gjzcw5FIW2yRWcm/zy5Zl2WqgJT7AQ1S reOIakJf0Kt0o/svL+2KtXAGK6wGYXKk3YtqZmk4FqKAFGGC0nUIrMa4CPK7vnaX 1ejexc/lcr/ZbL7t+EgfN5TvtRYXVtCi4K7FZRhohOJWJbA0GuGEpvseWbj3v3X7 jOxeBqFskoPXTm/PLbWjdH0R2iOB6VFlj6fUxf8eBdKXMJ0DwuKjDm1G53TpESWp zFDwGQgv =ZI7+ -----END PGP SIGNATURE----- --EQPyOsGA071VA5a+--