From: Gianni Tedesco <gianni@ecsc.co.uk>
To: Mihnea Balta <dark_lkml@mymail.ro>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kernel hooks just to get rid of copy_[to/from]_user() and syscall overhead?
Date: 10 Jan 2003 15:31:06 +0000 [thread overview]
Message-ID: <1042212666.21822.32.camel@lemsip> (raw)
In-Reply-To: <200301101645.39535.dark_lkml@mymail.ro>
[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]
On Fri, 2003-01-10 at 14:45, Mihnea Balta wrote:
> Hi,
>
> I have to implement a system which grabs udp packets off a gigabit connection,
> take some basic action based on what they contain, repack their data with a
> custom protocol header and send them through a gigabit ethernet interface on
> broadcast.
>
> I know how to do this in userspace, but I need to know if doing everyting in
> the kernel would show a considerable speed improvement due to removing
> syscall and memory copy overhead. The system will be quite stressed, having
> to deal with around 15-20000 packets/second.
mmap() packet socket interface eliminates the need for system calls when
traffic is coming in at a high rate. The kernel -> user copy is also
eliminated, but its just replaced with a kernel -> kernel copy :P
You could perhaps also use linux socket filters to minimize the number
of packets you need to evaluate...
Check out this sample code: http://www.scaramanga.co.uk/code-fu/lincap.c
HTH
--
// Gianni Tedesco (gianni at scaramanga dot co dot uk)
lynx --source www.scaramanga.co.uk/gianni-at-ecsc.asc | gpg --import
8646BE7D: 6D9F 2287 870E A2C9 8F60 3A3C 91B5 7669 8646 BE7D
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2003-01-10 15:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-10 14:45 Kernel hooks just to get rid of copy_[to/from]_user() and syscall overhead? Mihnea Balta
2003-01-10 15:04 ` Richard B. Johnson
2003-01-10 15:31 ` Gianni Tedesco [this message]
2003-01-13 8:37 ` Mihnea Balta
2003-01-14 11:47 ` Mihnea Balta
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=1042212666.21822.32.camel@lemsip \
--to=gianni@ecsc.co.uk \
--cc=dark_lkml@mymail.ro \
--cc=linux-kernel@vger.kernel.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