netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yi <yi.zhu@intel.com>
To: David Miller <davem@davemloft.net>
Cc: "mel@csn.ul.ie" <mel@csn.ul.ie>,
	"Chatre, Reinette" <reinette.chatre@intel.com>,
	"elendil@planet.nl" <elendil@planet.nl>,
	"Larry.Finger@lwfinger.net" <Larry.Finger@lwfinger.net>,
	"linville@tuxdriver.com" <linville@tuxdriver.com>,
	"penberg@cs.helsinki.fi" <penberg@cs.helsinki.fi>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"ipw3945-devel@lists.sourceforge.net"
	<ipw3945-devel@lists.sourceforge.net>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"cl@linux-foundation.org" <cl@linux-foundation.org>,
	"Krauss, Assaf" <assaf.krauss@intel.com>,
	"johannes@sipsolutions.net" <johannes@sipsolutions.net>,
	"Abbas, Mohamed" <mohamed.abbas@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: alloc skb based on a given data buffer
Date: Tue, 15 Sep 2009 16:57:29 +0800	[thread overview]
Message-ID: <1253005050.7549.58.camel@debian> (raw)
In-Reply-To: <20090915.013321.07006714.davem@davemloft.net>

On Tue, 2009-09-15 at 16:33 +0800, David Miller wrote:
> From: Zhu Yi <yi.zhu@intel.com>
> Date: Tue, 15 Sep 2009 16:30:20 +0800
> 
> > This way, device drivers can allocate the Rx buffers with their own size
> > and alignment requirement. i.e. do an order-1 page allocation directly
> > with free_pages() in the iwlagn driver for a 256 bytes aligned 8K Rx
> > buffer. After DMA is finished, drivers can use the above function to
> > assemble an skb based on the Rx buffer. It should resolve the problem
> > for requiring an order-2 allocation by alloc_skb() in the first place.
> 
> You can create paged RX skbs just like drivers such as niu.c
> and others already do, there is no need for special APIs for
> this.

Thanks. So we can put the 8K buffer into 2 skb_shinfo()->frags[] slots
and set nr_frags to 2, right? Is this supported allover the network code
already? At a first glance, I didn't find any frags handling in mac80211
stack.

Thanks,
-yi


  reply	other threads:[~2009-09-15  8:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200909060941.01810.elendil@planet.nl>
     [not found] ` <4AA67139.80301@lwfinger.net>
     [not found]   ` <20090909150418.GI24614@csn.ul.ie>
     [not found]     ` <200909091759.33655.elendil@planet.nl>
     [not found]       ` <20090909165545.GK24614@csn.ul.ie>
     [not found]         ` <1252526738.30150.91.camel@rc-desk>
     [not found]           ` <20090910090206.GA22276@csn.ul.ie>
     [not found]             ` <1252617290.30150.321.camel@rc-desk>
     [not found]               ` <20090911084717.GB32497@csn.ul.ie>
     [not found]                 ` <1252897270.5650.169.camel@debian>
     [not found]                   ` <20090914130612.GA11778@csn.ul.ie>
2009-09-15  8:30                     ` alloc skb based on a given data buffer Zhu Yi
2009-09-15  8:33                       ` David Miller
2009-09-15  8:57                         ` Zhu Yi [this message]
2009-09-15  9:09                           ` David Miller
2009-09-15  9:15                             ` Zhu Yi
2009-09-15 15:30                               ` Johannes Berg
     [not found]                                 ` <1253028631.23427.55.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org>
2009-09-15 21:16                                   ` David Miller
2009-09-19  5:56                                     ` Johannes Berg

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=1253005050.7549.58.camel@debian \
    --to=yi.zhu@intel.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=akpm@linux-foundation.org \
    --cc=assaf.krauss@intel.com \
    --cc=cl@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=elendil@planet.nl \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mel@csn.ul.ie \
    --cc=mohamed.abbas@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=reinette.chatre@intel.com \
    /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).