Skip to content

Commit 58b60ec

Browse files
fjtrujyclaude
andcommitted
cleanup: [tcpip] prune lwipopts.h entries that restate lwIP 2.0.3 defaults
Remove eight defines from iop/tcpip-base/lwipopts.h that either exactly match lwIP 2.0.3's own defaults in opt.h, or configure dead subsystems that aren't compiled in this build: - NO_SYS=0 (default 0) - MEM_LIBC_MALLOC=0 (default 0) - MEMP_NUM_TCPIP_MSG_API=8 (default 8) - SYS_LIGHTWEIGHT_PROT=1 (default 1) - SLIPIF_THREAD_STACKSIZE/PRIO (slipif.c not compiled) - PPP_THREAD_STACKSIZE/PRIO (symbols not referenced anywhere in lwIP 2.0.3) Also drop the no-op #ifndef LWIP_TCPIP_CORE_LOCKING_INPUT guard around MEMP_NUM_TCPIP_MSG_INPKT; the symbol is always set later in this same file so the guard never activates. Proof of no-op: installed ps2ip-nm.irx SHA is unchanged (c298b3cc2be09636c68ddd2ff077a62f2b2aa03c) before and after. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 72dab5c commit 58b60ec

1 file changed

Lines changed: 4 additions & 61 deletions

File tree

iop/tcpip/tcpip-base/include/lwipopts.h

Lines changed: 4 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
#ifndef __LWIPOPTS_H__
55
#define __LWIPOPTS_H__
66

7-
/**
8-
* NO_SYS==1: Provides VERY minimal functionality. Otherwise,
9-
* use lwIP facilities.
10-
*/
11-
#define NO_SYS 0
12-
137
#define LWIP_TIMEVAL_PRIVATE 0
148

159
/* ---------- Thread options ---------- */
@@ -41,46 +35,11 @@
4135
*/
4236
#define TCPIP_THREAD_PRIO DEFAULT_THREAD_PRIO
4337

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-
7238
/*
7339
------------------------------------
7440
---------- Memory options ----------
7541
------------------------------------
7642
*/
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-
8443
/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
8544
lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
8645
byte alignment -> define MEM_ALIGNMENT to 2. */
@@ -131,20 +90,11 @@
13190
/**
13291
* MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used
13392
* for incoming packets.
134-
* (only needed if you use tcpip.c)
135-
*/
136-
//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.
137-
#ifndef LWIP_TCPIP_CORE_LOCKING_INPUT
138-
#define MEMP_NUM_TCPIP_MSG_INPKT 24
139-
#endif
140-
141-
/**
142-
* MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used
143-
* for callback/timeout API communication.
144-
* (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.
14596
*/
146-
//SP193: this should be around the size of MEM_SIZE (in PBUFs), to prevent transmissions from being potentially being dropped.
147-
#define MEMP_NUM_TCPIP_MSG_API 8
97+
#define MEMP_NUM_TCPIP_MSG_INPKT 24
14898

14999
/**
150100
* MEMP_NUM_NETCONN: the number of struct netconns.
@@ -167,13 +117,6 @@
167117
*/
168118
#define LWIP_TCPIP_CORE_LOCKING_INPUT 1
169119

170-
/** SYS_LIGHTWEIGHT_PROT
171-
* define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
172-
* for certain critical regions during buffer allocation, deallocation and
173-
* memory allocation and deallocation.
174-
*/
175-
#define SYS_LIGHTWEIGHT_PROT 1
176-
177120
/*
178121
---------------------------------
179122
---------- TCP options ----------

0 commit comments

Comments
 (0)