netdev
[Top] [All Lists]

Re: More on user-space filtering

To: Multiple recipients of list NETFILTER <netfilter@xxxxxxxxxxxxxxxx>
Subject: Re: More on user-space filtering
From: Rusty Russell <rusty@xxxxxxxxxxxxxxxx>
Date: Thu, 23 Dec 1999 21:21:27 +1100
Cc: netdev@xxxxxxxxxxx
In-reply-to: Your message of "Wed, 22 Dec 1999 10:57:35 +1100." <14432.2404.915004.861739@pelerin.serpentine.com>
Sender: owner-netdev@xxxxxxxxxxx
In message <14432.2404.915004.861739@xxxxxxxxxxxxxxxxxxxxxx> you write:
> However, I would like to be able to read a series of packets from
> userspace without having to make a decision about each one before I
> can see the next.  Trying the poll route was the easiest.  There seem
> to be two other obvious options in front of me:

Hi Bryan,

Please come up with a better netfilter dev; the current one is simple
as all hell.  BTW, num packets queued is currently hard limited in
netfilter.c.

A perfect netfilter dev would have the following properties:

1) Minimum number of system calls: averaging << 1 syscall per packet
   would rock.

2) Handle out-of-order stuff.  Please don't hand out pointers to
   userspace as cookies unless you have to, unless you verify them
   somehow when they get back.  Even though only root can use
   netfilter_dev right now, I don't want a coding bug to crash my
   kernel please!

Look at Alexey's memmapped sockpacket code for inspiration, although
note that we have the skb itself, not a copy, and must handle
modifications.

Rusty.
--
Hacking time.

<Prev in Thread] Current Thread [Next in Thread>
  • Re: More on user-space filtering, Rusty Russell <=