From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [RFC patch net-next-2.6] net: allow multiple rx_handler registration Date: Thu, 30 Jun 2011 09:27:12 -0700 Message-ID: <20110630092712.17eb292f@nehalam.ftrdhcpuser.net> References: <1309447009-8898-1-git-send-email-jpirko@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, davem@davemloft.net, kaber@trash.net, fubar@us.ibm.com, eric.dumazet@gmail.com, nicolas.2p.debian@gmail.com, andy@greyhouse.net To: Jiri Pirko Return-path: Received: from mail.vyatta.com ([76.74.103.46]:47633 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752402Ab1F3Q1Q (ORCPT ); Thu, 30 Jun 2011 12:27:16 -0400 In-Reply-To: <1309447009-8898-1-git-send-email-jpirko@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 30 Jun 2011 17:16:49 +0200 Jiri Pirko wrote: > For some net topos it is necessary to have multiple "soft-net-devices" > hooked on one netdev. For example very common is to have > eth<->(br+vlan). Vlan is not using rh_handler (yet) but also for example > macvlan would be useful to have hooked on same netdev as br. > > This patch introduces rx_handler list. size struct net_device stays > intact. Measured performance regression on eth-br topo is ~1% (on received > pkts generated by pktgen) and on eth-bond topo it is ~0.25% > > On br I think that the performance can be brought back maybe by using per-cpu > variables to store port in rx_path (I must check this) > > Please comment. > > Signed-off-by: Jiri Pirko I am ok with the infrastructure, but why should Vlan use rh_handle. It is wrong to allow macvlan and bridge to share same device. Right now the code blocks users from doing lots of stupid things.