On Tue, 7 Feb 2006, David S. Miller wrote:
From: Jesse Brandeburg <[EMAIL PROTECTED]>
Date: Tue, 7 Feb 2006 17:41:28 -0800 (Pacific Standard Time)

> so we generally call dev_alloc_skb to get the receive buffers to give to
> our hardware.  When we use multiple receive buffers what is the right way
> to allocate memory to give buffers to the hardware and then later, to
> "chain" the descriptors together to make the packet?  Using skb's is the
> common way as far as I've understood it.
>
> Your input on the correct way to do these things is greatly appreciated.

Allocate a single SKB and fill in the skb_shared_info() page/offset/len
pairs, making sure to take proper references to the pages you add.
Coalesce when possible.

Given that there is code in the kernel in
net/ipv4/ip_fragment.c: ip_frag_reasm

        /* If the first fragment is fragmented itself, we split
         * it to two chunks: the first with data and paged part
         * and the second, holding only fragments. */

checks for a frag_list and in response, *creates* the frag list inside a frag list, when does that code get used?

Basically it appears that code has been there for a long time (since 2.4) and both e1000 and other drivers use it. If the change to skb_copy_datagram_iovec is reverted, this method of chaining skbs continues to work. I don't see any clear reason why it shouldn't work.

Jesse
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to