Hi,
I'm not sure exactly which version of the stack you have, but in the one I have, you need to change the default number of BIG and LIL bufs in ipport.h, to both not run out of memory and not run into deadlocks. I use:
#define NUMBIGBUFS 4 //FSL stack not work for <4
#define NUMLILBUFS 14
I also sent the following to FSL when they requested feedback. Maybe it will help.
--------
Hi Eric,
If you are still looking for feedback on what could be fixed in the ColdFire TCP/IP stack, I have a few comments regarding the source code.
Depending on the calling conventions specified by the user, the existing code can break. For example, if I compile with "Register" parameter passing, then the assembly language functions break because they expect "Compact" calling conventions. These bugs can easily be fixed by adding a compact_abi declaration to the function declarations, such as:
######## ./h/ip.h ########
428c428
< unsigned short cksum(void*, unsigned);
---
> __declspec(compact_abi) unsigned short cksum(void*, unsigned);
######## ./h/task.h ########
90,92c90,92
< stack_t * tk_frame(task *, int(*)(int), unsigned);
< void tk_switch(task *); /* run the next task */
< stack_t * tk_getsp(void); /* get current stack pointer */
---
> __declspec(compact_abi) stack_t * tk_frame(task *, int(*)(int), unsigned);
> __declspec(compact_abi) void tk_switch(task *); /* run the next task */
> __declspec(compact_abi) stack_t * tk_getsp(void); /* get current stack pointer */
Also, if I enable the use sdata and sbss, the tasking system gets confused because it forgets to load A5 (the sdata/sbss base register) for the "other " tasks. This can be easily fixed to propagate A5 at task creation time, such as:
######## ./cf_specific/tk_util.s ########
113a114
> move.l A5,40(A0) // _SDA_BASE
These were the only places I was forced to change the existing code.
Thank you!
-- Rich