X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_hash%2Frte_fbk_hash.h;h=93160b2584459fab64a30f8ca9c98b0545d5cf75;hb=b6df9fc8715f9a925136006b18fdd65f9c621757;hp=2d16046b66c7a4ce9a3776843fb8af7bc98b5b52;hpb=af75078fece3615088e561357c1e97603e43a5fe;p=dpdk.git diff --git a/lib/librte_hash/rte_fbk_hash.h b/lib/librte_hash/rte_fbk_hash.h index 2d16046b66..93160b2584 100644 --- a/lib/librte_hash/rte_fbk_hash.h +++ b/lib/librte_hash/rte_fbk_hash.h @@ -1,7 +1,7 @@ /*- * BSD LICENSE * - * Copyright(c) 2010-2012 Intel Corporation. All rights reserved. + * Copyright(c) 2010-2013 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,7 +30,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * version: DPDK.L.1.2.3-3 */ #ifndef _RTE_FBK_HASH_H_ @@ -49,7 +48,6 @@ #include #include #include -#include #ifdef __cplusplus extern "C" { @@ -58,8 +56,14 @@ extern "C" { #include #ifndef RTE_FBK_HASH_FUNC_DEFAULT +#ifdef RTE_MACHINE_CPUFLAG_SSE4_2 +#include /** Default four-byte key hash function if none is specified. */ #define RTE_FBK_HASH_FUNC_DEFAULT rte_hash_crc_4byte +#else +#include +#define RTE_FBK_HASH_FUNC_DEFAULT rte_jhash_1word +#endif #endif #ifndef RTE_FBK_HASH_INIT_VAL_DEFAULT @@ -97,7 +101,7 @@ union rte_fbk_hash_entry { uint16_t value; /**< Value returned by lookup. */ uint32_t key; /**< Key used to find value. */ } entry; /**< For accessing each entry part. */ -} ; +}; @@ -179,7 +183,7 @@ rte_fbk_hash_add_key(struct rte_fbk_hash_table *ht, } } - return -ENOSPC; /* No space in bucket. */ + return -ENOSPC; /* No space in bucket. */ } /**