From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 22 Mar 2010 20:49:39 -0700 (PDT) Message-Id: <20100322.204939.146100390.davem@davemloft.net> From: David Miller In-Reply-To: <4BA823D7.4010106@redhat.com> References: <20100322082059.4967.63492.sendpatchset@localhost.localdomain> <1269297081.3552.19.camel@calx> <4BA823D7.4010106@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [Bridge] [RFC Patch 1/3] netpoll: add generic support for bridge and bonding devices List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: amwang@redhat.com Cc: fubar@us.ibm.com, nhorman@tuxdriver.com, netdev@vger.kernel.org, mpm@selenic.com, bridge@lists.linux-foundation.org, linux-kernel@vger.kernel.org, jmoyer@redhat.com, gospo@redhat.com, bonding-devel@lists.sourceforge.net From: Cong Wang Date: Tue, 23 Mar 2010 10:13:43 +0800 > Matt Mackall wrote: >> Seems like a lot of interface for something to be used by only a >> couple >> core drivers. Hopefully Dave has an opinion here. >> > > Yeah, I worry about this too, maybe we can group those methods > for netpoll together into another struct, and just put a pointer > here? This looks like it's tackled at the wrong layer, to be honest. Teaching all of these layers about eachother's states is going to end up being a nightmare in the end. All of this "where is the npinfo" business can be handled generically in net/core/dev.c I think, with none of these callbacks. For example, something like "if dev lacks ->npinfo, check it's master". Another thing, I wouldn't iterate over all devices, like I see in the bonding poll controller method. Just whichever one supports netpoll you see first, use it and exit immediately. Don't send it to every single port, I can't see how that might be desirable or useful.