lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LWIP/WIN32 UDP performance (throughtput)


From: Stephane Lesage
Subject: Re: [lwip-users] LWIP/WIN32 UDP performance (throughtput)
Date: Thu, 16 Feb 2012 16:09:02 +0100

> > I suppose I could allocate 32 more bytes to hold the pbuf struct and
> > fudge the pointers to make the payload start on the right boundary,
> > but you've said that pbuf_header could move the start of payload, or
> > something like that... More voodoo stuff.
> 
> And that is something I need, too: using a different alignment
> constraint for pbufs (16 bytes) than for the rest (4 bytes). I might
> have to add that to 1.4.1 so we can use a clean version in our
products

Hi,
I need 32 bytes alignement on Blackfin for L1 cache
and even 128 bytes on C674x for L2 cache.

I just add this in my cc.h:

// PBUF_POOL needs to be aligned to cache line size
#ifndef __cplusplus
extern u8_t memp_memory_PBUF_POOL_base[] __attribute__ ((aligned (32)));
#endif

And in my lwipopts.h:

#define PBUF_POOL_BUFSIZE                               1520
// + sizeof(pbuf) = 1536 = 48 cache lines

But I agree it could be easier with something like:
#define PBUF_ALIGNMENT  32

-- 
Stephane



reply via email to

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