From owner-freebsd-net@FreeBSD.ORG Thu Aug 29 17:40:42 2013 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ECC1C8BA; Thu, 29 Aug 2013 17:40:41 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-la0-x22a.google.com (mail-la0-x22a.google.com [IPv6:2a00:1450:4010:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A38822B51; Thu, 29 Aug 2013 17:40:40 +0000 (UTC) Received: by mail-la0-f42.google.com with SMTP id ep20so665043lab.1 for ; Thu, 29 Aug 2013 10:40:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=+QtmQRstoe0BYelCPkOV3t6KkzGns7QM4t+LglDOmmE=; b=aGsDbxYE4esUnxSRJ91o5B02qW9oDJydAbLQhRT4wuyy6DxoeTc5h00mgD3KwS0KLG oHtHywrJev7pe/iTl++bqJB9WzvyY0zsl4yodjVmagcHafXmJo31w4vbJSfMRubvMpCf kjBvXY1oQhfXY4HLqj119r4qxF65wxRGpEtK9Rv5nODck8e83Y8ABre8+P1t5ZJhSCLB b5yIu3pJItZOvY7MDFQOvQ+9xSvKQj4IT83qWUTqlrlLiT9v2Oz9XBPrhYjckccl9qPC yESXQd2H60hJMYH1awwnNEJ2x7HXY5R9Ya3rWvcGlAByLoZZ7oPpZaLyM5r8qaoPpODs uX4A== MIME-Version: 1.0 X-Received: by 10.152.170.166 with SMTP id an6mr3818549lac.20.1377798038395; Thu, 29 Aug 2013 10:40:38 -0700 (PDT) Sender: rizzo.unipi@gmail.com Received: by 10.114.200.165 with HTTP; Thu, 29 Aug 2013 10:40:38 -0700 (PDT) In-Reply-To: References: <521BBD21.4070304@freebsd.org> Date: Thu, 29 Aug 2013 19:40:38 +0200 X-Google-Sender-Auth: AoImMjnmcbj2urmbr8Z8qccl46Q Message-ID: Subject: Re: Flow ID, LACP, and igb From: Luigi Rizzo To: Alan Somers Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Jack F Vogel , "Justin T. Gibbs" , Andre Oppermann , "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 17:40:42 -0000 On Thu, Aug 29, 2013 at 1:42 AM, Alan Somers wrote: > On Mon, Aug 26, 2013 at 2:40 PM, Andre Oppermann > wrote: > > > On 26.08.2013 19:18, Justin T. Gibbs wrote: > > > ... > > >> Are there other checksums we should be looking at in addition to FNV? > >> > > > > siphash24() is fast, keyed and strong. > > > I benchmarked hash32 (the existing hash function) vs fnv_hash using both > TCP and UDP, with 1500 and 9000 byte MTUs. At 10Gbps, I couldn't measure > any difference in either throughput or cpu utilization. Given that > siphash24 is definitely slower than hash32, there's no way that I'll find > with these large MTUs the packet rate is too low to see the difference between the various functions. Just as a data point, the jenkins hash used in the netmap code takes at most 10-15ns (with data in cache) on the i7-2600 CPUs i was using in my tests. I think the way to tell which hash is faster is to run the function in a tight loop, rather than relying on input traffic. Then of course there are cache misses that impact heavily the cost of the function, but that is an orthogonal issues that exists for all hashes. cheers luigi