Reducing the thread count of the TCPIP stack.

Technical questions regarding the XTC tools and programming with XMOS.
Matt
Active Member
Posts: 50
Joined: Sat Feb 13, 2010 12:04 pm

Reducing the thread count of the TCPIP stack.

Post by Matt »

Hi,

I am wondering if anyone has tried to reduce the thread count needed for the TCPIP stack. I think that it currently uses 5? Many single threaded micros do it with one.

Matt


User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

Post by Folknology »

Its not the TCP/IP itself that gobbles the resources, its the software MAC/Ethernet, most MCUs use a hardware peripheral for this.

If you take a look at memory and thread usage using xmap/linker you will see where the resources get swallowed.

regards
Al
User avatar
davelacey
Experienced Member
Posts: 104
Joined: Fri Dec 11, 2009 8:29 pm

Post by davelacey »

Matt wrote:Hi,

I am wondering if anyone has tried to reduce the thread count needed for the TCPIP stack. I think that it currently uses 5? Many single threaded micros do it with one.

Matt
Hi,
As Folknology says - the tcp stack is 1 thread and the mac is 5. In fact the mac could be reduced a bit depending on the functionality required. If anyone is interested at forking the repo and doing alternative
versions that trade off functionality for efficiency then let me know and I can help you get started but there is quite a bit of coding and testing involved to optimize it down.

The memory usage of the mac should be improved in the next release (or with the current HEAD) since the packet buffering scheme is more efficient.

Dave