lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] porting lwip to a mips system


From: Kieran Mansley
Subject: Re: [lwip-users] porting lwip to a mips system
Date: Fri, 9 Feb 2007 20:11:05 +0000
User-agent: Mutt/1.5.11

On Thu, Feb 08, 2007 at 10:53:37PM -0600, Pisano, Edward A wrote:
> Hi all,
> It's interesting that this e-mail thread came up when it did.  I just
> noticed that I, too, see the same 2 byte offset issue with the payload
> after the headers have been removed.  

I don't have the source to hand, and this is from memory, so perhaps
not very accurate...

The ethernet frame header is of course 14 bytes.  The reason I suspect
that the PBUF_LINK_HLEN is set to 16 bytes is to ensure that
subsequent headers and payload are aligned to a 4 byte boundary.  This
is configurable if this is not what you require.

> I'm using the xemac driver from XiLinx to interface lwIP to their EMAC
> core.  It has a hardcoded value of 14 in it for, what appears to be,
> removing the Ethernet Frame (6 byte dest. Addr + 6 byte src. Addr + 2
> byte type) from the payload on received packets.  Although,
> PBUF_LINK_HLEN is defined as 16, it only appears to be used for
> transmitted packets.

For received packets you may need the help of the network driver to
ensure that there is a 2 byte padding at the start of the frame to
ensure that subsequent headers and payload are aligned to your
requirements.

Kieran




reply via email to

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