|
4 | 4 | #ifndef __LWIPOPTS_H__ |
5 | 5 | #define __LWIPOPTS_H__ |
6 | 6 |
|
7 | | -/** |
8 | | - * NO_SYS==1: Provides VERY minimal functionality. Otherwise, |
9 | | - * use lwIP facilities. |
10 | | - */ |
11 | | -#define NO_SYS 0 |
12 | | - |
13 | 7 | #define LWIP_TIMEVAL_PRIVATE 0 |
14 | 8 |
|
15 | 9 | /* ---------- Thread options ---------- */ |
|
41 | 35 | */ |
42 | 36 | #define TCPIP_THREAD_PRIO DEFAULT_THREAD_PRIO |
43 | 37 |
|
44 | | -/** |
45 | | - * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread. |
46 | | - * The stack size value itself is platform-dependent, but is passed to |
47 | | - * sys_thread_new() when the thread is created. |
48 | | - */ |
49 | | -#define SLIPIF_THREAD_STACKSIZE DEFAULT_THREAD_STACKSIZE |
50 | | - |
51 | | -/** |
52 | | - * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread. |
53 | | - * The priority value itself is platform-dependent, but is passed to |
54 | | - * sys_thread_new() when the thread is created. |
55 | | - */ |
56 | | -#define SLIPIF_THREAD_PRIO DEFAULT_THREAD_PRIO |
57 | | - |
58 | | -/** |
59 | | - * PPP_THREAD_STACKSIZE: The stack size used by the pppInputThread. |
60 | | - * The stack size value itself is platform-dependent, but is passed to |
61 | | - * sys_thread_new() when the thread is created. |
62 | | - */ |
63 | | -#define PPP_THREAD_STACKSIZE DEFAULT_THREAD_STACKSIZE |
64 | | - |
65 | | -/** |
66 | | - * PPP_THREAD_PRIO: The priority assigned to the pppInputThread. |
67 | | - * The priority value itself is platform-dependent, but is passed to |
68 | | - * sys_thread_new() when the thread is created. |
69 | | - */ |
70 | | -#define PPP_THREAD_PRIO DEFAULT_THREAD_PRIO |
71 | | - |
72 | 38 | /* |
73 | 39 | ------------------------------------ |
74 | 40 | ---------- Memory options ---------- |
75 | 41 | ------------------------------------ |
76 | 42 | */ |
77 | | -/** |
78 | | - * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library |
79 | | - * instead of the lwip internal allocator. Can save code size if you |
80 | | - * already use it. |
81 | | - */ |
82 | | -#define MEM_LIBC_MALLOC 0 //FJTRUJY disable it for IOP |
83 | | - |
84 | 43 | /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which |
85 | 44 | lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2 |
86 | 45 | byte alignment -> define MEM_ALIGNMENT to 2. */ |
87 | 46 | #define MEM_ALIGNMENT 4 |
88 | 47 |
|
| 48 | +/** |
| 49 | + * LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT==1: make mem_free() callable from |
| 50 | + * any context (ISR/disabled-interrupt) by using SYS_ARCH_PROTECT instead of |
| 51 | + * a mutex for critical regions. Required on IOP because SMAP RX interrupts |
| 52 | + * invoke pbuf_free() in interrupt-disabled context; taking a mutex there |
| 53 | + * would violate the critical section (same effect as ps2dev/lwip's mem.c |
| 54 | + * patch, but achieved via upstream lwipopts instead of patching lwIP). |
| 55 | + */ |
| 56 | +#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1 |
| 57 | + |
89 | 58 | /** |
90 | 59 | * MEM_SIZE: the size of the heap memory. If the application will send |
91 | 60 | * a lot of data that needs to be copied, this should be set high. |
|
94 | 63 | Up to TCP_SND_BUF * 2 segments may be transmitted at once, thanks to Nagle and Delayed Ack. */ |
95 | 64 | #define MEM_SIZE (TCP_SND_BUF * 2) |
96 | 65 |
|
| 66 | +/* |
| 67 | + ----------------------------------------------- |
| 68 | + ---------- IP options ------------------------- |
| 69 | + ----------------------------------------------- |
| 70 | +*/ |
| 71 | +/** |
| 72 | + * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. |
| 73 | + * Disabled: PS2 networking targets a local LAN with MTU=1500, and |
| 74 | + * TCP negotiates MSS=1460 so fragments never arise in the common |
| 75 | + * case. Frees MEMP_NUM_REASSDATA / MEMP_NUM_FRAG_PBUF pool entries. |
| 76 | + */ |
| 77 | +#define IP_REASSEMBLY 0 |
| 78 | + |
| 79 | +/** |
| 80 | + * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. |
| 81 | + * Disabled: TCP_MSS=1460 ensures we never exceed Ethernet MTU=1500. |
| 82 | + */ |
| 83 | +#define IP_FRAG 0 |
| 84 | + |
97 | 85 | /* |
98 | 86 | ------------------------------------------------ |
99 | 87 | ---------- Internal Memory Pool Sizes ---------- |
|
102 | 90 | /** |
103 | 91 | * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used |
104 | 92 | * for incoming packets. |
105 | | - * (only needed if you use tcpip.c) |
106 | | - */ |
107 | | -//SP193: this should be around the size of the TCP window because the TCPIP thread may take a while to execute (non-preemptive multitasking), otherwise incoming frames may get dropped. |
108 | | -#ifndef LWIP_TCPIP_CORE_LOCKING_INPUT |
109 | | -#define MEMP_NUM_TCPIP_MSG_INPKT 24 |
110 | | -#endif |
111 | | - |
112 | | -/** |
113 | | - * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used |
114 | | - * for callback/timeout API communication. |
115 | | - * (only needed if you use tcpip.c) |
| 93 | + * SP193: this should be around the size of the TCP window because the |
| 94 | + * TCPIP thread may take a while to execute (non-preemptive multitasking), |
| 95 | + * otherwise incoming frames may get dropped. |
116 | 96 | */ |
117 | | -//SP193: this should be around the size of MEM_SIZE (in PBUFs), to prevent transmissions from being potentially being dropped. |
118 | | -#define MEMP_NUM_TCPIP_MSG_API 8 |
| 97 | +#define MEMP_NUM_TCPIP_MSG_INPKT 24 |
119 | 98 |
|
120 | 99 | /** |
121 | 100 | * MEMP_NUM_NETCONN: the number of struct netconns. |
|
138 | 117 | */ |
139 | 118 | #define LWIP_TCPIP_CORE_LOCKING_INPUT 1 |
140 | 119 |
|
141 | | -/** SYS_LIGHTWEIGHT_PROT |
142 | | - * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection |
143 | | - * for certain critical regions during buffer allocation, deallocation and |
144 | | - * memory allocation and deallocation. |
145 | | - */ |
146 | | -#define SYS_LIGHTWEIGHT_PROT 1 |
147 | | - |
148 | 120 | /* |
149 | 121 | --------------------------------- |
150 | 122 | ---------- TCP options ---------- |
|
0 commit comments