From owner-svn-src-head@FreeBSD.ORG Wed Oct 15 13:10:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F66D29F; Wed, 15 Oct 2014 13:10:32 +0000 (UTC) Received: from mail-ie0-x232.google.com (mail-ie0-x232.google.com [IPv6:2607:f8b0:4001:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13F235FA; Wed, 15 Oct 2014 13:10:32 +0000 (UTC) Received: by mail-ie0-f178.google.com with SMTP id rl12so1140392iec.37 for ; Wed, 15 Oct 2014 06:10:31 -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:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=IzKo5fCyQgH0hQrIeiYB7V9vw5F5CXQVn7X5fLYvoeA=; b=RKyGjHzFe1nJzW8TyYE5hHji08p5DqaG/3aTVNcFsVmafAgQd5M90xlFhBTw0v9rET KVr9FQ1bAzpgtFoiGsYxYcXS+zWan7OP7kdUgHMdPl4r3dVZwr7W23Mc712jMGkJOcD2 ZsE6hpGP2Gm+kR0MYAAnXHQpzjpV38142syTtJV0ETuQbhR8jhgHxDUEqdx7mp0h69Bg UnMFZTX6cJnlMYex6xZjOyeW25eEnsoAR+p06Ba0e0K3DelnsAKhpnFk0QX06XZqEGQY mu3/sDXeSk/3OtzuO4ScBTZbitTHb24GFzJ3dPUwjYf/XMkN+rVvmOOKi1FK6flUB36p mZpQ== X-Received: by 10.107.130.136 with SMTP id m8mr9385265ioi.8.1413378631484; Wed, 15 Oct 2014 06:10:31 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.29.132 with HTTP; Wed, 15 Oct 2014 06:10:10 -0700 (PDT) In-Reply-To: <86wq81y9fz.fsf@nine.des.no> References: <201410101926.s9AJQRY1049602@svn.freebsd.org> <20141015030455.GC73266@FreeBSD.org> <86wq81y9fz.fsf@nine.des.no> From: Ed Maste Date: Wed, 15 Oct 2014 09:10:10 -0400 X-Google-Sender-Auth: dxIcJPG_GCx-eXWj9P0W6MDY6DI Message-ID: Subject: Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: src-committers , svn-src-all , "George V. Neville-Neil" , Gleb Smirnoff , =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= , svn-src-head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Oct 2014 13:10:32 -0000 On 15 October 2014 05:21, Dag-Erling Sm=C3=B8rgrav wrote: > > That's my fault, and I'm going to change it, because it's illogical. > The function works on aligned arrays of int32s and should take a count, > not a size. I just didn't want to delay the patch even further. The fact that it works only on aligned 32-bit ints is a detail of this implementation and not a requirement of murmur3 though. AFAICT common implementations treat this case as an optimization but handle arbitrarily aligned buffers of arbitrary numbers of bytes, as is the case for other hashes in my quick survey. The reference Jenkins hash looks to be the odd one out here in taking a uint32_t * and a count rather than a char * or void * and a byte length.