lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] Bug in snd_buf calculation


From: Jan Ulvesten
Subject: RE: [lwip-users] Bug in snd_buf calculation
Date: Mon, 27 Feb 2006 09:07:10 +0100

Leon, Christian



from tcp_out.c
-------------
#if 0
  pcb->snd_buf -= ((len+1) & ~0x1); /* Even the send buffer */
#else
  pcb->snd_buf -= len;
#endif  



from tcp_in.c
-------------
#if 0
      pcb->snd_buf += ((pcb->acked+1) & ~0x1); /* Even the send buffer
*/
#else
      pcb->snd_buf += pcb->acked;
#endif      


This may happen:

len=3   ->      snd_buf -= 4
len=3 ->        snd_buf -= 4
ack=6 ->        snd_buf += 6 (and two bytes are "lost")

Remember that TCP does not ack every single packet (sliding window)

Test by transmitting odd length packets continuously.

I'm not sure why snd_buff must be even?  If I knew I might contribute
with a fix.


Jan Ulvesten
Sicom

-----Original Message-----
From: Christiaan Simons [mailto:address@hidden 
Sent: 24. februar 2006 09:50
To: address@hidden
Subject: Re: [lwip-users] Bug in snd_buf calculation



Leon wrote:

>Could you discuss how to proceed with a proper fix for this?

Is it possible to create a test-case to pin-point the problem?
E.g. using new or existing example code.

If I can reproduce and solve the problem here,
I'm more confident with applying such changes.

Bye,

Christiaan Simons

Hardware Designer
Axon Digital Design

http://www.axon.tv



This email and any files transmitted with it are confidential and
intended
solely for the use of the individual or entity to whom they are
addressed.
If you have received this email in error please notify the system
manager.
This message contains confidential information and is intended only for
the
individual named.  If you are not the named addressee you should not
disseminate, distribute or copy this e-mail.



_______________________________________________
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]