[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] Problem with custom buffers when MEM_ALIGNMENT=4 and ET
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-devel] Problem with custom buffers when MEM_ALIGNMENT=4 and ETH_PAD_SIZE=2 |
Date: |
Tue, 25 Oct 2011 16:27:38 +0200 |
Mason <address@hidden> wrote:
> --- pbuf.c.orig 2011-08-24 11:02:34.484375000 +0200
> +++ pbuf.c 2011-10-25 16:03:44.015625000 +0200
> @@ -376,7 +376,7 @@
>
> p->pbuf.next = NULL;
> if (payload_mem != NULL) {
> - p->pbuf.payload = LWIP_MEM_ALIGN((void *)((u8_t *)payload_mem +
> offset));
> + p->pbuf.payload = (u8_t *)payload_mem + offset;
> } else {
> p->pbuf.payload = NULL;
> }
I've recently change that in git to:
p->pbuf.payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset);
Does that work for you?
> Probably not appropriate, but again, I'm not sure what MEM_ALIGNMENT
> really means.
Your MEM_ALIGNMENT is correct: it's used for accessing U32 variables, not for
cache aligment.
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de