lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bugs #10548] Problem w/ TCP_SEQ_BETWEEN at ONE place in tc


From: Leon Woestenberg
Subject: [lwip-devel] [bugs #10548] Problem w/ TCP_SEQ_BETWEEN at ONE place in tcp_in.c
Date: Sun, 26 Dec 2004 08:58:08 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

This mail is an automated notification from the bugs tracker
 of the project: lwIP - A Lightweight TCP/IP stack.

/**************************************************************************/
[bugs #10548] Latest Modifications:

Changes by: 
                Leon Woestenberg <address@hidden>
'Date: 
                Sun 12/26/2004 at 13:46 (Europe/Amsterdam)

            What     | Removed                   | Added
---------------------------------------------------------------------------
              Status | Open                      | Closed


------------------ Additional Follow-up Comments ----------------------------
I am closing this bug now the published workaround both works, is implemented 
in lwIP, and documented as such in the code.






/**************************************************************************/
[bugs #10548] Full Item Snapshot:

URL: <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=10548>
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: 0
On: Fri 10/01/2004 at 14:11

Category:  TCP
Severity:  5 - Average
Item Group:  Faulty Behaviour
Resolution:  Fixed
Privacy:  Public
Assigned to:  leonwoestenberg
Status:  Closed


Summary:  Problem w/ TCP_SEQ_BETWEEN at ONE place in tcp_in.c

Original Submission:  I just finished a port from lwIP-0.7.2 to the current 
code in CVS.  The processor is an LPC2292 with a CS8900 ethernet chip.  The LPC 
is an ARM7TDMI which operates in LITTLE_ENDIAN mode.  The problem shows up for 
me when using Adam's minimal http server.  I have isolated it to the 
TCP_SEQ_BETWEEN in tcp_in.c at line 822.  When I use the
previous macros, the code serves pages just fine.  When I use the new macro, it 
does not.  The code fragment that works is:

  while (pcb->unsent != NULL &&
         TCP_SEQ_LEQ(ntohl(pcb->unsent->tcphdr->seqno) + 
         TCP_TCPLEN(pcb->unsent), ackno) &&
         TCP_SEQ_LEQ(ackno, pcb->snd_max)
         /*TCP_SEQ_BETWEEN(ackno,
           ntohl(pcb->unsent->tcphdr->seqno) +
           TCP_TCPLEN(pcb->unsent), pcb->snd_max)*/

So far I have been unable to determine why in this instance the macro does not 
work.  Maybe something to do with LITTLE_ENDIAN.  Maybe another set of eyes can 
spot it.


Follow-up Comments
------------------


-------------------------------------------------------
Date: Sun 12/26/2004 at 13:46       By: Leon Woestenberg <likewise>
I am closing this bug now the published workaround both works, is implemented 
in lwIP, and documented as such in the code.

-------------------------------------------------------
Date: Sat 10/16/2004 at 13:09       By: Kieran Mansley <kieranm>
I think Leon has now checked in a fix to this bug.

-------------------------------------------------------
Date: Sun 10/03/2004 at 14:37       By: 0 <None>
The call to the macro TCP_SEQ_BETWEEN(a,b,c) causes (b) to
be evaluated twice on LITTLE_ENDIAN machines because of the
call to ntohl().  This produces more code (at least on the ARM).  As a current 
work around, I have left all of the code in tcp_in.c untouched and changed the 
TCP_SEQ_BETWEEN() macro in tcp.h to 
(TCP_SEQ_GEQ(a,b) && TCP_SEQ_LEQ(a,c))
This both works and produces less code.
address@hidden













For detailed info, follow this link:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=10548>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/







reply via email to

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