Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752789AbbBMQIk (ORCPT ); Fri, 13 Feb 2015 11:08:40 -0500 Received: from mail-wg0-f53.google.com ([74.125.82.53]:33472 "EHLO mail-wg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751839AbbBMQIj (ORCPT ); Fri, 13 Feb 2015 11:08:39 -0500 Message-ID: <54DE2174.6040001@gmail.com> Date: Fri, 13 Feb 2015 17:08:20 +0100 From: Imre Palik User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: David Miller CC: bridge@lists.linux-foundation.org, stephen@networkplumber.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, imrep@amazon.de, aliguori@amazon.com Subject: Re: [PATCH] bridge: make it possible for packets to traverse the bridge withour hitting netfilter References: <1423560744-19011-1-git-send-email-imrep.amz@gmail.com> <20150211.142936.951620487173949333.davem@davemloft.net> In-Reply-To: <20150211.142936.951620487173949333.davem@davemloft.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2018 Lines: 39 On 02/11/15 23:29, David Miller wrote: > From: Imre Palik > Date: Tue, 10 Feb 2015 10:32:24 +0100 > >> From: "Palik, Imre" >> >> 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 both on a per bridge basis, >> or for the whole bridging subsystem. In the case interesting to us, this can >> lead to more than 10% speedup compared to the case when only bridge-iptables >> are disabled. >> >> Cc: Anthony Liguori >> Signed-off-by: Imre Palik > > Sorry, no. > > If I apply this, someone is going to try to submit a patch for every > damn protocol layer to add a stupid hack like this. Actually this is one of those patches. There is already a "stupid hack like this" for iptables and arptables. (Implemented before git history, and giving me 10% speedup. Many thanks, whoever did it.) I also searched various LKML archives, and it seems the existing "stupid hacks" for iptables and arptables haven't resulted in any related patch submission in the last ten years. (Or my google-fu is weak.) Moreover, I cannot imagine any other reasonable on/off switch for bridge-netfilter than these three. Of course, my imagination might be lacking there. > Makw NF_HOOK() faster instead. As far as I see, flexibility implies trashing the cache/TLB. So it is impossible to have flexibility and performance at the same time. (Except possibly with self modifying code, but that has its own set of problems.) -- 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/