From: Steve Wise <swise@opengridcomputing.com>
To: David Miller <davem@davemloft.net>
Cc: greearb@candelatech.com, rick.jones2@hp.com, hadi@cyberus.ca,
johnpol@2ka.mipt.ru, netdev@vger.kernel.org,
Robert.Olsson@data.slu.se
Subject: Re: pktgen question
Date: Mon, 08 Oct 2007 17:46:26 -0500 [thread overview]
Message-ID: <470AB342.1030209@opengridcomputing.com> (raw)
In-Reply-To: <20071008.152234.13748626.davem@davemloft.net>
David Miller wrote:
> From: Ben Greear <greearb@candelatech.com>
> Date: Mon, 08 Oct 2007 14:57:13 -0700
>
>> This skb recycling can certainly work and has been done several
>> times before. It never gets into the kernel though.
>
> Because it doesn't work.
>
> A socket can hang onto a receive packet essentially forever.
>
> You cannot therefore rely upon the network stack to give you the
> packet back in some reasonable finite amount of time. This is simply
> the nature of the beast.
>
> Which means that you either:
>
> 1) Starve and stop receiving packets when the recycling ring
> runs out because all of those packets are stuck in socket
> buffers. This is easily DoS'able by users on your system
>
> 2) End up allocating new packets anyways, but then what's the
> point of the recycling ring? It's just a hack that works
> when everything goes as planned, and in real life that is
> rarely the case.
>
> It also makes the driver locking more complicated. Packet
> input occurs in NAPI drivers via netif_receive_skb() which
> would be capable of recycling packets back to the same
> driver in a recycling scheme. But the recycling can occur
> from other contexts too. The netif_receive_skb() caller
> already has atomic access to the receive queue, but those
> other callback cases do not.
>
> That locking issue is just the tip of the iceberg. Once you
> start discussing solutions, all sorts of new issues begin to
> pop up.
>
> SKB recycling, just say no.
>
We're talking about just for pktgen...eh?
next prev parent reply other threads:[~2007-10-08 22:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-23 16:12 pktgen question Steve Wise
2007-09-23 17:28 ` Evgeniy Polyakov
2007-09-23 17:55 ` Steve Wise
2007-09-23 18:18 ` jamal
2007-09-24 6:30 ` Ben Greear
2007-09-24 13:54 ` Steve Wise
2007-09-24 14:39 ` Ben Greear
2007-09-24 15:00 ` Steve Wise
2007-09-24 15:37 ` Ben Greear
2007-09-24 18:02 ` Rick Jones
2007-09-24 18:22 ` Ben Greear
2007-10-08 21:43 ` Steve Wise
2007-10-08 21:57 ` Ben Greear
2007-10-08 22:22 ` David Miller
2007-10-08 22:46 ` Steve Wise [this message]
2007-10-08 22:54 ` David Miller
2007-09-24 15:42 ` Robert Olsson
2007-09-24 17:40 ` David Miller
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=470AB342.1030209@opengridcomputing.com \
--to=swise@opengridcomputing.com \
--cc=Robert.Olsson@data.slu.se \
--cc=davem@davemloft.net \
--cc=greearb@candelatech.com \
--cc=hadi@cyberus.ca \
--cc=johnpol@2ka.mipt.ru \
--cc=netdev@vger.kernel.org \
--cc=rick.jones2@hp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.