From 41976226979dfb4ff3ba597ee928540c7917a013 Mon Sep 17 00:00:00 2001 From: Sangsoon Lim Date: Thu, 13 Apr 2017 13:13:30 +0900 Subject: [PATCH] net: modify network Kconfig entries for udp, icmp, mem Configuration sync with Tizen RT spin git for udp, icmp, mem. Change-Id: I43930d7de11f88c8e3d92e40c1aaa8512d91ce90 Signed-off-by: Sangsoon Lim --- build/configs/artik053/nettest/defconfig | 36 +-- .../configs/sidk_s5jt200/sidk_tash_wlan/defconfig | 36 +-- os/include/net/lwip/lwipopts.h | 64 +++--- os/net/lwip/configs/Kconfig | 139 +----------- os/net/lwip/configs/icmp/Kconfig | 38 ++++ os/net/lwip/configs/mem/Kconfig | 252 +++++++++++++++++++++ os/net/lwip/configs/udp/Kconfig | 30 +++ 7 files changed, 392 insertions(+), 203 deletions(-) create mode 100644 os/net/lwip/configs/icmp/Kconfig create mode 100644 os/net/lwip/configs/mem/Kconfig create mode 100644 os/net/lwip/configs/udp/Kconfig diff --git a/build/configs/artik053/nettest/defconfig b/build/configs/artik053/nettest/defconfig index 0366000..cb13c76 100644 --- a/build/configs/artik053/nettest/defconfig +++ b/build/configs/artik053/nettest/defconfig @@ -634,19 +634,19 @@ CONFIG_NET_LWIP=y # # LwIP memory options # -CONFIG_NET_LWIP_MEM_ALIGNMENT=4 -CONFIG_NET_LWIP_MEM_SIZE=153600 -CONFIG_NET_LWIP_MEMP_OVERFLOW_CHECK=1 -CONFIG_NET_LWIP_MEMP_SANITY_CHECK=y -CONFIG_NET_LWIP_MEMP_NUM_PBUF=50 -CONFIG_NET_LWIP_MEMP_NUM_RAW_PCB=4 -CONFIG_NET_LWIP_MEMP_NUM_UDP_PCB=8 -CONFIG_NET_LWIP_MEMP_NUM_TCP_PCB=8 -CONFIG_NET_LWIP_MEMP_NUM_TCP_PCB_LISTEN=8 -CONFIG_NET_LWIP_MEMP_NUM_TCP_SEG=80 -CONFIG_NET_LWIP_MEMP_NUM_REASSDATA=5 -CONFIG_NET_LWIP_MEMP_NUM_FRAG_PBUF=15 -CONFIG_NET_LWIP_MEMP_NUM_ARP_QUEUE=30 +CONFIG_NET_MEM_ALIGNMENT=4 +CONFIG_NET_MEM_SIZE=153600 +CONFIG_NET_MEMP_OVERFLOW_CHECK=1 +CONFIG_NET_MEMP_SANITY_CHECK=y +CONFIG_NET_MEMP_NUM_PBUF=50 +CONFIG_NET_MEMP_NUM_RAW_PCB=4 +CONFIG_NET_MEMP_NUM_UDP_PCB=8 +CONFIG_NET_MEMP_NUM_TCP_PCB=8 +CONFIG_NET_MEMP_NUM_TCP_PCB_LISTEN=8 +CONFIG_NET_MEMP_NUM_TCP_SEG=80 +CONFIG_NET_MEMP_NUM_REASSDATA=5 +CONFIG_NET_MEMP_NUM_FRAG_PBUF=15 +CONFIG_NET_MEMP_NUM_ARP_QUEUE=30 CONFIG_NET_SOCKET=y CONFIG_NET_RAW=y # CONFIG_NET_SOCKET_OPTION_BROADCAST is not set @@ -655,13 +655,13 @@ CONFIG_NET_RAW=y CONFIG_NET_SO_RCVTIMEO=y # CONFIG_NET_SO_RCVBUF is not set CONFIG_NET_SO_REUSE=y -CONFIG_NET_LWIP_ICMP=y -# CONFIG_NET_LWIP_ICMP_BROADCAST_PING is not set -# CONFIG_NET_LWIP_ICMP_MULTICAST_PING is not set +CONFIG_NET_ICMP=y +# CONFIG_NET_BROADCAST_PING is not set +# CONFIG_NET_MULTICAST_PING is not set CONFIG_NET_LWIP_IGMP=y CONFIG_NET_LWIP_MEMP_NUM_IGMP_GROUP=8 -CONFIG_NET_LWIP_UDP=y -# CONFIG_NET_LWIP_UDPLITE is not set +CONFIG_NET_UDP=y +# CONFIG_NET_UDPLITE is not set CONFIG_NET_TCP=y CONFIG_NET_TCP_KEEPALIVE=y CONFIG_NET_TCP_WND=58400 diff --git a/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig b/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig index 6fe60d6..8d53c87 100755 --- a/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig +++ b/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig @@ -635,19 +635,19 @@ CONFIG_NET_LWIP=y # # LwIP memory options # -CONFIG_NET_LWIP_MEM_ALIGNMENT=4 -CONFIG_NET_LWIP_MEM_SIZE=153600 -CONFIG_NET_LWIP_MEMP_OVERFLOW_CHECK=1 -CONFIG_NET_LWIP_MEMP_SANITY_CHECK=y -CONFIG_NET_LWIP_MEMP_NUM_PBUF=50 -CONFIG_NET_LWIP_MEMP_NUM_RAW_PCB=4 -CONFIG_NET_LWIP_MEMP_NUM_UDP_PCB=8 -CONFIG_NET_LWIP_MEMP_NUM_TCP_PCB=8 -CONFIG_NET_LWIP_MEMP_NUM_TCP_PCB_LISTEN=8 -CONFIG_NET_LWIP_MEMP_NUM_TCP_SEG=80 -CONFIG_NET_LWIP_MEMP_NUM_REASSDATA=5 -CONFIG_NET_LWIP_MEMP_NUM_FRAG_PBUF=15 -CONFIG_NET_LWIP_MEMP_NUM_ARP_QUEUE=30 +CONFIG_NET_MEM_ALIGNMENT=4 +CONFIG_NET_MEM_SIZE=153600 +CONFIG_NET_MEMP_OVERFLOW_CHECK=1 +CONFIG_NET_MEMP_SANITY_CHECK=y +CONFIG_NET_MEMP_NUM_PBUF=50 +CONFIG_NET_MEMP_NUM_RAW_PCB=4 +CONFIG_NET_MEMP_NUM_UDP_PCB=8 +CONFIG_NET_MEMP_NUM_TCP_PCB=8 +CONFIG_NET_MEMP_NUM_TCP_PCB_LISTEN=8 +CONFIG_NET_MEMP_NUM_TCP_SEG=80 +CONFIG_NET_MEMP_NUM_REASSDATA=5 +CONFIG_NET_MEMP_NUM_FRAG_PBUF=15 +CONFIG_NET_MEMP_NUM_ARP_QUEUE=30 CONFIG_NET_SOCKET=y CONFIG_NET_RAW=y # CONFIG_NET_SOCKET_OPTION_BROADCAST is not set @@ -656,13 +656,13 @@ CONFIG_NET_RAW=y CONFIG_NET_SO_RCVTIMEO=y # CONFIG_NET_SO_RCVBUF is not set CONFIG_NET_SO_REUSE=y -CONFIG_NET_LWIP_ICMP=y -# CONFIG_NET_LWIP_ICMP_BROADCAST_PING is not set -# CONFIG_NET_LWIP_ICMP_MULTICAST_PING is not set +CONFIG_NET_ICMP=y +# CONFIG_NET_BROADCAST_PING is not set +# CONFIG_NET_MULTICAST_PING is not set CONFIG_NET_LWIP_IGMP=y CONFIG_NET_LWIP_MEMP_NUM_IGMP_GROUP=8 -CONFIG_NET_LWIP_UDP=y -# CONFIG_NET_LWIP_UDPLITE is not set +CONFIG_NET_UDP=y +# CONFIG_NET_UDPLITE is not set CONFIG_NET_TCP=y CONFIG_NET_TCP_KEEPALIVE=y CONFIG_NET_TCP_WND=58400 diff --git a/os/include/net/lwip/lwipopts.h b/os/include/net/lwip/lwipopts.h index 602aa35..d53e26f 100755 --- a/os/include/net/lwip/lwipopts.h +++ b/os/include/net/lwip/lwipopts.h @@ -158,19 +158,19 @@ /* ---------- ICMP options ---------- */ -#ifdef CONFIG_NET_LWIP_ICMP +#ifdef CONFIG_NET_ICMP #define LWIP_ICMP 1 #else #define LWIP_ICMP 0 #endif -#ifdef CONFIG_NET_LWIP_ICMP_BROADCAST_PING +#ifdef CONFIG_NET_BROADCAST_PING #define LWIP_BROADCAST_PING 1 #else #define LWIP_BROADCAST_PING 0 #endif -#ifdef CONFIG_NET_LWIP_ICMP_MULTICAST_PING +#ifdef CONFIG_NET_MULTICAST_PING #define LWIP_MULTICAST_PING 1 #else #define LWIP_MULTICAST_PING 0 @@ -251,13 +251,13 @@ /* ---------- UDP options ---------- */ -#ifdef CONFIG_NET_LWIP_UDP +#ifdef CONFIG_NET_UDP #define LWIP_UDP 1 #else #define LWIP_UDP 0 #endif -#ifdef CONFIG_NET_LWIP_UDPLITE +#ifdef CONFIG_NET_UDPLITE #define LWIP_UDPLITE 1 #else #define LWIP_UDPLITE 0 @@ -326,25 +326,25 @@ #define MEMP_NUM_TCPIP_INPKT 16 /* ---------- Memory options ---------- */ -#if !defined(CONFIG_NET_LWIP_MEM_ALIGNMENT) -#error "CONFIG_NET_LWIP_MEM_ALIGNMENT is undefined" +#if !defined(CONFIG_NET_MEM_ALIGNMENT) +#error "CONFIG_NET_MEM_ALIGNMENT is undefined" #else -#define MEM_ALIGNMENT CONFIG_NET_LWIP_MEM_ALIGNMENT +#define MEM_ALIGNMENT CONFIG_NET_MEM_ALIGNMENT #endif -#if !defined(CONFIG_NET_LWIP_MEM_SIZE) -#error "CONFIG_NET_LWIP_MEM_SIZE is undefined" +#if !defined(CONFIG_NET_MEM_SIZE) +#error "CONFIG_NET_MEM_SIZE is undefined" #else -#define MEM_SIZE CONFIG_NET_LWIP_MEM_SIZE +#define MEM_SIZE CONFIG_NET_MEM_SIZE #endif -#ifdef CONFIG_NET_LWIP_MEMP_OVERFLOW_CHECK -#define MEMP_OVERFLOW_CHECK CONFIG_NET_LWIP_MEMP_OVERFLOW_CHECK +#ifdef CONFIG_NET_MEMP_OVERFLOW_CHECK +#define MEMP_OVERFLOW_CHECK CONFIG_NET_MEMP_OVERFLOW_CHECK #else #define MEMP_OVERFLOW_CHECK 0 #endif -#ifdef CONFIG_NET_LWIP_MEMP_SANITY_CHECK +#ifdef CONFIG_NET_MEMP_SANITY_CHECK #define MEMP_SANITY_CHECK 1 #else #define MEMP_SANITY_CHECK 0 @@ -352,41 +352,41 @@ #define MEMP_MEM_MALLOC 1 -#ifdef CONFIG_NET_LWIP_MEMP_NUM_PBUF -#define MEMP_NUM_PBUF CONFIG_NET_LWIP_MEMP_NUM_PBUF +#ifdef CONFIG_NET_MEMP_NUM_PBUF +#define MEMP_NUM_PBUF CONFIG_NET_MEMP_NUM_PBUF #endif -#ifdef CONFIG_NET_LWIP_MEMP_NUM_RAW_PCB -#define MEMP_NUM_RAW_PCB CONFIG_NET_LWIP_MEMP_NUM_RAW_PCB +#ifdef CONFIG_NET_MEMP_NUM_RAW_PCB +#define MEMP_NUM_RAW_PCB CONFIG_NET_MEMP_NUM_RAW_PCB #endif -#ifdef CONFIG_NET_LWIP_MEMP_NUM_UDP_PCB -#define MEMP_NUM_UDP_PCB CONFIG_NET_LWIP_MEMP_NUM_UDP_PCB +#ifdef CONFIG_NET_MEMP_NUM_UDP_PCB +#define MEMP_NUM_UDP_PCB CONFIG_NET_MEMP_NUM_UDP_PCB #endif -#ifdef CONFIG_NET_LWIP_MEMP_NUM_TCP_PCB -#define MEMP_NUM_TCP_PCB CONFIG_NET_LWIP_MEMP_NUM_TCP_PCB +#ifdef CONFIG_NET_MEMP_NUM_TCP_PCB +#define MEMP_NUM_TCP_PCB CONFIG_NET_MEMP_NUM_TCP_PCB #endif -#ifdef CONFIG_NET_LWIP_MEMP_NUM_TCP_PCB_LISTEN -#define MEMP_NUM_TCP_PCB_LISTEN CONFIG_NET_LWIP_MEMP_NUM_TCP_PCB_LISTEN +#ifdef CONFIG_NET_MEMP_NUM_TCP_PCB_LISTEN +#define MEMP_NUM_TCP_PCB_LISTEN CONFIG_NET_MEMP_NUM_TCP_PCB_LISTEN #endif -#ifdef CONFIG_NET_LWIP_MEMP_NUM_TCP_SEG -#define MEMP_NUM_TCP_SEG CONFIG_NET_LWIP_MEMP_NUM_TCP_SEG +#ifdef CONFIG_NET_MEMP_NUM_TCP_SEG +#define MEMP_NUM_TCP_SEG CONFIG_NET_MEMP_NUM_TCP_SEG #endif -#ifdef CONFIG_NET_LWIP_MEMP_NUM_REASSDATA -#define MEMP_NUM_REASSDATA CONFIG_NET_LWIP_MEMP_NUM_REASSDATA +#ifdef CONFIG_NET_MEMP_NUM_REASSDATA +#define MEMP_NUM_REASSDATA CONFIG_NET_MEMP_NUM_REASSDATA #endif -#ifdef CONFIG_NET_LWIP_MEMP_NUM_FRAG_PBUF -#define MEMP_NUM_FRAG_PBUF CONFIG_NET_LWIP_MEMP_NUM_FRAG_PBUF +#ifdef CONFIG_NET_MEMP_NUM_FRAG_PBUF +#define MEMP_NUM_FRAG_PBUF CONFIG_NET_MEMP_NUM_FRAG_PBUF #endif -#ifdef CONFIG_NET_LWIP_MEMP_NUM_ARP_QUEUE -#define MEMP_NUM_ARP_QUEUE CONFIG_NET_LWIP_MEMP_NUM_ARP_QUEUE +#ifdef CONFIG_NET_MEMP_NUM_ARP_QUEUE +#define MEMP_NUM_ARP_QUEUE CONFIG_NET_MEMP_NUM_ARP_QUEUE #endif /* ---------- Memory options ---------- */ diff --git a/os/net/lwip/configs/Kconfig b/os/net/lwip/configs/Kconfig index 6724f5f..4e61ed3 100644 --- a/os/net/lwip/configs/Kconfig +++ b/os/net/lwip/configs/Kconfig @@ -5,129 +5,9 @@ menu "LwIP options" -menu "LwIP memory options" - -config NET_LWIP_MEM_ALIGNMENT - int "Memory alignment size" - default 4 - ---help--- - should be set to the alignment of the CPU - -config NET_LWIP_MEM_SIZE - int "Size of LwIP memory pool" - default 1600 - ---help--- - 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 NET_LWIP_MEMP_OVERFLOW_CHECK - int "Memory pool overflow protection" - default 0 - ---help--- - memp overflow protection reserves a configurable amount of bytes - before and after each memp element in every pool and fills - it with a prominent default value. - if 0, no checking - if 1, checks each element when it is freed - if 2, checks each element in every pool every time memp_malloc() - or memp_free() is called (useful but slow!) - -config NET_LWIP_MEMP_SANITY_CHECK - bool "Memory pool sanity check" - default n - ---help--- - run a sanity check after each memp_free() to make sure that - there are no cycles in the linked lists. - -config NET_LWIP_MEMP_NUM_PBUF - int "Number of Pbufs" - default 16 - ---help--- - The number of memp struct pbufs (used for PBUF_ROM and PBUF_REF). - If the application sends a lot of data out of ROM (or other static memory), - this should be set high. - -config NET_LWIP_MEMP_NUM_RAW_PCB - int "Number of raw connection PCBs" - default 4 - depends on NET_RAW - ---help--- - Number of raw connection PCBs - -config NET_LWIP_MEMP_NUM_UDP_PCB - int "Number of udp connection PCBs" - default 4 - depends on NET_LWIP_UDP - ---help--- - Number of udp connection PCBs - -config NET_LWIP_MEMP_NUM_TCP_PCB - int "Number of tcp connection PCBs" - default 5 - depends on NET_TCP - ---help--- - Number of tcp connection PCBs - -config NET_LWIP_MEMP_NUM_TCP_PCB_LISTEN - int "Number of listening tcp connections" - default 5 - depends on NET_TCP - ---help--- - Number of simultaneously queued TCP segments - -config NET_LWIP_MEMP_NUM_TCP_SEG - int "Number of simultaneously queued TCP segments" - default 16 - depends on NET_TCP - ---help--- - Number of simultaneously queued TCP segments - -config NET_LWIP_MEMP_NUM_REASSDATA - int "Number of IP reassemble packets" - default 5 - ---help--- - Number of IP fragments simultaneously sent - for reassembly (whole packets, not fragments!) - -config NET_LWIP_MEMP_NUM_FRAG_PBUF - int "Number of IP fragments packets" - default 15 - ---help--- - Number of IP fragments simultaneously sent - (fragments, not whole packets!). - -config NET_LWIP_MEMP_NUM_ARP_QUEUE - int "Maximum number of waiting arp request packet" - default 30 - ---help--- - Number of simultaneously queued outgoing packets (pbufs) - that are waiting for an ARP request (to resolve their - destination address) to finish. - -endmenu #LwIP memory options - +source "net/lwip/configs/mem/Kconfig" source "net/lwip/configs/socket/Kconfig" - -menuconfig NET_LWIP_ICMP - bool "ICMP support" - default y - -if NET_LWIP_ICMP - -config NET_LWIP_ICMP_BROADCAST_PING - bool "Enable respond to broadcast pings" - default n - ---help--- - respond to broadcast pings (default is unicast only) - -config NET_LWIP_ICMP_MULTICAST_PING - bool "Enable respond to multicast pings" - default n - ---help--- - respond to multicast pings (default is unicast only) - -endif #NET_LWIP_ICMP - +source "net/lwip/configs/icmp/Kconfig" menuconfig NET_LWIP_IGMP bool "IGMP support" @@ -144,19 +24,8 @@ config NET_LWIP_MEMP_NUM_IGMP_GROUP endif #NET_LWIP_IGMP -menuconfig NET_LWIP_UDP - bool "UDP support" - default y - -if NET_LWIP_UDP - -config NET_LWIP_UDPLITE - bool "UDP-Lite support" - default n - -endif #NET_LWIP_UDP - source "net/lwip/configs/tcp/Kconfig" +source "net/lwip/configs/udp/Kconfig" source "net/lwip/configs/arp/Kconfig" menu "IP options" @@ -339,7 +208,7 @@ endif #NET_LWIP_PPP_SUPPORT menuconfig NET_LWIP_SNMP bool "Enable SNMP" default n - depends on NET_LWIP_UDP + depends on NET_UDP if NET_LWIP_SNMP diff --git a/os/net/lwip/configs/icmp/Kconfig b/os/net/lwip/configs/icmp/Kconfig new file mode 100644 index 0000000..3356ab3 --- /dev/null +++ b/os/net/lwip/configs/icmp/Kconfig @@ -0,0 +1,38 @@ +# +# For a description of the syntax of this configuration file, +# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt +# + +if NET_IPv4 +menu "ICMP Networking Support" + +config NET_ICMP + bool "Enable ICMP networking" + default n + ---help--- + Enable minimal ICMP support. Includes built-in support + for sending replies to received ECHO (ping) requests. + +if NET_ICMP + +config NET_ICMP_TTL + int "ICMP TTL" + default 255 + ---help--- + Default value for Time-To-Live used by ICMP packets. + +config NET_BROADCAST_PING + bool "ICMP respond broadcast pings" + default n + ---help--- + Respond to broadcast pings (default is unicast only) + +config NET_MULTICAST_PING + bool "ICMP respond multicast pings" + default n + ---help--- + Respond to multicast pings (default is unicast only) + +endif # NET_ICMP +endmenu # ICMP Networking Support +endif # NET_IPv4 diff --git a/os/net/lwip/configs/mem/Kconfig b/os/net/lwip/configs/mem/Kconfig new file mode 100644 index 0000000..f4b5827 --- /dev/null +++ b/os/net/lwip/configs/mem/Kconfig @@ -0,0 +1,252 @@ +menu "Memory Configurations" + +config NET_MEM_ALIGNMENT + int "Memory Alignment" + default 4 + ---help--- + should be set to the alignment of the CPU 4 byte alignment + -> #define MEM_ALIGNMENT 4 2 byte alignment -> #define MEM_ALIGNMENT 2 + +config NET_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT + bool "Allow Memory Free from Other Context" + default n + ---help--- + Set this to 1 if you want to free PBUF_RAM pbufs (or call mem_free()) + from interrupt context (or another context that doesn't allow waiting for a semaphore). + If set to 1, mem_malloc will be protected by a semaphore and SYS_ARCH_PROTECT, + while mem_free will only use SYS_ARCH_PROTECT. mem_malloc SYS_ARCH_UNPROTECTs + with each loop so that mem_free can run. + + ATTENTION: As you can see from the above description, this leads to dis-/ enabling + interrupts often, which can be slow! Also, on low memory, mem_malloc can need longer. + + If you don't want that, at least for NO_SYS=0, you can still use the following functions + to enqueue a deallocation call which then runs in the tcpip_thread context: + + pbuf_free_callback(p); + mem_free_callback(m); + +config NET_MEM_LIBC_MALLOC + bool "Use System Malloc" + default n + ---help--- + Use malloc/free/realloc provided by your C-library instead of + the lwip internal allocator. Can save code size if you already use it. + +config NET_MEMP_MEM_MALLOC + bool "Use mem_malloc/mem_free for Memory Pool" + default n + ---help--- + Use mem_malloc/mem_free instead of the lwip pool allocator. + Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution speed + (heap alloc can be much slower than pool alloc) and usage from interrupts (especially if + your netif driver allocates PBUF_POOL pbufs for received frames from interrupt)! + + ATTENTION: Currently, this uses the heap for ALL pools (also for private pools, + not only for internal pools defined in memp_std.h)! + +if !NET_MEM_LIBC_MALLOC + +config NET_MEM_USE_POOLS + bool "Memory Alloc Through Pool" + default n + ---help--- + Use an alternative to malloc() by allocating from a set of memory pools of various sizes. + When mem_malloc is called, an element of the smallest pool that can provide + the length needed is returned. To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled. + + +config NET_MEM_SIZE + int "Static Memory Size" + depends on !NET_MEM_USE_POOLS + default 1600 + ---help--- + 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. + +endif #!NET_MEM_LIBC_MALLOC + +if !NET_MEMP_MEM_MALLOC + +config NET_MEMP_OVERFLOW_CHECK + int "Memory Pool Overflow Check" + default 0 + range 0 2 + ---help--- + memp overflow protection reserves a configurable amount of bytes before and after + each memp element in every pool and fills it with a prominent default value. + MEMP_OVERFLOW_CHECK == 0 no checking MEMP_OVERFLOW_CHECK == 1 checks each element + when it is freed MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time + memp_malloc() or memp_free() is called (useful but slow!) + +config NET_MEMP_SANITY_CHECK + bool "Memory Pool Sanity Check" + default n + ---help--- + Run a sanity check after each memp_free() to make sure that there are no cycles + in the linked lists. + +config NET_MEMP_SEPARATE_POOLS + bool "Memory Pool Separate Pools" + default n + ---help--- + To place memory pools in separate arrays. This may be used to place these pools + into user-defined memory by using external declaration. + +config NET_MEMP_NUM_PBUF + int "Memory Pool Pbuf Size" + default 16 + ---help--- + The number of memp struct pbufs (used for PBUF_ROM and PBUF_REF). + If the application sends a lot of data out of ROM (or other static memory), + this should be set high. + +config NET_MEMP_NUM_RAW_PCB + int "Memory Pool Raw PCB Size" + default 4 + depends on NET_RAW + ---help--- + Number of raw connection PCBs (requires the LWIP_RAW option) + +config NET_MEMP_NUM_UDP_PCB + int "Memory Pool UDP PCB Size" + default 4 + depends on NET_UDP + ---help--- + The number of UDP protocol control blocks. One per active UDP "connection". + (requires the LWIP_UDP option) + +config NET_MEMP_NUM_TCP_PCB + int "Memory Pool TCP PCB Size" + default 5 + depends on NET_TCP + ---help--- + The number of simultaneously active TCP connections. (requires the LWIP_TCP option) + +config NET_MEMP_NUM_TCP_PCB_LISTEN + int "Memory Pool TCP PCB Listen" + default 8 + depends on NET_TCP + ---help--- + The number of listening TCP connections. (requires the LWIP_TCP option) + +config NET_MEMP_NUM_TCP_SEG + int "Memory Pool TCP SEG Size" + default 16 + depends on NET_TCP + ---help--- + The number of simultaneously queued TCP segments. (requires the LWIP_TCP option) + +config NET_MEMP_NUM_REASSDATA + int "Memory Pool IP Reassemble" + default 5 + depends on NET_IP_REASSEMBLY + ---help--- + The number of IP packets simultaneously queued for reassembly (whole packets, not fragments!) + +config NET_MEMP_NUM_FRAG_PBUF + int "Memory Pool IP Fragment" + default 15 + depends on NET_IP_FRAG + ---help--- + The number of IP fragments simultaneously sent (fragments, not whole packets!). + This is only used with LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1 + with DMA-enabled MACs where the packet is not yet sent when netif->output returns. + +config NET_MEMP_NUM_ARP_QUEUE + int "Memory Pool ARP Queue Size" + default 30 + depends on NET_ARP_QUEUEING + ---help--- + The number of simultaneously queued outgoing packets (pbufs) that are waiting + for an ARP request (to resolve their destination address) to finish. + (requires the ARP_QUEUEING option) + +config NET_MEMP_NUM_IGMP_GROUP + int "Memory Pool IGMP Size" + default 8 + depends on NET_IGMP + ---help--- + The number of multicast groups whose network interfaces can be members + at the same time (one per netif - allsystems group -, plus one per netif membership). + (requires the LWIP_IGMP option) + +config NET_MEMP_NUM_SYS_TIMEOUT + int "Memory Pool System Timeout" + default 6 + ---help--- + The number of simultaneously active timeouts. + The default number of timeouts is calculated here for all enabled modules. + The formula expects settings to be either '0' or '1'. + +config NET_MEMP_NUM_NETBUF + int "Memory Pool Netbuf Size" + default 2 + depends on NET_NETCONN + ---help--- + The number of struct netbufs. (only needed if you use the sequential API, like api_lib.c) + +config NET_MEMP_NUM_TCPIP_MSG_API + int "Memory Pool LWIP API Message Size" + default 8 + ---help--- + The number of struct tcpip_msg, which are used for callback/timeout API communication. + (only needed if you use tcpip.c) + +config NET_MEMP_NUM_TCPIP_MSG_INPKT + int "Memory Pool LWIP Message INPKT" + default 8 + depends on !NET_TCPIP_CORE_LOCKING_INPUT + ---help--- + The number of struct tcpip_msg, which are used for incoming packets. + (only needed if you use tcpip.c) + +config NET_MEMP_NUM_SNMP_NODE + int "Memroy Pool SNMP Node Size" + default 50 + depends on NET_SNMP + ---help--- + The number of leafs in the SNMP tree. + +config NET_MEMP_NUM_SNMP_ROOTNODE + int "Memory Pool SNMP Root Node Size" + default 30 + depends on NET_SNMP + ---help--- + The number of branches in the SNMP tree. Every branch has one leaf at least. + +config NET_MEMP_NUM_SNMP_VARBIND + int "Memory Pool SNMP Varbind Size" + default 2 + depends on NET_SNMP + ---help--- + The number of concurrent requests (does not have to be changed normally) + - 2 of these are used per request (1 for input, 1 for output) + +config NET_MEMP_NUM_SNMP_VALUE + int "Memory Pool SNMP Value Size" + default 3 + depends on NET_SNMP + ---help--- + The number of OID or values concurrently used (does not have to be changed normally) + 3 of these are used per request (1 for the value read and 2 for OIDs - input and output) + +config NET_MEMP_NUM_PPPOE_INTERFACES + int "Memory Pool PPPOE Interfaces Size" + default 1 + depends on NET_PPP_SUPPORT && NET_PPPOE_SUPPORT + ---help--- + The number of concurrently active PPPoE interfaces (only used with PPPOE_SUPPORT==1) + +config NET_PBUF_POOL_SIZE + int "Memory Pool Pbuf Pool Size" + default 16 + ---help--- + The number of buffers in the pbuf pool. + + +endif #!NET_MEMP_MEM_MALLOC + + + +endmenu #"Memory Configurations" diff --git a/os/net/lwip/configs/udp/Kconfig b/os/net/lwip/configs/udp/Kconfig new file mode 100644 index 0000000..7aac9dd --- /dev/null +++ b/os/net/lwip/configs/udp/Kconfig @@ -0,0 +1,30 @@ +menu "UDP Networking" + +config NET_UDP + bool "Enable UDP" + depends on NET_IPv4 + default y + ---help--- + UDP support on or off + +if NET_UDP +config NET_NETBUF_RECVINFO + bool "Append Destination Infomation" + default n + ---help--- + append destination addr and port to every netbuf. + +config NET_UDP_TTL + int "UDP TTL" + default 255 + ---help--- + Default Time-To-Live value. + +config NET_UDPLITE + bool "Enable UDP-Lite" + default y + ---help--- + Turn on UDP-Lite. (Requires LWIP_UDP) + +endif #NET_UDP +endmenu #"UDP Networking" -- 2.7.4