"Stephane Lesage" <[email protected]> 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 _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
