lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] tcp_enqueue - Does it slow down lwip?


From: Paul C
Subject: [lwip-users] tcp_enqueue - Does it slow down lwip?
Date: Wed, 15 Dec 2004 19:47:51 +1030

Hi 

I have had a bit more of a dig around the tcp_enqueue() issue. 
My current work around is in tcp_write, check the return 
value of tcp_enqueue() if it returns ERR_MEM do a tcp_output and
retry tcp_enqueue. I think this is beneficial as once
the queue length is maxed no more can be written so the pcb, so the pcb
would be stuck until the tcp_tmr tried to send it. It has to be better
to send it on its way ASAP!

Does anyone have any other ideas? Perhaps the tcp_output() can be 
put into the tcp_enqueue function? Does anyone know why tcp_output()
cant be called when the pcb == pcb_input?

Thanks

Paul


On Tue, 14 Dec 2004 16:24:07 +1030, "Paul C" <address@hidden>
said:
> Hi All,
> 
> I think that there could be an issue with tcp_enqueue().
> It is possible for the queue to grow to TCP_SND_QUEUELEN in
> which case the function returns ERR_MEM;
> 
> When tcp_enqueue is called from tcp_in it is followed by tcp_output()
> without checking the return value of tcp_enqueue().
> 
> In tcp.c the return value of tcp_enqueue() == ERR_OK is checked before
> calling
> tcp_output. So the ERR_MEM prevents the output of the tcp data.
> 
> tcp_enqueue is also called from tcp_send_ctrl() which is used in
> tcp_close.
> In tcp_close the ERR_MEM return value prevents the output of the tcp
> data.
> 
> So, what should really happen when the tcp data is queued to the max?
> Should tcp_enqueue do a tcp_output if the queue length is maxed out?
> Should the ERR_MEM case be handled by the caller which would do a
> tcp_output?
> 
> Any comments?
> 
> thanks
> 
> Paul Clarke
> 
> 
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users




reply via email to

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