lkml.org 
[lkml]   [2010]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] netpoll: allow execution of multiple rx_hooks per interface
From
Date
On Fri, 2010-01-08 at 01:20 +0100, Daniel Borkmann wrote:
> Daniel Borkmann wrote:
> > David Miller wrote:
> >> From: Matt Mackall <mpm@selenic.com>
> >> Date: Wed, 06 Jan 2010 21:54:05 -0600
> >>
> >>> Please inline patches so they can be reviewed easily in reply.
> >>>
> >>>
> >>> - struct netpoll *np = npi->rx_np;
> >>> + struct netpoll **np = &npi->rx_np;
> >>>
> >>> - if (!np)
> >>> + if (!(*np))
> >>>
> >>> This makes everything horrible. Can you avoid the double indirection?
> >>> Using a list head might be a good answer.
> >>>
> >> Agreed on all counts.
> >>
> >
> > Agreed on the double indirection, I'll fix it.
> >
> > I've already considered the list_head structure, but then I was the opinion
> > that a double linked list might not be necessary for this, so I did it that
> > way ... (compare: kernel notifier by Alan Cox). If you insist on that I'll
> > fix it of course ;)
>
> So, here's the list head implementation. Tested on both of my machines with several
> rx_hook clients.

Looks pretty good. Dave?

Acked-by: Matt Mackall <mpm@selenic.com>

--
http://selenic.com : development and support for Mercurial and Linux




\
 
 \ /
  Last update: 2010-01-12 00:25    [W:0.056 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site