[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140304.162329.504474868666088316.davem@davemloft.net>
Date: Tue, 04 Mar 2014 16:23:29 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: anton@...ba.org, edumazet@...gle.com, gustavold@...ux.vnet.ibm.com,
netdev@...r.kernel.org
Subject: Re: [PATCH] net: unix socket code abuses csum_partial
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Tue, 04 Mar 2014 10:50:53 -0800
> On Tue, 2014-03-04 at 13:41 -0500, David Miller wrote:
>
>> Alternatively you could just make unix_hash_fold() use csum_fold(),
>> right?
>>
>> static inline unsigned int unix_hash_fold(__wsum n)
>> {
>> unsigned int hash = (__force unsigned int) csum_fold(n);
>>
>> hash ^= hash>>8;
>> return hash&(UNIX_HASH_SIZE-1);
>> }
>
> Or simply use full_name_hash()
I would prefer not, because this would be a performance regression
on platforms other than x86 and ARM, because only they implement
the optimized load_unaligned_zeropad().
Other architectures would end up with a byte-by-byte hash computation.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists