[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] Mem alignment problem
From: |
Mumtaz Ahmad |
Subject: |
[lwip-users] Re: [lwip] Mem alignment problem |
Date: |
Thu, 09 Jan 2003 00:09:19 -0000 |
Well the mechanism of keeping 2 extra bytes extra is helpful in sending any
packet and do align Ip header ,agree ,but what about the receiving packets ?
Packets when recived do suffer memory alignment problem as the pbufs are
allocated from pbuf_pool and pool pbufs donot use this mechanism .
Regards
Mumtaz Ahmad
----- Original Message -----
From: Kieran Mansley <address@hidden>
To: <address@hidden>
Sent: Wednesday, March 13, 2002 7:32 PM
Subject: Re: [lwip] Mem alignment problem
> On Wed, 13 Mar 2002, Mumtaz Ahmad wrote:
>
> > Hi
> > I am facing some troubles regarding memory alignment in lwip .I have
set my
> > memory alignment to 4 bytes .On incoming packet when etherheader
(14bytes)
> > is removed the payload pointer is set to startof ipheader . Obvioulsly
the
> > start address of ipheader is not 4 byte aligned . and my platform cannot
> > read integers from non 4 byte aligned address so the packets are
rejected at
> > IP layer .
>
> Most ethernet interfaces reserve two bytes in front of the packet so the
> ip header is aligned on a 16-byte boundary after the 14 byte ethernet
> header.
>
> Kieran
>
> [This message was sent through the lwip discussion list.]
[This message was sent through the lwip discussion list.]