Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932834Ab0AGDyT (ORCPT ); Wed, 6 Jan 2010 22:54:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756602Ab0AGDyT (ORCPT ); Wed, 6 Jan 2010 22:54:19 -0500 Received: from waste.org ([173.11.57.241]:46176 "EHLO waste.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756594Ab0AGDyS (ORCPT ); Wed, 6 Jan 2010 22:54:18 -0500 Subject: Re: [PATCH] netpoll: allow execution of multiple rx_hooks per interface From: Matt Mackall To: Daniel Borkmann Cc: linux-kernel@vger.kernel.org, Jeff Moyer , netdev@vger.kernel.org, netdev@oss.sgi.com, David Miller In-Reply-To: <4B44F895.9080205@gmail.com> References: <4B44F895.9080205@gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 06 Jan 2010 21:54:05 -0600 Message-ID: <1262836445.29868.227.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: 1233 Lines: 35 On Wed, 2010-01-06 at 21:54 +0100, Daniel Borkmann wrote: > Hi, > > this patch allows the registration and _execution_ of multiple netpoll > rx_hooks per interface. Currently, it is possible to register multiple > netpoll structures to one interface, _but_ only one single rx_hook (from > the netpoll struct that has been registered last) can be executed, which > was an oversight in the implementation [1]. > So, this patch fixes it. I've sucessfully tested it within 2.6.32.2 with > the registration of multiple rx_hook clients for several times. I'd > appreciate comments / feedback. (grumbles about cc:) 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. -- 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/