[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-devel] tcp_input: order of processing question/comment
From: |
Pettinato, Jim |
Subject: |
RE: [lwip-devel] tcp_input: order of processing question/comment |
Date: |
Wed, 4 Feb 2009 12:58:03 -0500 |
I didn't bother to go look, but I seem to recall the likelihood of an
updated receive window being part of the reason for calling tcp_output
_after_ the recv callback?? I'm not sure it would harm anything to call
it _prior_ to the recv callback as well, but I agree we should still
call it afterward.
- Jim
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf
Of address@hidden
Sent: Wednesday, February 04, 2009 12:06 PM
To: lwip-devel
Subject: Re: [lwip-devel] tcp_input: order of processing
question/comment
I guess the intention was to be able to output data enqueued in the recv
callback. _If_ changing anything, we could add a _second_ call to
tcp_output _before_ calling the recv callback, but the call _after_ the
recv callback has to remain there, I think.
Simon
bill wrote:
>
> Currently In tcp_input, towards the end of the function, the tcp_recv
> callback is called and if there is no error returned, tcp_output is
> called to process any pending outgoing data.
>
> The questions are: Why would we want an error returned by the receive
> callback to prevent us from sending any pending data? Wouldn't we
> still want to send queued ACKs or queued data?
>
> The comment is: It would seem to be better to call tcp_output
> **before** calling the tcp_recv callback. This would allow the other
> end of the connection to process any data that may be sent in that
> call while the lwIP side goes off and processes its data in the
> receive callback. In my bandwidth testing I do see slightly better
> performance by adding a tcp_output call before the receive callback.
>
> Bill
>
> ----------------------------------------------------------------------
> --
>
> _______________________________________________
> lwip-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-devel
>
_______________________________________________
lwip-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-devel