lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Alignment issue in pbuf


From: Mike Kleshov
Subject: Re: [lwip-users] Alignment issue in pbuf
Date: Sat, 12 Dec 2009 18:20:55 +0300

> I have used LwIP 1.3.1 with dm9000a. But I found that if the length of
> mediate pbuf node is not aligned to 2 (I use 16bit mode for dm9000a), the
> transmission will be failed. (I have not copied each node buffer of pbuf
> chain to a big buffer) If I don't want to copy these node buffer to a big
> buffer, how can I avoid this issue? Can I modify some options of lwip to do
> it? Thanks.

I believe I was facing a similar issue with the CS8900A in 16-bit
mode. The chip would only accept data for transmission in 16-bit
words. Obviously, this created a problem for pbufs with odd number of
bytes. I solved the problem by detecting odd-sized pbufs and splicing
the last byte of such pbuf with the first byte of next pbuf,
processing subsequent bytes appropriately. Obviously, performance will
suffer and this cannot be done for DMA.




reply via email to

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