lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] tcp_write() errors on snd_queuelen


From: Mullanix, Todd
Subject: RE: [lwip-users] tcp_write() errors on snd_queuelen
Date: Wed, 16 Mar 2011 11:00:23 -0500

Hi Tim,

Could I get a little back-ground. I know you are using version 1.3.2 from TI. 
Is this bundled in the StellarisWare package? 
If so, which version of StellarisWare? 
Which chip are you using? 
What OS are you using?

I'm currently working on porting lwIP to TI's SYS/BIOS for the LM3S9B92. I'm 
basically using the same Ethernet code as StellarisWare (revision 6852). I 
might be seeing the same type of issue that you are. Based on what you've seen, 
I'll focus my debugging in that area.

Thanks,
Todd

P.S. I did find one issue that you might want to change in the 
src/include/lwip/tcp.h file. As noted in the file, there is a compiler bug that 
is impacting the TCP_SEQ_XXX macros. There is a work-around in this file. 
Unfortunately, the work-around is not correct for some versions of the 
compiler. Here is the one I'm using in tcp.h. While heavier, it is correct on 
different versions of the compiler.

/* Modified by TI to work around a compiler bug */
#if 0
#define TCP_SEQ_LT(a,b)     ((s32_t)((a)-(b)) < 0)
#define TCP_SEQ_LEQ(a,b)    ((s32_t)((a)-(b)) <= 0)
#define TCP_SEQ_GT(a,b)     ((s32_t)((a)-(b)) > 0)
#define TCP_SEQ_GEQ(a,b)    ((s32_t)((a)-(b)) >= 0)
#else
/* TI replacement definitions... */
static inline int TCP_SEQ_LT(u32_t a, u32_t b)
{
        volatile s32_t zero = 0;
        return ((s32_t)(a - b) < zero);
}
static inline int TCP_SEQ_LEQ(u32_t a, u32_t b)
{
        volatile s32_t zero = 0;
        return ((s32_t)(a - b) <= zero);
}
static inline int TCP_SEQ_GT(u32_t a, u32_t b)
{
        volatile s32_t zero = 0;
        return ((s32_t)(a - b) > zero);
}
static inline int TCP_SEQ_GEQ(u32_t a, u32_t b)
{
        volatile s32_t zero = 0;
        return ((s32_t)(a - b) >= zero);
}
#endif




reply via email to

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