From: Jamie Lokier <lk@tantalophile.demon.co.uk>
To: Dan Kegel <dank@kegel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Zach Brown <zab@zabbo.net>
Subject: Re: is CONFIG_PACKET_MMAP always a win?
Date: Fri, 22 Feb 2002 18:09:57 +0000 [thread overview]
Message-ID: <20020222180957.A16796@kushida.apsleyroad.org> (raw)
In-Reply-To: <3C75A418.2C848B3F@kegel.com>
In-Reply-To: <3C75A418.2C848B3F@kegel.com>; from dank@kegel.com on Thu, Feb 21, 2002 at 05:51:20PM -0800
Dan Kegel wrote:
> c) enable CONFIG_PACKET_MMAP, use PACKET_RX_RING, and read packets from an mmap'd ring buffer
> Overhead: kernel does a full memcpy of the packet body to get it
> into the ring buffer, and my program does another to get it out.
I had a look at this about a year ago, and it seems there is no method
provided to read the packets without copying them, if you need them in
user space.
Probably the fastest way to process packets in user space is to use a
special protocol handler of your own that mmaps the area where packets
are already DMAd from the driver. I have been known to suggest simply
mapping all 1GB of low kernel memory into user space for this :-) I
haven't tried this, or writing the protocol handler, though.
cheers,
-- Jamie
next prev parent reply other threads:[~2002-02-22 18:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-22 1:51 is CONFIG_PACKET_MMAP always a win? Dan Kegel
2002-02-22 2:33 ` Alan Cox
2002-02-22 5:59 ` David S. Miller
2002-02-22 6:45 ` Ben Greear
2002-02-22 8:37 ` Gianni Tedesco
2002-02-22 7:04 ` Dan Kegel
2002-02-22 14:04 ` Maciej W. Rozycki
2002-02-22 18:09 ` Jamie Lokier [this message]
2002-02-22 18:40 ` Alan Cox
2002-02-22 19:04 ` Jamie Lokier
2002-02-22 19:57 ` Alan Cox
2002-02-22 21:44 ` Mike Fedyk
2002-02-23 0:24 ` Alan Cox
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=20020222180957.A16796@kushida.apsleyroad.org \
--to=lk@tantalophile.demon.co.uk \
--cc=dank@kegel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zab@zabbo.net \
/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