lkml.org 
[lkml]   [1999]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Fw: Linux 2.0/2.1/2.2 -- Anyway to avoid different binaries??
On Tue, Feb 09, 1999 at 02:37:46AM +0100, Ted Lemon wrote:
>
> > Linux 2.2 provides a link layer independent interface to packet sockets
> > (using PF_PACKET, SOCK_DGRAM - see packet.4 in ftp.muc.de:/people/ak/netman*)
>
> > It is probably better to not use LPF currently, because the version in
> > 2.2.1 is buggy. For DHCP's need user space filtering should be fast
> > enough anyways (remember that you can bind on a link layer protocol for
> > packet sockets)
>
> This feature has been present since Linux version 1. The reason we
> didn't use it from the start is because your statement, "For DHCP's
> need user space filtering should be fast enough" is hopelessly
> optimistic. Whether or not user space filtering is fast enough
> depends on how many packets the machine on which the DHCP server is
> running receives, not on the usual packet rate the DHCP protocol
> requires.
>
> If you run just the DHCP server on a machine, on a relatively
> broadcast-quiet network, then sure, the overhead is limited. If you
> want to run the DHCP service from a busy NFS server, the kernel's
> going to copy every single NFS mobygram into user space for the DHCP
> server to examine. Here, the overhead is somewhat horrifying. It
> might still work, but nobody could ever claim that it'd be a sensible
> way to go.

You don't need to copy all of the packet, only as much of the header
that you want to examine (although the current linux libbpf wrapper always
copies the whole packet, but this is just a library bug @).

Fixes for LPF are already done, they just have not been merged yet (I
expect them not in 2.2.2, but in 2.2.3-5 time frame)

-Andi

--
This is like TV. I don't like TV.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.059 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site