[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] LWIP/WIN32 UDP performance (throughtput)
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-users] LWIP/WIN32 UDP performance (throughtput) |
Date: |
Thu, 16 Feb 2012 19:59:57 +0100 |
"Stephane Lesage" <address@hidden> wrote:
>> But then struct pbuf is still only 16 bytes long, so payload might
>> start in the middle of a 32-byte border, which leads to faults when
>> flushing cache (since the struct pbuf members are still used cached) or
>> am I wrong there?
>
> I don't have the problem, because:
> 1. I don't need to align my payload. I just need to ensure that a cache line
> cannot contain payload of pbuf N and struct of pbuf N+1.
> I do this by setting (PBUF_POOL_BUFSIZE + sizeof(struct pbuf)) = multiple of
> cache line size
>
> 2. on RX, the pbuf is owned by the driver so I can safely flush the cache to
> get the payload, because I know the stack will not modify a value in the
> struct.
>
Correct me if I am wrong, but I think for this to work you have to invalidate a
pbuf before passing it to the RX engine. When payload starts on a 32 bit
boundary, you can leave a TX pbuf inalidated and pass it to RX.
Simon
- Re: [lwip-users] LWIP/WIN32 UDP performance (throughtput), (continued)
Re: [lwip-users] LWIP/WIN32 UDP performance (throughtput), Zayaz Volk, 2012/02/08
Re: [lwip-users] LWIP/WIN32 UDP performance (throughtput), Simon Goldschmidt, 2012/02/16