aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2011-04-08 06:24:27 -0700
committerEric W. Biederman <ebiederm@xmission.com>2011-04-08 06:33:09 -0700
commit74e80bc17c65351e94b4ccfed4d64e5325e43792 (patch)
treeb828db556ee4e208b00e5f7ec7f4714172161eb0
parent42d85f03126d05a5a8596246d90cce65d56cc381 (diff)
downloadsyslinux-devel-syslinux-lwip-checkpoint1.tar.gz
syslinux-devel-syslinux-lwip-checkpoint1.tar.xz
syslinux-devel-syslinux-lwip-checkpoint1.zip
lwip: Checkpoint arch port bits.syslinux-lwip-checkpoint1
-rw-r--r--core/lwip/src/arch/sys_arch.c5
-rw-r--r--core/lwip/src/include/arch/sys_arch.h11
-rw-r--r--core/lwip/src/include/lwipopts.h56
3 files changed, 63 insertions, 9 deletions
diff --git a/core/lwip/src/arch/sys_arch.c b/core/lwip/src/arch/sys_arch.c
index 73490a48..0b548e86 100644
--- a/core/lwip/src/arch/sys_arch.c
+++ b/core/lwip/src/arch/sys_arch.c
@@ -77,4 +77,9 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t mbox, void **msg)
return mbox_fetch(mbox, msg, -1);
}
+#if 0
+sys_prot_t sys_arch_protect(void);
+void sys_arch_unprotect(sys_prot_t pval);
+#endif
+
diff --git a/core/lwip/src/include/arch/sys_arch.h b/core/lwip/src/include/arch/sys_arch.h
index 735f8258..867cf314 100644
--- a/core/lwip/src/include/arch/sys_arch.h
+++ b/core/lwip/src/include/arch/sys_arch.h
@@ -15,6 +15,12 @@ typedef struct thread *sys_thread_t;
#define SYS_MBOX_NULL NULL
#define SYS_SEM_NULL NULL
+static inline sys_thread_t sys_thread_new(char *name, void (*thread)(void *),
+ void *arg, int stacksize, int prio)
+{
+ return start_thread(name, stacksize, prio, thread, arg);
+}
+
extern void __compile_time_error(void);
#define SYS_ARCH_OP(var, val, inc, add) \
@@ -52,6 +58,11 @@ do { \
} \
} while (0)
+static inline struct sys_timeouts *sys_arch_timeouts(void)
+{
+ return (struct sys_timeouts *)&current()->pvt;
+}
+
#define SYS_ARCH_INC(var, val) SYS_ARCH_OP(var, val, "inc", "add")
#define SYS_ARCH_DEC(var, val) SYS_ARCH_OP(var, val, "dec", "sub")
diff --git a/core/lwip/src/include/lwipopts.h b/core/lwip/src/include/lwipopts.h
index 6364b4ec..154afd73 100644
--- a/core/lwip/src/include/lwipopts.h
+++ b/core/lwip/src/include/lwipopts.h
@@ -1,6 +1,8 @@
#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__
+#include <stdlib.h>
+
#define MEM_LIBC_MALLOC 1 /* Don't reinvent malloc */
#define mem_realloc mem_realloc
static inline void *mem_realloc(void *mem, unsigned int size)
@@ -10,21 +12,57 @@ static inline void *mem_realloc(void *mem, unsigned int size)
}
#define MEM_SIZE (1 << 18)
+#if 0
#define MEMP_OVERFLOW_CHECK 2 /* XXX: for debugging */
#define MEMP_SANITY_CHECK 1 /* XXX: for debugging */
+#else
+#define MEMP_OVERFLOW_CHECK 0 /* XXX: for debugging */
+#define MEMP_SANITY_CHECK 0 /* XXX: for debugging */
+#endif
#define MEM_USE_POOLS_TRY_BIGGER_POOL 1
-#define MEMP_NUM_TCP_PCB 64
-#define MEMP_NUM_TCP_SEG 256
-#define MEMP_NUM_REASSDATA 32
-#define MEMP_NUM_SYS_TIMEOUT 8
-#define ARP_TABLE_SIZE 16
-#define IP_REASS_MAX_PBUFS 32
+#define TCPIP_MBOX_SIZE 512
+#define TCPIP_THREAD_PRIO 0
+#define TCPIP_THREAD_STACKSIZE 32768
+
+#define DEFAULT_UDP_RECVMBOX_SIZE 16
+#define DEFAULT_TCP_RECVMBOX_SIZE 128
+#define DEFAULT_ACCEPTMBOX_SIZE 4
+
+#define LWIP_SOCKET 0
+
+#define MEM_LIBC_MALLOC 1
+#define MEMP_MEM_MALLOC 1
+
+#define MEMP_NUM_TCP_PCB 64
+#define MEMP_NUM_TCP_SEG 256
+#define MEMP_NUM_REASSDATA 32
+#define MEMP_NUM_SYS_TIMEOUT 8
+#define MEMP_NUM_NETCONN 64
+#define MEMP_NUM_TCPIP_MSG_API 64
+#define MEMP_NUM_TCPIP_MSG_INPKT 64
+#define PBUF_POOL_SIZE 256
+#define ARP_TABLE_SIZE 16
+#define IP_REASS_MAX_PBUFS 64
+#define IP_REASS_MAXAGE 10
+
+#define LWIP_NETIF_API 1
#define LWIP_DNS 1
+#define DNS_TABLE_SIZE 16
#define DNS_MAX_SERVERS 4
-#define TCP_WND 32768
-#define TCP_MSS 4096
-#define TCP_SND_BUF 4096
+#define TCP_MSS 1460
+#define TCP_WND 64000
+#define TCP_SND_BUF (4*TCP_MSS)
+#define LWIP_TCP_TIMESTAMPS 1
+
+#define ETHARP_TRUST_IP_MAC 0
+
+#if 0
+#define LWIP_PLATFORM_BYTESWAP 1
+
+#define LWIP_STATS 1
+#define LWIP_STATS_DISPLAY 1
+#endif
#endif /* __LWIPOPTS_H__ */