[Top][All Lists]
[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: |
Kieran Mansley |
Subject: |
[lwip-devel] [bugs #10548] Problem w/ TCP_SEQ_BETWEEN at ONE place in tcp_in.c |
Date: |
Sat, 16 Oct 2004 09:30:31 -0400 |
User-agent: |
Opera/7.54 (X11; Linux i686; U) [en] |
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:
Kieran Mansley <address@hidden>
'Date:
Sat 10/16/2004 at 13:09 (Europe/London)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Fixed
Assigned to | None | leonwoestenberg
------------------ Additional Follow-up Comments ----------------------------
I think Leon has now checked in a fix to this bug.
/**************************************************************************/
[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: Open
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: 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/