XTCP slowness

If you have a simple question and just want an answer.
Post Reply
Redeye
XCore Addict
Posts: 131
Joined: Wed Aug 03, 2011 9:13 am

XTCP slowness

Post by Redeye »

I'm moving a load of code which ran on an L16 based board compiled on v13 tools using sc_ethernet v2.3.2 and sc_xtcp v3.2.1 to a new piece of hardware which uses XL232 devices on v14.2 tools with the latest ethernet and xtcp libraries. After a bit of reworking to adapt to the API changes, it's all basically working.

However, my code sends up to 100 UDP messages per second but the xtcp code doesn't seem to be capable of sending more than about 10 messages per second. On closer investigation the xtcp library seems to be the source of the problem - the main xtcp server loop has changed significantly from the previous version. I've worked around temporarily by changing the timeout in the main loop of xtcp.xc to 100000 instead of 10000000 but this doesn't seem a very elegant solution.

So my questions :

1. Has anyone else come across this problem and solved it in a better way?
2. Shouldn't that timeout value be #defined and configurable, especially as it seems that it's critical to the performance of the module?


louis
Member
Posts: 9
Joined: Thu Sep 08, 2016 11:27 am

Post by louis »

Hi Redeye,

We have fixed the problem you're finding in XTCP in later versions, but these have yet to be released through the official channels. You can find the most recent version on our github (http://www.github.com/xmos/lib_xtcp). Also, we will be releasing version 6.0.0 of XTCP early next year, which will be an overhaul of the existing polling mechanism.

Cheers,
Louis
User avatar
jdfenley
Junior Member
Posts: 5
Joined: Thu Sep 26, 2013 11:59 am

Post by jdfenley »

Sorry to reply to this post rather than open up a new one, but since the lib_xtcp 6.0.0 is not released yet...

I downloaded and was able to build (using 14.2.4) the examples using the UIP option, but when I try to build the app_simple_webserver or the xtcp_event_driven examples using the LWIP option I get 50 errors such as:

etharp.c: Error: Undefined reference to 'dhcp_arp_reply'
C:/Intra/XMOS_xtcp_6_0_0/lib_xtcp/src/xtcp_lwip.xc: Error: Undefined reference to 'dhcp_coarse_tmr'
C:/Intra/XMOS_xtcp_6_0_0/lib_xtcp/src/xtcp_lwip.xc: Error: Undefined reference to 'dhcp_fine_tmr'
C:/Intra/XMOS_xtcp_6_0_0/lib_xtcp/src/xtcp_lwip.xc: Error: Undefined reference to 'dhcp_recv'
C:/Intra/XMOS_xtcp_6_0_0/lib_xtcp/src/xtcp_lwip.xc: Error: Undefined reference to 'dhcp_start'
C:/Intra/XMOS_xtcp_6_0_0/lib_xtcp/src/xtcp_lwip.xc: Error: Undefined reference to 'dhcp_supplied_address'
C:/Intra/XMOS_xtcp_6_0_0/lib_xtcp/src/xtcp_lwip.xc: Error: Undefined reference to 'dns_enqueue'
C:/Intra/XMOS_xtcp_6_0_0/lib_xtcp/src/xtcp_lwip.xc: Error: Undefined reference to 'dns_find_entry'
C:/Intra/XMOS_xtcp_6_0_0/lib_xtcp/src/xtcp_lwip.xc: Error: Undefined reference to 'dns_recv'
icmp.c: Error: Undefined reference to 'inet_chksum'
etc.

Based on testing, it doesn't appear to be a #include "<headerfile.h>" issue.

Is the LWIP option not ready for beta-testing, or is there a known issue/workaround for what causes these errors?

Any better idea when will this new lib_xtcp be released?
thanks,
Post Reply