lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] (no subject)


From: Anirudha Sarangi
Subject: [lwip-users] (no subject)
Date: Wed, 6 Jul 2011 18:40:51 +0800 (SGT)

Hi,
I am facing a strange issue with lwip 1.3.0. The issue is also seen when I upgrade to lwip 1.3.2.
 
I have written a small application for txiperf that runs as an application on the lwip stack (it is in standalone mode with no OS being used). On the other end I have a PC which runs jperf. Below is part of my application code:
 
#define SEND_BUFSIZE (1400)
static char send_buf[SEND_BUFSIZE];
 

int transfer_txperf_data() {

    int copy = 0;

    err_t err;

    struct tcp_pcb *tpcb = connected_pcb;

    if (!connected_pcb)

        return ERR_OK;

    while (tcp_sndbuf(tpcb) > SEND_BUFSIZE) {

        err = tcp_write(tpcb, send_buf, SEND_BUFSIZE, copy);

        if (err != ERR_OK) {

            xil_printf("txperf: Error on tcp_write: %d\n\r", err);

                        connected_pcb = NULL;

            return -1;      }

        tcp_output(tpcb);   }

    return 0;

}

 

The exact issue that I face is, after running for few hours, the transmission stops from my end. And the reason that I see is, tcp_sndbuf (tpcb) becomes less than 1400 (which should not have happened).

 

If I run wireshark on the PC where jperf runs, the capture indicates an "TCP out of order" message. Probably, the PC asks for a re-transfer but the board does not respond.

 

Any fix for it?

 

regards

Anirudha


reply via email to

[Prev in Thread] Current Thread [Next in Thread]