UPGRADE YOUR BROWSER

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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor fft442
Visitor
7,839 Views
Registered: ‎01-04-2011

lwip_write() block issue

I used the sample program of XAPP1026 to run at PowerPC440 of V5FX100T, with lwip140_v1_0_a in ISE14.7.

And I called lwip_write() in while to send data endlessly. The program will block after about 20 minutes.

Same program run well in ISE13.1.  Can anyone give me some hints? Thanks!

 

Following is the key code. Complete code can be found in attached file.

 

----------------------------------------------------------------------------------------------------------------------------

    while(lwip_connect(sock, (struct sockaddr *)&serv_addr, sizeof (serv_addr)) < 0)
    {
        xil_printf("Can not connect to server.\n\r");
        lwip_close(sock);
        if ((sock = lwip_socket(AF_INET, SOCK_STREAM, 0)) < 0) {
            xil_printf("error creating socket\n\r");
            return;
        }
        sleep(1000);
    }
    print("Connected\n\r");

    while (lwip_write(sock, send_buf, SEND_BUFSIZE) >= 0) {
//        for(i = 0; i < 0xffff; i++);
    }

    print("TX perf stopped\n\r");

0 Kudos
3 Replies
Visitor fft442
Visitor
7,811 Views
Registered: ‎01-04-2011

Re: lwip_write() block issue

After every block of Lwip_write, there is always an ARP request and respond. But after that, the lwip still blocked. See attached wireshark captured result.
captured.bmp
0 Kudos
Visitor fft442
Visitor
7,789 Views
Registered: ‎01-04-2011

Re: lwip_write() block issue

When set LWIP_STATS=true, I got following messege:

 

MEM TCPIP_MSG_INPKT

       avail: 8

       used: 8

       max: 8

       err: a00

 

It seemed that lwip memory has some error, and the arp information is lost.

Anyone met the same problem in ISE14.7 with lwip1.4.0?

0 Kudos
2,679 Views
Registered: ‎05-13-2016

Re: lwip_write() block issue

I know this is quite old, but I am seeing TCPIP_MSG_INPKT errors.  I changed the MEMP_NUM_TCPIP_MSG_INPKT value to a larger value, and am testing now.  Did you resolve this issue?

 

 

#define MEMP_NUM_TCPIP_MSG_INPKT 128

0 Kudos