lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwIP hangs after sending to much data


From: brak brak2
Subject: Re: [lwip-users] lwIP hangs after sending to much data
Date: Mon, 4 Jul 2011 13:02:00 +0200

> 1) if tcp_sndbuf() is returning >0, but you get ERR_MEM when trying to
> send that many bytes, there's no point trying with a smaller number of
> bytes.  It's probably an indication that there is some other limitation,
> such as the number of buffers in the send queue, or the availability of
> buffers.

I wrote it according to an example of HTTP server from TI for Stellaris uC.
I think it speeds up data send.

> 2) You describe a problem with establishing a connection where lwIP
> continues to reply with a SYN-ACK. Have you got a wireshark packet
> capture of this case?  That would be very helpful in deciding what has
> gone wrong.

I attached pcap file from Wireshark 1.6.

> 3) Does you driver correct handle a list of pbufs?  In the cases where
> you have more data queued up, lwIP might be sending a packet as a list
> of pbufs, rather than a single one.  This has been a cause of problems
> for others in the past.

For Stellaris LM3S6911 I use lwIP port from Texas Instruments so I
would guess that it is OK. I made my port of lwIP for LPC1769 by
changing the code for Stellaris - there was a lot of changes ;)
I'll check how looks data passed to low level output function.

> 4) Another possibility is that the packet lists in lwIP are getting
> corrupted.  This is often caused by failing to respect lwIP's threading
> constraints: i.e. only one thread active in the core of lwIP (including
> interrupts) at one time.

I think I handled it correctly, but I'll check again.

> 5) For details of PBUF_LINK_HLEN and ETH_PAD_SIZE see
> src/include/lwip/opt.h.  Your settings look wrong to me, and I would
> leave them at the default unless you know otherwise.  The ETH_PAD_SIZE
> defines how many bytes are unused at the start of the buffer, to ensure
> that the subsequent (i.e. IP) headers are word-aligned.  The
> PBUF_LINK_HLEN defines the size of the link-layer header, which for
> Ethernet (with no VLANs or similar) is 14.

This settings are from TI also. I'll try to use default values.

Thanks
Thomas

Attachment: SYNACKproblem.pcap
Description: Binary data


reply via email to

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