tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Lockless IP input queue, the pktqueue interface



On 27/05/2014 12:52 PM, Mindaugas Rasiukevicius wrote:
Hello,

As we are trying to bring more parallelism in our network stack, I would
like to make IPv4 and IPv6 input queues lockless.  This is implemented by
replacing struct ifqueue and macros around it with a pktqueue interface.
This interface also abstracts and handles network ISR scheduling and that
will allow us to easily add receiver-side packet steering later.

http://www.netbsd.org/~rmind/ip_pktq.diff

The patch makes the following changes:
- Implements pktqueue interface (see pktqueue.{c,h} files).
- Replaces ipintrq and ip6intrq with the pktqueue mechanism.
- Eliminates kernel-lock from ipintr() and ip6intr().
- Some preparation work to push softnet_lock out of ipintr().


Some general feedback...

push the struct into the .h file, maybe create two .h files, one that is exposed and one that is internal
use enums rather than #define's for things like the counters
if percpu_alloc returns NULL (and it can), will percpu_free panic or will the kernel panic before then?



Home | Main Index | Thread Index | Old Index