We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 20636

7.1 / 6.3 EDK LwIP v2.0 - After trying to create multiple sockets, the software hangs after the third accept() routine


Keywords: threads, Xilkernel, XMK, accept

Urgency: Standard

General Description:
I am using LWIP v2.0 sockets library from EDK 6.3.1 (or 6.3.2). I have been successful in creating and using sockets in multiple threads. However, when I create and use six sockets at once (three different port connections), the software hangs in the third accept() routine. This occurs regardless of the order of the connections.


This issue is related to a bug in EDK 6.3 XPS/MLD. There is a socket memory configuration option category that is not shown at all, and this category depends on the API_MODE being set to SOCKETS_API. This issue is scheduled to be fixed in EDK 7.1.

In the meantime, you can work around this problem as follows:
1. Create sw_services directory in the project .
2. Copy $XILINX_EDK/sw/lib/sw_services/lwip_v2_00_a to sw_services directory created above.
3. Edit the file sw_services/lwip_v2_00_a/data/lwip_v2_1_0.mld for socket_memory_options.

Increase the following:
memp_num_netbuf = 25
memp_num_netconn = 30
memp_num_api_msg = 15
memp_num_tcpip_msg = 15

You can adjust these values to increase these LwIP memory options appropriately.

Additionally, the XilKernel setting needs to include the following parameter:

max_sem = 50
AR# 20636
Date 04/13/2007
Status Archive
Type General Article
Page Bookmarked