public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: sebastian@breakpoint.cc, netdev@vger.kernel.org, tglx@linutronix.de
Subject: Re: Generic rx-recycling and emergency skb pool
Date: Sat, 03 Jul 2010 09:31:00 +0200	[thread overview]
Message-ID: <1278142260.2474.76.camel@edumazet-laptop> (raw)
In-Reply-To: <20100702.234645.104076220.davem@davemloft.net>

Le vendredi 02 juillet 2010 à 23:46 -0700, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Sat, 03 Jul 2010 08:23:25 +0200
> 
> > Maybe its time to provide new API, so that a driver can build an skb at
> > the time RX interrupt is handled, not at the time the rx ring buffer is
> > renewed. RX ring should only provide the data part to NIC, and skb
> > should be built when NIC delivers the frame, so that we provide to IP
> > stack a real hot skb.
> 
> Drivers do this already, and in fact I am very sure I'm mentioned this
> to you at least other time in the past, and one such driver is NIU :-)

You did indeed. I should said "provide a generic and universal API",
usable by average NIC driver, not only big ones. (NIU is more than
10.000 lines of code ;) )

NIU still uses netdev_alloc_skb() API. I was thinking of a function to
allocate and populate the sk_buff, but data part provided by caller.

> 
> It's trivial to do with devices which work on power-of-2 chopped up
> pages.  In fact I'm surprised that RX buffer management scheme is
> not more prevalent in network devices.

Many of them were written in last century :)




  reply	other threads:[~2010-07-03  7:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-02 19:20 Generic rx-recycling and emergency skb pool Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 1/8] net: implement generic rx recycling Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 2/8] net/gianfar: use generic recycling infrasstructure Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 3/8] net/mv643xx: use generic recycling infrastructure Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 4/8] net/stmmac: " Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 5/8] net/ucc_geth: " Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 6/8] net: implement emergency pools Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 7/8] net/emergency_skb: create a deep copy on clone Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 8/8] net/emergency: remove locking from reycling pool if emergncy pools are not used Sebastian Andrzej Siewior
2010-07-03  6:23 ` Generic rx-recycling and emergency skb pool Eric Dumazet
2010-07-03  6:46   ` David Miller
2010-07-03  7:31     ` Eric Dumazet [this message]
2010-08-26 17:31   ` Sebastian Andrzej Siewior

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=1278142260.2474.76.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sebastian@breakpoint.cc \
    --cc=tglx@linutronix.de \
    /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