lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] Beginner's problems and questions


From: David Haas
Subject: [lwip-users] Re: [lwip] Beginner's problems and questions
Date: Wed, 08 Jan 2003 23:18:29 -0000

Peter,

There are several example makefiles in the proj directory tree. Have a look
at them. They should answer questions 1 and 2.

There is a porting guide written as part of sys_arch.txt in the doc
directory. It will explain some of the changes you need to make to port
lwip.

The PACK_STRUCK macros are used to provide the definition of how structures
get packed for your compiler. Look in your compiler documentation to find
this, since it is compiler specific. An example from the compiler I am using
is:

#define PACK_STRUCT_BEGIN #pragma pack(1,1,0)
#define PACK_STRUCT_STRUCT
#define PACK_STRUCT_END #pragma pack()
#define PACK_STRUCT_FIELD(x) x

Note that in this case I don't need PACK_STRUCT_STRUCT so I just defined it
to nothing. I am not sure what you mean by conflicting definitions. These
macros are defined in the architectural specific sections, and only a single
architecture is included as part of your build (look at makefiles).

For an answer to question 4 look at the 6502 architecture. I believe the
implementation is single-threaded. Also sys_arch.txt talks about this a bit.

If you only use buffers from PBUF_POOL, you will not be using dynamic
allocation for buffers, but you might have to change some things around the
code to make this happen everywhere. I am not familiar enough with it all to
answer this one completely.

I have not looked at the buffer code closely enough to answer number 6, so
someone more knowledgable than myself will have to answer that one.

David.



----- Original Message -----
From: "Wurmsdobler, Peter" <address@hidden>
To: <address@hidden>
Sent: Monday, November 18, 2002 11:59 AM
Subject: [lwip] Beginner's problems and questions


> Hello,
>
> First and in advance many thanks to Adam for his excellent work and
> providing it to a community. Since I am a beginner in TCP/IP stack
> implementation, I have some questions:
>
> 1. Given the distribution, is there any template for makefiles in order
>    to build a generic tree ?
>
> 2. What should be compiled and linked together for a special target?
>    api arch/$arch core core/ipv4 netif ? This is not so obvious for me.
>    A document on the web speaks about core/ipv4 and arch/$ARCH/*_arch.c
>
> 3. Having made my own Makefiles in the dirs I think are necessary, I got
>    many compile errors, in particular "conflicting types for
> `PACK_STRUCT_STRUCT'"
>    (I did ot understand its use so far). But there are still others.
>    Most arise of many dependences and multiple definitions.
>
> 4. I assume that certain functions have to be provided for a specific
> architecture,
>    which is somewhere in arch/$ARCH/lib_arch.c and arch/$ARCH/sys_arch.c
> with
>    their header files in the respective dirs. In a single threaded
> environment
>    (no OS) what must the sem and block functions look like?
>
> 5. So far I prefer to force lwIP to use only pool buffers as I anticipate
> more
>    predictible performance in a control environment. Is there a good means
> to
>    just remove everything related to dynamic allocation? Is this also
> possible
>    for a pool of PCBs (I did not understand yet the PCB allocation).
>
> 6. pbuf.c uses a pbuf_pool and a cache. What would happen if only a single
>    linked list is used for free buffers. What is the benefit of using the
>    cache (alocating from pbuf_pool, freeing into the cache, and then
> refreshing
>    from the one into the other. Or do I miss a major OS point?
>
> Thanks a lot for any hints,
> peter
>
> Peter Wurmsdober
> Eurotherm Drives Ltd.
> Littlehampton, BN17 7RZ, UK
> TEL: +44 19 03 73 73 58
> FAX: +44 19 03 73 71 07
> [This message was sent through the lwip discussion list.]

[This message was sent through the lwip discussion list.]




reply via email to

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