From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 23 Feb 2015 17:06:19 +0100 From: Florian Westphal Message-ID: <20150223160619.GF24297@breakpoint.cc> References: <1424705163-13428-1-git-send-email-imrep.amz@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424705163-13428-1-git-send-email-imrep.amz@gmail.com> Subject: Re: [Bridge] [RFC PATCH v2] bridge: make it possible for packets to traverse the bridge without hitting netfilter List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Imre Palik Cc: "Palik, Imre" , netdev@vger.kernel.org, bridge@lists.linux-foundation.org, fw@strlen.de, linux-kernel@vger.kernel.org, Anthony Liguori , "David S. Miller" Imre Palik wrote: > The netfilter code is made with flexibility instead of performance in mind. > So when all we want is to pass packets between different interfaces, the > performance penalty of hitting netfilter code can be considerable, even when > all the firewalling is disabled for the bridge. > > This change makes it possible to disable netfilter on a per bridge basis. > In the case interesting to us, this can lead to more than 15% speedup > compared to the case when only bridge-iptables is disabled. I wonder what the speed difference is between no-rules (i.e., we hit jump label in NF_HOOK), one single (ebtables) accept-all rule, and this patch, for the call_nf==false case. I guess your 15% speedup figure is coming from ebtables' O(n) rule evaluation overhead? If yes, how many rules are we talking about? Iff thats true, then the 'better' (I know, it won't help you) solution would be to use nftables bridgeport-based verdict maps... If thats still too much overhead, then we clearly need to do *something*... Thanks, Florian From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752920AbbBWQG3 (ORCPT ); Mon, 23 Feb 2015 11:06:29 -0500 Received: from Chamillionaire.breakpoint.cc ([80.244.247.6]:37244 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752351AbbBWQG1 (ORCPT ); Mon, 23 Feb 2015 11:06:27 -0500 Date: Mon, 23 Feb 2015 17:06:19 +0100 From: Florian Westphal To: Imre Palik Cc: bridge@lists.linux-foundation.org, Stephen Hemminger , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, fw@strlen.de, "Palik, Imre" , Anthony Liguori Subject: Re: [RFC PATCH v2] bridge: make it possible for packets to traverse the bridge without hitting netfilter Message-ID: <20150223160619.GF24297@breakpoint.cc> References: <1424705163-13428-1-git-send-email-imrep.amz@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424705163-13428-1-git-send-email-imrep.amz@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Imre Palik wrote: > The netfilter code is made with flexibility instead of performance in mind. > So when all we want is to pass packets between different interfaces, the > performance penalty of hitting netfilter code can be considerable, even when > all the firewalling is disabled for the bridge. > > This change makes it possible to disable netfilter on a per bridge basis. > In the case interesting to us, this can lead to more than 15% speedup > compared to the case when only bridge-iptables is disabled. I wonder what the speed difference is between no-rules (i.e., we hit jump label in NF_HOOK), one single (ebtables) accept-all rule, and this patch, for the call_nf==false case. I guess your 15% speedup figure is coming from ebtables' O(n) rule evaluation overhead? If yes, how many rules are we talking about? Iff thats true, then the 'better' (I know, it won't help you) solution would be to use nftables bridgeport-based verdict maps... If thats still too much overhead, then we clearly need to do *something*... Thanks, Florian From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Westphal Subject: Re: [RFC PATCH v2] bridge: make it possible for packets to traverse the bridge without hitting netfilter Date: Mon, 23 Feb 2015 17:06:19 +0100 Message-ID: <20150223160619.GF24297@breakpoint.cc> References: <1424705163-13428-1-git-send-email-imrep.amz@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Palik, Imre" , netdev@vger.kernel.org, bridge@lists.linux-foundation.org, fw@strlen.de, linux-kernel@vger.kernel.org, Anthony Liguori , "David S. Miller" To: Imre Palik Return-path: Content-Disposition: inline In-Reply-To: <1424705163-13428-1-git-send-email-imrep.amz@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bridge-bounces@lists.linux-foundation.org Errors-To: bridge-bounces@lists.linux-foundation.org List-Id: netdev.vger.kernel.org Imre Palik wrote: > The netfilter code is made with flexibility instead of performance in mind. > So when all we want is to pass packets between different interfaces, the > performance penalty of hitting netfilter code can be considerable, even when > all the firewalling is disabled for the bridge. > > This change makes it possible to disable netfilter on a per bridge basis. > In the case interesting to us, this can lead to more than 15% speedup > compared to the case when only bridge-iptables is disabled. I wonder what the speed difference is between no-rules (i.e., we hit jump label in NF_HOOK), one single (ebtables) accept-all rule, and this patch, for the call_nf==false case. I guess your 15% speedup figure is coming from ebtables' O(n) rule evaluation overhead? If yes, how many rules are we talking about? Iff thats true, then the 'better' (I know, it won't help you) solution would be to use nftables bridgeport-based verdict maps... If thats still too much overhead, then we clearly need to do *something*... Thanks, Florian