From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: Throughput test for kernelspace module vs. userspace daemon with strange results Date: Fri, 11 Apr 2008 15:16:53 +0200 Message-ID: <47FF64C5.9000708@trash.net> References: <47FF613C.4010701@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Thomas Mader , Netfilter Development Mailinglist To: Jan Engelhardt Return-path: Received: from stinky.trash.net ([213.144.137.162]:54249 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751791AbYDKNQ6 (ORCPT ); Fri, 11 Apr 2008 09:16:58 -0400 In-Reply-To: Sender: netfilter-devel-owner@vger.kernel.org List-ID: Jan Engelhardt wrote: > On Friday 2008-04-11 15:01, Thomas Mader wrote: >> I thought about explanations for this but I don't come to reasonable >> explanations for this behaviour. Shouldn't the kernelspace module be faster? >> Why is it slower? > > You are using a raw socket in userspace, which effectively > bypasses Netfilter. > To make a meaningful test of it, the PF_RAW code would need > an NF_HOOK into iptables to make a more accurate comparison I think. Packets sockets bypass netfilter, raw sockets don't. I have no explanation for the values you're seeing though.