TCP/IP mbuf element size
Eric Norum
norume at aps.anl.gov
Thu Feb 13 19:46:28 UTC 2003
Charles Steaderman wrote:
> Hi all. I am working on an ethernet driver on an ARM CPU. When I am
> requested to transmit data out of the ethernet port, I am given a chain
> of mbufs. The chain is often times made up of many small buffers. For
> example, when replying to a 1500 byte ping request, I receive 2 mbuf
> chains. The first chain contains 3 elements of 14, 80, and 1420 bytes
> respectfully. The second chain contains 3 elements of 34, 20, and 8
> bytes respectfully. Unfortunately, the DMA controller on our chip does
> not deal well with small buffers, and causes underflow errors in our
> ethernet controller. Is there a way to tell the TCP/IP stack to give me
> fewer, but larger, mbufs? I really don't want to have to copy the data
> from the mbufs into a buffer prior to initiating a transfer.
>
What's wrong with copying to a single mbuf before transmission? Even if
there were a way to tell the TCP/IP stack to give you a single mbuf,
there TCP/IP stack would still have to copy from the packet fragment
mbufs to the single mbuf so there would be no real improvement from
having your driver do the copy itself.
--
Eric Norum norume at aps.anl.gov
Advanced Photon Source Phone: (630) 252-2793
Argonne National Laboratory
More information about the users
mailing list