From: David Miller <davem@davemloft.net>
To: shemminger@linux-foundation.org
Cc: netdev@vger.kernel.org
Subject: Re: [RFC net-2.6.24] skbuff: change skb_frag_struct to scatterlist
Date: Mon, 08 Oct 2007 00:04:51 -0700 (PDT) [thread overview]
Message-ID: <20071008.000451.38691636.davem@davemloft.net> (raw)
In-Reply-To: <20071005174322.0a13c173@freepuppy.rosehill>
From: Stephen Hemminger <shemminger@linux-foundation.org>
Date: Fri, 5 Oct 2007 17:43:22 -0700
> Replace the skb frag list with the common scatterlist definition.
> This allows device drivers to use dma_scatter/gather operations which
> may be faster on some platforms. As a side benefit, it is easier to
> handle dma mapping error unwind.
>
> This idea came up long ago, just never got implemented.
> Reimplemented against net-2.6.24. This version is for comment, not
> tested yet.
>
> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Thanks for keeping this idea alive.
But this isn't the hard part. The issue is that skb->data is still
seperate, and as long as that's true DMA mapping error recovery is
still a complete mess because we still have to do two seperate DMA
mappings on transmit, one of which is conditional, instead of one call
which is easy to handle properly.
We could do something cute like have the packet building routines use
skb_shinfo(skb)->frags[1] and onward, and then right before
->hard_start_xmit() we fill in skb_shinfo(skb)->frags[0] with
virt_to_page(skb->data) etc.
No page refcount bumps on this magic first entry, in order for it to
be as near zero cost as possible.
Anyways, just one idea.
prev parent reply other threads:[~2007-10-08 7:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-06 0:43 [RFC net-2.6.24] skbuff: change skb_frag_struct to scatterlist Stephen Hemminger
2007-10-08 7:04 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071008.000451.38691636.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).