Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755205AbbGPM3P (ORCPT ); Thu, 16 Jul 2015 08:29:15 -0400 Received: from www62.your-server.de ([213.133.104.62]:41567 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754553AbbGPM3L (ORCPT ); Thu, 16 Jul 2015 08:29:11 -0400 Message-ID: <55A7A380.4000407@iogearbox.net> Date: Thu, 16 Jul 2015 14:28:48 +0200 From: Daniel Borkmann User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Denys Vlasenko CC: Thomas Graf , Alexander Duyck , Jozsef Kadlecsik , Herbert Xu , linux-kernel@vger.kernel.org Subject: Re: [PATCH] jhash: Deinline jhash, jhash2 and __jhash_nwords References: <1437040973-31531-1-git-send-email-dvlasenk@redhat.com> <20150716104146.GA22603@pox.localdomain> <55A7A044.1040806@redhat.com> In-Reply-To: <55A7A044.1040806@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1348 Lines: 31 On 07/16/2015 02:15 PM, Denys Vlasenko wrote: > On 07/16/2015 12:41 PM, Thomas Graf wrote: >> On 07/16/15 at 12:02pm, Denys Vlasenko wrote: >>> +/* jhash - hash an arbitrary key >>> + * @k: sequence of bytes as key >>> + * @length: the length of the key >>> + * @initval: the previous hash, or an arbitray value >>> + * >>> + * The generic version, hashes an arbitrary sequence of bytes. >>> + * No alignment or length assumptions are made about the input key. >>> + * >>> + * Returns the hash value of the key. The result depends on endianness. >>> + */ >>> +u32 jhash(const void *key, u32 length, u32 initval) >> >> Shouldn't these live in lib/jhash.c or something? Otherwise >> everyone needs to depend on CONFIG_RHASHTABLE > > There is no CONFIG_RHASHTABLE, rhashtable.c is compiled unconditionally. > > I will send an alternative patch, which creates jhash.c; > apply whichever version you like most. Please also Cc netdev as networking subsys is one of the main users of jhash in various critical paths. Did you run e.g. some *_RR work load benchmarks as well to make sure there's no regression? -- 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/