From patchwork Mon Aug 14 13:32:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 713477 Delivered-To: patch@linaro.org Received: by 2002:a5d:4012:0:b0:317:ecd7:513f with SMTP id n18csp1242479wrp; Mon, 14 Aug 2023 06:36:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/+8M+DnIoIAgh8+gMzkPuWFK2Tnz7N+GMas6cG8ER5+rsWdjREdcY953OcbiBcG3nEGLm X-Received: by 2002:a05:600c:255:b0:3fb:d1db:545b with SMTP id 21-20020a05600c025500b003fbd1db545bmr7510832wmj.20.1692020193347; Mon, 14 Aug 2023 06:36:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692020193; cv=none; d=google.com; s=arc-20160816; b=H5ew3Y9XadUkaoqqkcME/n8mu8PukFACvNvnS9Gwp7VG+uiCf6REKSF5/EAfauyBGT K9F/XLvm4JR82zSUNROBtP8WeDSCDDpBVTAFWh55qRtunk1B1ka99KIT9fX7vIZ7+uzL CqL2FjZwJyHcI9HxoFW9FCupk1AfSuC1iHceavCZRdWFvxse5skfu2XC8w+TJhoFCti7 pX9J9PCnyp4pucIITJuuAcif1Fb6sL4YmmL0QIDDZ96tybwBRJvUiBhBfU8J3U6Fkh17 DI23vllmjW7NEQ4S16M+NEHiIgvDXrkLfAoldIDsSUrI2GkH8rGWE66K8JHE5m3H054F P5KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=/5V5tpvs1LhDJMpJJGRx35A0cjwDkhqdb/yvrrNf9sU=; fh=KONqw1VFBW9nCv9imase+52c+XJ0MeVkzLj6SOLcJqQ=; b=SPqUnV3GjKustQtjLs0QPVfn3QQtw1tS+EMtMuHsWeW4/rHlcpg4yIVelgwy537i32 5NE9u0rVuabn/s8x6nw0SPmXrp50kKxM90qShFzq6kdjm3eMF0vVWq8PbFUMnm2jOHA2 Ow3swqkLQ5BFbyPZvGYXDgGShXSvm1ffoy/kY0sBCw90oiKn/xT5CvaB9DlcniMGsVC1 iuuje+Y5e0tHc2zZeEUEuvpDIW1BV5GZHWDVsedQLmBrQQ8DvxFTIQcZuWq2Z+NNWnXT wqX2by0Ual3ZbwJACtuQbVwP1orohj/19igndM8joe/OAyjs5foTR1oQf/JesugEi3J7 F+PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EWtXSWlP; 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 Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id bd6-20020a05600c1f0600b003fe26afa5b5si5827603wmb.180.2023.08.14.06.36.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 06:36:33 -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=EWtXSWlP; 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 Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C74848696C; Mon, 14 Aug 2023 15:35:34 +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="EWtXSWlP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4387A8698E; Mon, 14 Aug 2023 15:35:34 +0200 (CEST) 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,SPF_HELO_NONE,SPF_PASS, UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.2 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (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 4881D807B4 for ; Mon, 14 Aug 2023 15:35:32 +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=maxim.uvarov@linaro.org Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2b9b5ee9c5aso67049011fa.1 for ; Mon, 14 Aug 2023 06:35:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692020131; x=1692624931; 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=/5V5tpvs1LhDJMpJJGRx35A0cjwDkhqdb/yvrrNf9sU=; b=EWtXSWlPh8Xga2QASNm/KDlIfqrMWycLUFrXfv2QqAVWH8sXXbsIWLt+l6cPVH/+tW SPC2F0mSbsjiI2xYwwP9ozjobO0EYkCLho+OPAqp0Vd8yj9Kq/aQDPJLf0w971Dk/y2S v15bY8vQ5TqjnHYzXjsBBu+HYCFivUh26y7yR1usbK4m70pPdJMB6W9FRzVLr8NynPS9 dOSQRyiihsoYl4DLcjmnYcTotAmNBqvWcEV+olITWsVMMp8m919NxH3Ck21jSB3pKFuV xdtXv94kXmB6HWB4AThdCU50DihTgAkVzaPGL+LBhEPNfny0H8FFFzShRn8cDi8xFz5t O3Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692020131; x=1692624931; 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=/5V5tpvs1LhDJMpJJGRx35A0cjwDkhqdb/yvrrNf9sU=; b=kmUDkqwZvnInMEdGgUg/zfdReaVmulZo6pHmvkbaGrVFSOb0/dUFUezAZ8SzQo10jx iyBQ2kSHg5e39neo1hIqWBmZRUxkvSq8f+x5m79eKyazICBQP9CHTFn18iaivBzAHAD6 yQ6ErNrQy7wJSHxmShwlK6E6BQvFkPCtGzFbd6+zFnzltfJ/nYRHLvmroYpxQPKkzKll I0g8mbh+gUXpsXxe01EYWA3IBBaY3Hq0kpZRuPLkr8nCfQQpMYPJbRuzt+IqqESHHWUC nP2WM2A9jOJ7/5C32+t0M/oQLFNCQ9cZgFcjTfH68AiZf6TfYJItVIeNOGv6tTp+xGJH tyoA== X-Gm-Message-State: AOJu0Yxnjwo+d5RrZN3bRp8yzsQpJi6pC+V8ZGGG0VR6oIDDlTxisSqt kj43cgcUQcqMfJYQZgyldkaB7e9k99tIj/x73/I= X-Received: by 2002:a2e:9955:0:b0:2b9:ea17:5590 with SMTP id r21-20020a2e9955000000b002b9ea175590mr6041040ljj.16.1692020131382; Mon, 14 Aug 2023 06:35:31 -0700 (PDT) Received: from localhost.localdomain ([45.82.14.220]) by smtp.gmail.com with ESMTPSA id z24-20020a2e9658000000b002b9415597d0sm2411102ljh.78.2023.08.14.06.35.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 06:35:31 -0700 (PDT) From: Maxim Uvarov To: u-boot@lists.denx.de Cc: pbrobinson@redhat.com, ilias.apalodimas@linaro.org, joe.hershberger@ni.com, rfried.dev@gmail.com, trini@konsulko.com, goldsimon@gmx.de, lwip-devel@nongnu.org, Maxim Uvarov Subject: [PATCHv6 08/14] net/lwip: add lwIP configuration Date: Mon, 14 Aug 2023 19:32:47 +0600 Message-Id: <20230814133253.4150-9-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230814133253.4150-1-maxim.uvarov@linaro.org> References: <20230814133253.4150-1-maxim.uvarov@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 lwip configuration can be tuned with header file. Signed-off-by: Maxim Uvarov --- net/lwip/lwipopts.h | 195 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 net/lwip/lwipopts.h diff --git a/net/lwip/lwipopts.h b/net/lwip/lwipopts.h new file mode 100644 index 0000000000..23d87e3f65 --- /dev/null +++ b/net/lwip/lwipopts.h @@ -0,0 +1,195 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +/* + * (C) Copyright 2023 Linaro Ltd. + */ + +#ifndef LWIP_LWIPOPTS_H +#define LWIP_LWIPOPTS_H + +#include "lwipopts.h" + +#if defined(CONFIG_LWIP_LIB_DEBUG) +#define LWIP_DEBUG 1 +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL +#define LWIP_DBG_TYPES_ON LWIP_DBG_ON +#define ETHARP_DEBUG LWIP_DBG_OFF +#define NETIF_DEBUG LWIP_DBG_OFF +#define PBUF_DEBUG LWIP_DBG_OFF +#define API_LIB_DEBUG LWIP_DBG_OFF +#define API_MSG_DEBUG LWIP_DBG_OFF +#define SOCKETS_DEBUG LWIP_DBG_OFF +#define ICMP_DEBUG LWIP_DBG_OFF +#define IGMP_DEBUG LWIP_DBG_OFF +#define INET_DEBUG LWIP_DBG_OFF +#define IP_DEBUG LWIP_DBG_OFF +#define IP_REASS_DEBUG LWIP_DBG_OFF +#define RAW_DEBUG LWIP_DBG_OFF +#define MEM_DEBUG LWIP_DBG_OFF +#define MEMP_DEBUG LWIP_DBG_OFF +#define SYS_DEBUG LWIP_DBG_OFF +#define TIMERS_DEBUG LWIP_DBG_OFF +#define TCP_DEBUG LWIP_DBG_OFF +#define TCP_INPUT_DEBUG LWIP_DBG_OFF +#define TCP_FR_DEBUG LWIP_DBG_OFF +#define TCP_RTO_DEBUG LWIP_DBG_OFF +#define TCP_CWND_DEBUG LWIP_DBG_OFF +#define TCP_WND_DEBUG LWIP_DBG_OFF +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF +#define TCP_RST_DEBUG LWIP_DBG_OFF +#define TCP_QLEN_DEBUG LWIP_DBG_OFF +#define UDP_DEBUG LWIP_DBG_OFF +#define TCPIP_DEBUG LWIP_DBG_OFF +#define SLIP_DEBUG LWIP_DBG_OFF +#define DHCP_DEBUG LWIP_DBG_ON +#define AUTOIP_DEBUG LWIP_DBG_ON +#define DNS_DEBUG LWIP_DBG_ON +#define IP6_DEBUG LWIP_DBG_OFF +#define DHCP6_DEBUG LWIP_DBG_OFF +#else +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL +#define LWIP_DBG_TYPES_ON LWIP_DBG_OFF +#define ETHARP_DEBUG LWIP_DBG_OFF +#define NETIF_DEBUG LWIP_DBG_OFF +#define PBUF_DEBUG LWIP_DBG_OFF +#define API_LIB_DEBUG LWIP_DBG_OFF +#define API_MSG_DEBUG LWIP_DBG_OFF +#define SOCKETS_DEBUG LWIP_DBG_OFF +#define ICMP_DEBUG LWIP_DBG_OFF +#define IGMP_DEBUG LWIP_DBG_OFF +#define INET_DEBUG LWIP_DBG_OFF +#define IP_DEBUG LWIP_DBG_OFF +#define IP_REASS_DEBUG LWIP_DBG_OFF +#define RAW_DEBUG LWIP_DBG_OFF +#define MEM_DEBUG LWIP_DBG_OFF +#define MEMP_DEBUG LWIP_DBG_OFF +#define SYS_DEBUG LWIP_DBG_OFF +#define TIMERS_DEBUG LWIP_DBG_OFF +#define TCP_DEBUG LWIP_DBG_OFF +#define TCP_INPUT_DEBUG LWIP_DBG_OFF +#define TCP_FR_DEBUG LWIP_DBG_OFF +#define TCP_RTO_DEBUG LWIP_DBG_OFF +#define TCP_CWND_DEBUG LWIP_DBG_OFF +#define TCP_WND_DEBUG LWIP_DBG_OFF +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF +#define TCP_RST_DEBUG LWIP_DBG_OFF +#define TCP_QLEN_DEBUG LWIP_DBG_OFF +#define UDP_DEBUG LWIP_DBG_OFF +#define TCPIP_DEBUG LWIP_DBG_OFF +#define SLIP_DEBUG LWIP_DBG_OFF +#define DHCP_DEBUG LWIP_DBG_OFF +#define AUTOIP_DEBUG LWIP_DBG_OFF +#define DNS_DEBUG LWIP_DBG_OFF +#define IP6_DEBUG LWIP_DBG_OFF +#define DHCP6_DEBUG LWIP_DBG_OFF +#endif +#define LWIP_TESTMODE 0 + +#if defined(CONFIG_LWIP_LIB_NOASSERT) +#define LWIP_NOASSERT 1 +#define LWIP_ASSERT(message, assertion) +#endif + +#include "lwip/debug.h" + +#define SYS_LIGHTWEIGHT_PROT 0 +#define NO_SYS 0 + +#define LWIP_IPV6 0 + +#define MEM_ALIGNMENT 1 +#define MEM_SIZE 1600 + +#define MEMP_NUM_PBUF 4 +#define MEMP_NUM_RAW_PCB 2 +#define MEMP_NUM_UDP_PCB 4 +#define MEMP_NUM_TCP_PCB 2 +#define MEMP_NUM_TCP_PCB_LISTEN 2 +#define MEMP_NUM_TCP_SEG 16 +#define MEMP_NUM_REASSDATA 1 +#define MEMP_NUM_ARP_QUEUE 2 +#define MEMP_NUM_SYS_TIMEOUT 4 +#define MEMP_NUM_NETBUF 2 +#define MEMP_NUM_NETCONN 32 +#define MEMP_NUM_TCPIP_MSG_API 8 +#define MEMP_NUM_TCPIP_MSG_INPKT 8 +#define PBUF_POOL_SIZE 8 + +#define LWIP_ARP 1 + +#define IP_FORWARD 0 +#define IP_OPTIONS_ALLOWED 1 +#define IP_REASSEMBLY 1 +#define IP_FRAG 1 +#define IP_REASS_MAXAGE 3 +#define IP_REASS_MAX_PBUFS 4 +#define IP_FRAG_USES_STATIC_BUF 0 + +#define IP_DEFAULT_TTL 255 + +#define LWIP_ICMP 1 + +#define LWIP_RAW 1 + +#if defined(CONFIG_LWIP_LIB_DHCP) +#define LWIP_DHCP 1 +#define LWIP_DHCP_BOOTP_FILE 1 +#else +#define LWIP_DHCP 0 +#endif +#define LWIP_DHCP_DOES_ACD_CHECK 0 + +#define LWIP_AUTOIP 0 + +#define LWIP_SNMP 0 + +#define LWIP_IGMP 0 + +#if defined(CONFIG_LWIP_LIB_DNS) +#define LWIP_DNS 1 +#else +#define LWIP_DNS 0 +#endif + +#if defined(CONFIG_LWIP_LIB_TCP) +#define LWIP_UDP 1 +#else +#define LWIP_UDP 0 +#endif + +#if defined(CONFIG_LWIP_LIB_TCP) +#define LWIP_TCP 1 +#else +#define LWIP_TCP 0 +#endif + +#define LWIP_LISTEN_BACKLOG 0 + +#define PBUF_LINK_HLEN 14 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS + 40 + PBUF_LINK_HLEN) + +#define LWIP_HAVE_LOOPIF 0 + +#define LWIP_NETCONN 0 +#define LWIP_DISABLE_MEMP_SANITY_CHECKS 1 + +#define LWIP_SOCKET 0 +#define SO_REUSE 0 + +#define LWIP_STATS 0 + +#define PPP_SUPPORT 0 + +#define LWIP_TCPIP_CORE_LOCKING 0 + +#if defined(CONFIG_LWIP_LIB_LOOPBACK) +#define LWIP_NETIF_LOOPBACK 1 +#else +#define LWIP_NETIF_LOOPBACK 0 +#endif +/* use malloc instead of pool */ +#define MEMP_MEM_MALLOC 1 +#define MEMP_MEM_INIT 1 +#define MEM_LIBC_MALLOC 1 + +#endif /* LWIP_LWIPOPTS_H */