|
86 | 86 | byte alignment -> define MEM_ALIGNMENT to 2. */ |
87 | 87 | #define MEM_ALIGNMENT 4 |
88 | 88 |
|
89 | | -/** |
90 | | - * LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT==1: allows mem_free() to be called |
91 | | - * from ISR/different task context (uses SYS_ARCH_PROTECT instead of mutex). |
92 | | - * Required on IOP because interrupt context may free pbufs. |
93 | | - */ |
94 | | -#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1 |
95 | | - |
96 | 89 | /** |
97 | 90 | * MEM_SIZE: the size of the heap memory. If the application will send |
98 | 91 | * a lot of data that needs to be copied, this should be set high. |
|
101 | 94 | Up to TCP_SND_BUF * 2 segments may be transmitted at once, thanks to Nagle and Delayed Ack. */ |
102 | 95 | #define MEM_SIZE (TCP_SND_BUF * 2) |
103 | 96 |
|
104 | | -/* |
105 | | - ----------------------------------------------- |
106 | | - ---------- IP options ------------------------- |
107 | | - ----------------------------------------------- |
108 | | -*/ |
109 | | -/** |
110 | | - * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. |
111 | | - * Disabled: PS2 always operates on a local LAN; IP fragments never occur |
112 | | - * with MSS=1460 and MTU=1500. Saves MEMP_NUM_REASSDATA pool entries. |
113 | | - */ |
114 | | -#define IP_REASSEMBLY 0 |
115 | | - |
116 | | -/** |
117 | | - * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. |
118 | | - * Disabled: TCP_MSS=1460 ensures we never exceed Ethernet MTU=1500. |
119 | | - */ |
120 | | -#define IP_FRAG 0 |
121 | | - |
122 | 97 | /* |
123 | 98 | ------------------------------------------------ |
124 | 99 | ---------- Internal Memory Pool Sizes ---------- |
125 | 100 | ------------------------------------------------ |
126 | 101 | */ |
127 | | -/** |
128 | | - * MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections. |
129 | | - * ps2link handles at most a few simultaneous TCP connections. |
130 | | - */ |
131 | | -#define MEMP_NUM_TCP_PCB 4 |
132 | | - |
133 | | -/** |
134 | | - * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. |
135 | | - * ps2link listens on a small number of ports. |
136 | | - */ |
137 | | -#define MEMP_NUM_TCP_PCB_LISTEN 4 |
138 | | - |
139 | | -/** |
140 | | - * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. |
141 | | - * DNS (1) + DHCP (1) internally allocate raw UDP PCBs via udp_new(), |
142 | | - * plus application sockets (udptty 1, ps2link 1) need their own. |
143 | | - */ |
144 | | -#define MEMP_NUM_UDP_PCB 4 |
145 | | - |
146 | | -/** |
147 | | - * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments. |
148 | | - * Must be at least TCP_SND_QUEUELEN (enforced by lwIP sanity check in init.c). |
149 | | - */ |
150 | | -#define MEMP_NUM_TCP_SEG TCP_SND_QUEUELEN |
151 | | - |
152 | | -/** |
153 | | - * MEMP_NUM_ARP_QUEUE: the number of ARP queued packets. |
154 | | - * ps2link communicates with a single host; 5 entries is more than enough. |
155 | | - */ |
156 | | -#define MEMP_NUM_ARP_QUEUE 5 |
157 | | - |
158 | 102 | /** |
159 | 103 | * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used |
160 | 104 | * for incoming packets. |
|
181 | 125 |
|
182 | 126 | /** |
183 | 127 | * PBUF_POOL_SIZE: the number of buffers in the pbuf pool. |
184 | | - * Each pool entry is ~1532 bytes (PBUF_POOL_BUFSIZE ≈ 1516 + struct pbuf). |
185 | | - * Reduced from 32 (~49 KB) to 12 (~18 KB). Safe because |
186 | | - * LWIP_TCPIP_CORE_LOCKING_INPUT=1 means RX is processed synchronously, |
187 | | - * so the pool backlog stays very small. |
188 | | - * Must satisfy: TCP_WND <= PBUF_POOL_SIZE * (PBUF_POOL_BUFSIZE - 54). |
189 | | - * With PBUF_POOL_SIZE=12 and PBUF_POOL_BUFSIZE=1516: max = 12 * 1462 = 17544. |
190 | | - * 16384 (16 KB) fits comfortably. |
191 | 128 | */ |
192 | | -#define PBUF_POOL_SIZE 12 |
| 129 | +#define PBUF_POOL_SIZE 32 //SP193: should be at least ((TCP_WND/PBUF_POOL_BUFSIZE)+1). But that is too small to handle simultaneous connections. |
193 | 130 |
|
194 | 131 | /** |
195 | 132 | * LWIP_TCPIP_CORE_LOCKING_INPUT: when LWIP_TCPIP_CORE_LOCKING is enabled, |
|
219 | 156 | /* TCP sender buffer space (bytes). */ |
220 | 157 | #define TCP_SND_BUF (TCP_MSS*4) |
221 | 158 |
|
222 | | -/* TCP receive window. |
223 | | - * Must satisfy: TCP_WND <= PBUF_POOL_SIZE * (PBUF_POOL_BUFSIZE - 54). |
224 | | - * With PBUF_POOL_SIZE=12 and PBUF_POOL_BUFSIZE=1516: max = 12 * 1462 = 17544. |
225 | | - * 16384 (16 KB) fits comfortably and still gives ample throughput on LAN. */ |
226 | | -#define TCP_WND 16384 |
| 159 | +/* TCP receive window. */ |
| 160 | +#define TCP_WND 32768 |
227 | 161 |
|
228 | 162 | /* ---------- DHCP options ---------- */ |
229 | 163 | #ifdef PS2IP_DHCP |
|
233 | 167 | #define LWIP_DHCP 1 |
234 | 168 | #endif |
235 | 169 |
|
236 | | -/* ---------- ACD options ---------- */ |
237 | | -#define LWIP_ACD 0 |
238 | | -#define LWIP_DHCP_DOES_ACD_CHECK 0 |
239 | | - |
240 | 170 | /** |
241 | 171 | * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address. |
242 | 172 | */ |
|
306 | 236 | */ |
307 | 237 | #define LWIP_CHECKSUM_ON_COPY 1 |
308 | 238 |
|
309 | | -/* Use PS2SDK's errno.h instead of lwIP's own errno definitions */ |
310 | | -#define LWIP_ERRNO_STDINCLUDE 1 |
311 | 239 | /* |
312 | 240 | ------------------------------------ |
313 | 241 | ---------- Socket options ---------- |
|
323 | 251 | * names (read, write & close). (only used if you use sockets.c) |
324 | 252 | */ |
325 | 253 | #define LWIP_POSIX_SOCKETS_IO_NAMES 0 |
326 | | -/** |
327 | | - * LWIP_SOCKET_POLL==1: Enable poll() for sockets (new in lwIP 2.2.x, default=1). |
328 | | - * Disabled: lwip_poll() is not exported by ps2ip; disabling saves code size. |
329 | | - */ |
330 | | -#define LWIP_SOCKET_POLL 0 |
331 | 254 |
|
332 | 255 | /* |
333 | 256 | ---------------------------------- |
|
0 commit comments