From: Sepherosa Ziehau Date: Thu, 2 May 2013 09:19:12 +0000 (+0800) Subject: toeplitz: Return raw hash X-Git-Tag: v3.7.0~1186 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/a3878651cd15c19d3444c18fcb7a6cf6933ad688 toeplitz: Return raw hash Currently only 16 bits are valid, since the key is seeded with 2 bytes. --- diff --git a/sys/net/toeplitz2.h b/sys/net/toeplitz2.h index 3f53c1fda6..213c862766 100644 --- a/sys/net/toeplitz2.h +++ b/sys/net/toeplitz2.h @@ -39,10 +39,6 @@ #error "kernel only header file" #endif -#ifndef _SYS_SYSTM_H_ -#include -#endif - #define TOEPLITZ_KEYSEED_CNT 2 extern uint32_t toeplitz_cache[TOEPLITZ_KEYSEED_CNT][256]; @@ -91,7 +87,7 @@ toeplitz_rawhash_addr(in_addr_t _faddr, in_addr_t _laddr) static __inline int toeplitz_hash(uint32_t _rawhash) { - return (_rawhash & ncpus2_mask); + return (_rawhash & 0xffff); } #endif /* !_NET_TOEPLITZ2_H_ */