[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] tcp_write and dynamic data (was: Optimizing TCPwrites)
From: |
Kieran Mansley |
Subject: |
RE: [lwip-users] tcp_write and dynamic data (was: Optimizing TCPwrites) |
Date: |
Fri, 07 Mar 2008 15:48:48 +0000 |
On Fri, 2008-03-07 at 10:33 -0500, Bill Auerbach wrote:
> It is being called. If I view the data to be freed, it's intact. The data
> received on the PC is the same data with the first word trashed because
> free() overwrites the first word of the data block.
This sounds like something is wrong. Either a bug in lwIP or you're
using the API incorrectly.
> In my case, tcp_write
> is being called repeatedly with < tcp_sndbuf amount of data so the first
> call to tcp_sent has no data since the preceding tcp_write took all of it.
I don't understand what you're getting at here. The size of the call to
tcp_write should make no difference. By "the call to tcp_sent has no
data" do you mean tcp_sent callback gets called with a length of zero?
> Would turning on TCP_OUTPUT_DEBUG and adding a printf in my tcp_sent be
> useful for you to see the transaction?
Could you double check that when tcp_sent is called you're freeing the
correct buffer? Note that you may get multiple tcp_sent callbacks for
one tcp_write, each specifying that only a part of the buffer can be
freed. Alternatively you may get only one tcp_sent callback for
multiple tcp_writes, and you may then be able to free multiple buffers.
Kieran
- Re: [lwip-users] Optimizing TCP writes, (continued)
- Re: [lwip-users] Optimizing TCP writes, Jonathan Larmour, 2008/03/05
- RE: [lwip-users] Optimizing TCP writes, Bill Auerbach, 2008/03/05
- RE: [lwip-users] Optimizing TCP writes, Bill Auerbach, 2008/03/05
- Re: [lwip-users] Optimizing TCP writes, Jonathan Larmour, 2008/03/06
- RE: [lwip-users] Optimizing TCP writes, Bill Auerbach, 2008/03/06
- Re: [lwip-users] Optimizing TCP writes, Jonathan Larmour, 2008/03/06
- RE: [lwip-users] tcp_write and dynamic data (was: Optimizing TCP writes), Bill Auerbach, 2008/03/07
- RE: [lwip-users] tcp_write and dynamic data (was: Optimizing TCP writes), Kieran Mansley, 2008/03/07
- RE: [lwip-users] tcp_write and dynamic data (was: Optimizing TCPwrites), Bill Auerbach, 2008/03/07
- RE: [lwip-users] tcp_write and dynamic data (was: Optimizing TCPwrites),
Kieran Mansley <=
- RE: [lwip-users] tcp_write and dynamic data (was: Optimizing TCPwrites), Bill Auerbach, 2008/03/07
- RE: [lwip-users] tcp_write and dynamic data (was: Optimizing TCPwrites), Kieran Mansley, 2008/03/07
- RE: [lwip-users] tcp_write and dynamic data (was: OptimizingTCPwrites), Bill Auerbach, 2008/03/07
- RE: [lwip-users] tcp_write and dynamic data (was: Optimizing TCPwrites), Bill Auerbach, 2008/03/07