Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752884Ab0AKXV4 (ORCPT ); Mon, 11 Jan 2010 18:21:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752367Ab0AKXVy (ORCPT ); Mon, 11 Jan 2010 18:21:54 -0500 Received: from waste.org ([173.11.57.241]:34615 "EHLO waste.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751853Ab0AKXVx (ORCPT ); Mon, 11 Jan 2010 18:21:53 -0500 Subject: Re: [PATCH] netpoll: allow execution of multiple rx_hooks per interface From: Matt Mackall To: Daniel Borkmann Cc: David Miller , linux-kernel@vger.kernel.org, jmoyer@redhat.com, netdev@vger.kernel.org, netdev@oss.sgi.com In-Reply-To: <4B467A4D.9070708@gmail.com> References: <4B44F895.9080205@gmail.com> <1262836445.29868.227.camel@calx> <20100107.010201.51693251.davem@davemloft.net> <4B4630C0.6090206@gmail.com> <4B467A4D.9070708@gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Mon, 11 Jan 2010 17:21:48 -0600 Message-ID: <1263252108.29868.4774.camel@calx> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1420 Lines: 44 On Fri, 2010-01-08 at 01:20 +0100, Daniel Borkmann wrote: > Daniel Borkmann wrote: > > David Miller wrote: > >> From: Matt Mackall > >> 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 -- http://selenic.com : development and support for Mercurial and Linux -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/