* [dpdk-dev] [PATCH 0/3] clean deprecated code in hash library @ 2015-09-04 9:05 Pablo de Lara 2015-09-04 9:05 ` [dpdk-dev] [PATCH 1/3] hash: use max key length as internal macro instead of deprecated one Pablo de Lara ` (3 more replies) 0 siblings, 4 replies; 10+ messages in thread From: Pablo de Lara @ 2015-09-04 9:05 UTC (permalink / raw) To: dev This patchset is to remove all deprecated macros and functions from the hash library, as well as to modify the unit tests and ENIC driver that were using them. Pablo de Lara (3): hash: use max key length as internal macro instead of deprecated one enic: use appropriate key length in hash table hash: remove deprecated functions and macros app/test/test_hash.c | 7 ++++--- app/test/test_hash_functions.c | 4 ++-- app/test/test_hash_perf.c | 2 +- doc/guides/rel_notes/deprecation.rst | 5 ----- doc/guides/rel_notes/release_2_2.rst | 3 +++ drivers/net/enic/enic_clsf.c | 4 ++-- lib/librte_hash/rte_hash.h | 6 ------ lib/librte_hash/rte_jhash.h | 15 ++------------- 8 files changed, 14 insertions(+), 32 deletions(-) -- 2.4.2 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH 1/3] hash: use max key length as internal macro instead of deprecated one 2015-09-04 9:05 [dpdk-dev] [PATCH 0/3] clean deprecated code in hash library Pablo de Lara @ 2015-09-04 9:05 ` Pablo de Lara 2015-09-04 9:05 ` [dpdk-dev] [PATCH 2/3] enic: use appropriate key length in hash table Pablo de Lara ` (2 subsequent siblings) 3 siblings, 0 replies; 10+ messages in thread From: Pablo de Lara @ 2015-09-04 9:05 UTC (permalink / raw) To: dev RTE_HASH_KEY_LENGTH_MAX has been deprecated in DPDK 2.1 and it is going to be removed in 2.2, so the macro is defined internally for the memory allocation of all keys used. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> --- app/test/test_hash.c | 7 ++++--- app/test/test_hash_functions.c | 4 ++-- app/test/test_hash_perf.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/test/test_hash.c b/app/test/test_hash.c index 7f8c0d3..4f2509d 100644 --- a/app/test/test_hash.c +++ b/app/test/test_hash.c @@ -66,6 +66,7 @@ static rte_hash_function hashtest_funcs[] = {rte_jhash, rte_hash_crc}; static uint32_t hashtest_initvals[] = {0}; static uint32_t hashtest_key_lens[] = {0, 2, 4, 5, 6, 7, 8, 10, 11, 15, 16, 21, 31, 32, 33, 63, 64}; +#define MAX_KEYSIZE 64 /******************************************************************************/ #define LOCAL_FBK_HASH_ENTRIES_MAX (1 << 15) @@ -238,7 +239,7 @@ test_crc32_hash_alg_equiv(void) static void run_hash_func_test(rte_hash_function f, uint32_t init_val, uint32_t key_len) { - static uint8_t key[RTE_HASH_KEY_LENGTH_MAX]; + static uint8_t key[MAX_KEYSIZE]; unsigned i; @@ -1100,7 +1101,7 @@ test_hash_creation_with_good_parameters(void) static int test_average_table_utilization(void) { struct rte_hash *handle; - uint8_t simple_key[RTE_HASH_KEY_LENGTH_MAX]; + uint8_t simple_key[MAX_KEYSIZE]; unsigned i, j; unsigned added_keys, average_keys_added = 0; int ret; @@ -1154,7 +1155,7 @@ static int test_hash_iteration(void) { struct rte_hash *handle; unsigned i; - uint8_t keys[NUM_ENTRIES][RTE_HASH_KEY_LENGTH_MAX]; + uint8_t keys[NUM_ENTRIES][MAX_KEYSIZE]; const void *next_key; void *next_data; void *data[NUM_ENTRIES]; diff --git a/app/test/test_hash_functions.c b/app/test/test_hash_functions.c index 8c7cf63..3ad6d80 100644 --- a/app/test/test_hash_functions.c +++ b/app/test/test_hash_functions.c @@ -85,7 +85,7 @@ static uint32_t hash_values_crc[2][10] = {{ * from the array entries is tested. */ #define HASHTEST_ITERATIONS 1000000 - +#define MAX_KEYSIZE 64 static rte_hash_function hashtest_funcs[] = {rte_jhash, rte_hash_crc}; static uint32_t hashtest_initvals[] = {0, 0xdeadbeef}; static uint32_t hashtest_key_lens[] = { @@ -119,7 +119,7 @@ static void run_hash_func_perf_test(uint32_t key_len, uint32_t init_val, rte_hash_function f) { - static uint8_t key[HASHTEST_ITERATIONS][RTE_HASH_KEY_LENGTH_MAX]; + static uint8_t key[HASHTEST_ITERATIONS][MAX_KEYSIZE]; uint64_t ticks, start, end; unsigned i, j; diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c index a87fc80..9d53c14 100644 --- a/app/test/test_hash_perf.c +++ b/app/test/test_hash_perf.c @@ -140,7 +140,7 @@ shuffle_input_keys(unsigned table_index) { unsigned i; uint32_t swap_idx; - uint8_t temp_key[RTE_HASH_KEY_LENGTH_MAX]; + uint8_t temp_key[MAX_KEYSIZE]; hash_sig_t temp_signature; int32_t temp_position; -- 2.4.2 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH 2/3] enic: use appropriate key length in hash table 2015-09-04 9:05 [dpdk-dev] [PATCH 0/3] clean deprecated code in hash library Pablo de Lara 2015-09-04 9:05 ` [dpdk-dev] [PATCH 1/3] hash: use max key length as internal macro instead of deprecated one Pablo de Lara @ 2015-09-04 9:05 ` Pablo de Lara 2015-09-04 10:15 ` Sujith Sankar (ssujith) 2015-09-04 9:05 ` [dpdk-dev] [PATCH 3/3] hash: remove deprecated functions and macros Pablo de Lara 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 0/3] clean deprecated code in hash library Thomas Monjalon 3 siblings, 1 reply; 10+ messages in thread From: Pablo de Lara @ 2015-09-04 9:05 UTC (permalink / raw) To: dev RTE_HASH_KEY_LENGTH_MAX was deprecated, and the hash table actually is hosting bigger keys than that size, so key length has been increased to properly allocate all keys. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> --- drivers/net/enic/enic_clsf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/enic/enic_clsf.c b/drivers/net/enic/enic_clsf.c index 9c2abfb..656b25b 100644 --- a/drivers/net/enic/enic_clsf.c +++ b/drivers/net/enic/enic_clsf.c @@ -214,7 +214,7 @@ int enic_fdir_add_fltr(struct enic *enic, struct rte_eth_fdir_filter *params) enic->fdir.stats.add++; } - pos = rte_hash_add_key(enic->fdir.hash, (void *)key); + pos = rte_hash_add_key(enic->fdir.hash, params); enic->fdir.nodes[pos] = key; return 0; } @@ -244,7 +244,7 @@ int enic_clsf_init(struct enic *enic) struct rte_hash_parameters hash_params = { .name = "enicpmd_clsf_hash", .entries = ENICPMD_CLSF_HASH_ENTRIES, - .key_len = RTE_HASH_KEY_LENGTH_MAX, + .key_len = sizeof(struct rte_eth_fdir_filter), .hash_func = DEFAULT_HASH_FUNC, .hash_func_init_val = 0, .socket_id = SOCKET_0, -- 2.4.2 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH 2/3] enic: use appropriate key length in hash table 2015-09-04 9:05 ` [dpdk-dev] [PATCH 2/3] enic: use appropriate key length in hash table Pablo de Lara @ 2015-09-04 10:15 ` Sujith Sankar (ssujith) 0 siblings, 0 replies; 10+ messages in thread From: Sujith Sankar (ssujith) @ 2015-09-04 10:15 UTC (permalink / raw) To: Pablo de Lara, dev On 04/09/15 2:35 pm, "Pablo de Lara" <pablo.de.lara.guarch@intel.com> wrote: >RTE_HASH_KEY_LENGTH_MAX was deprecated, and the hash table >actually is hosting bigger keys than that size, so key length >has been increased to properly allocate all keys. > >Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> >--- > drivers/net/enic/enic_clsf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/drivers/net/enic/enic_clsf.c b/drivers/net/enic/enic_clsf.c >index 9c2abfb..656b25b 100644 >--- a/drivers/net/enic/enic_clsf.c >+++ b/drivers/net/enic/enic_clsf.c >@@ -214,7 +214,7 @@ int enic_fdir_add_fltr(struct enic *enic, struct >rte_eth_fdir_filter *params) > enic->fdir.stats.add++; > } > >- pos = rte_hash_add_key(enic->fdir.hash, (void *)key); >+ pos = rte_hash_add_key(enic->fdir.hash, params); > enic->fdir.nodes[pos] = key; > return 0; > } >@@ -244,7 +244,7 @@ int enic_clsf_init(struct enic *enic) > struct rte_hash_parameters hash_params = { > .name = "enicpmd_clsf_hash", > .entries = ENICPMD_CLSF_HASH_ENTRIES, >- .key_len = RTE_HASH_KEY_LENGTH_MAX, >+ .key_len = sizeof(struct rte_eth_fdir_filter), > .hash_func = DEFAULT_HASH_FUNC, > .hash_func_init_val = 0, > .socket_id = SOCKET_0, >-- Looks good. Thanks, -Sujith > >2.4.2 > ^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH 3/3] hash: remove deprecated functions and macros 2015-09-04 9:05 [dpdk-dev] [PATCH 0/3] clean deprecated code in hash library Pablo de Lara 2015-09-04 9:05 ` [dpdk-dev] [PATCH 1/3] hash: use max key length as internal macro instead of deprecated one Pablo de Lara 2015-09-04 9:05 ` [dpdk-dev] [PATCH 2/3] enic: use appropriate key length in hash table Pablo de Lara @ 2015-09-04 9:05 ` Pablo de Lara 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 0/3] clean deprecated code in hash library Thomas Monjalon 3 siblings, 0 replies; 10+ messages in thread From: Pablo de Lara @ 2015-09-04 9:05 UTC (permalink / raw) To: dev The function rte_jhash2() was renamed rte_jhash_32b and macros RTE_HASH_KEY_LENGTH_MAX and RTE_HASH_BUCKET_ENTRIES_MAX were tagged as deprecated, so they can be removed in 2.2. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> --- doc/guides/rel_notes/deprecation.rst | 5 ----- doc/guides/rel_notes/release_2_2.rst | 3 +++ lib/librte_hash/rte_hash.h | 6 ------ lib/librte_hash/rte_jhash.h | 15 ++------------- 4 files changed, 5 insertions(+), 24 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 5f6079b..fffad80 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -13,11 +13,6 @@ Deprecation Notices There is no backward compatibility planned from release 2.2. All binaries will need to be rebuilt from release 2.2. -* The Macros RTE_HASH_BUCKET_ENTRIES_MAX and RTE_HASH_KEY_LENGTH_MAX are - deprecated and will be removed with version 2.2. - -* The function rte_jhash2 is deprecated and should be removed. - * The following fields have been deprecated in rte_eth_stats: imissed, ibadcrc, ibadlen, imcasts, fdirmatch, fdirmiss, tx_pause_xon, rx_pause_xon, tx_pause_xoff, rx_pause_xoff diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst index abe57b4..aa44862 100644 --- a/doc/guides/rel_notes/release_2_2.rst +++ b/doc/guides/rel_notes/release_2_2.rst @@ -27,6 +27,9 @@ API Changes * The deprecated ring PMD functions are removed: rte_eth_ring_pair_create() and rte_eth_ring_pair_attach(). +* The function rte_jhash2() is removed. + It was replaced by rte_jhash_32b(). + ABI Changes ----------- diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h index 1cddc07..175c0bb 100644 --- a/lib/librte_hash/rte_hash.h +++ b/lib/librte_hash/rte_hash.h @@ -49,12 +49,6 @@ extern "C" { /** Maximum size of hash table that can be created. */ #define RTE_HASH_ENTRIES_MAX (1 << 30) -/** @deprecated Maximum bucket size that can be created. */ -#define RTE_HASH_BUCKET_ENTRIES_MAX 4 - -/** @deprecated Maximum length of key that can be used. */ -#define RTE_HASH_KEY_LENGTH_MAX 64 - /** Maximum number of characters in hash name.*/ #define RTE_HASH_NAMESIZE 32 diff --git a/lib/librte_hash/rte_jhash.h b/lib/librte_hash/rte_jhash.h index f9a8266..457f225 100644 --- a/lib/librte_hash/rte_jhash.h +++ b/lib/librte_hash/rte_jhash.h @@ -267,10 +267,10 @@ rte_jhash_2hashes(const void *key, uint32_t length, uint32_t *pc, uint32_t *pb) } /** - * Same as rte_jhash2, but takes two seeds and return two uint32_ts. + * Same as rte_jhash_32b, but takes two seeds and return two uint32_ts. * pc and pb must be non-null, and *pc and *pb must both be initialized * with seeds. If you pass in (*pb)=0, the output (*pc) will be - * the same as the return value from rte_jhash2. + * the same as the return value from rte_jhash_32b. * * @param k * Key to calculate hash of. @@ -335,17 +335,6 @@ rte_jhash_32b(const uint32_t *k, uint32_t length, uint32_t initval) } static inline uint32_t -__attribute__ ((deprecated)) -rte_jhash2(const uint32_t *k, uint32_t length, uint32_t initval) -{ - uint32_t initval2 = 0; - - rte_jhash_32b_2hashes(k, length, &initval, &initval2); - - return initval; -} - -static inline uint32_t __rte_jhash_3words(uint32_t a, uint32_t b, uint32_t c, uint32_t initval) { a += RTE_JHASH_GOLDEN_RATIO + initval; -- 2.4.2 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2 0/3] clean deprecated code in hash library 2015-09-04 9:05 [dpdk-dev] [PATCH 0/3] clean deprecated code in hash library Pablo de Lara ` (2 preceding siblings ...) 2015-09-04 9:05 ` [dpdk-dev] [PATCH 3/3] hash: remove deprecated functions and macros Pablo de Lara @ 2015-09-04 13:56 ` Thomas Monjalon 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 1/3] enic: use appropriate key length in hash table Thomas Monjalon ` (3 more replies) 3 siblings, 4 replies; 10+ messages in thread From: Thomas Monjalon @ 2015-09-04 13:56 UTC (permalink / raw) To: pablo.de.lara.guarch; +Cc: dev This patchset removes all deprecated macros and functions from the hash library. Then the DPDK version can be changed to 2.2.0-rc0. Changes in v2: - increment hash library version - merge hash patches - increment DPDK version Pablo de Lara (2): enic: use appropriate key length in hash table hash: remove deprecated function and macros Thomas Monjalon (1): version: 2.2.0-rc0 app/test/test_hash.c | 7 ++++--- app/test/test_hash_functions.c | 4 ++-- app/test/test_hash_perf.c | 2 +- doc/guides/rel_notes/deprecation.rst | 5 ----- doc/guides/rel_notes/release_2_2.rst | 5 ++++- drivers/net/enic/enic_clsf.c | 4 ++-- lib/librte_eal/common/include/rte_version.h | 6 +++--- lib/librte_hash/Makefile | 2 +- lib/librte_hash/rte_hash.h | 6 ------ lib/librte_hash/rte_jhash.h | 15 ++------------- 10 files changed, 19 insertions(+), 37 deletions(-) -- 2.5.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2 1/3] enic: use appropriate key length in hash table 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 0/3] clean deprecated code in hash library Thomas Monjalon @ 2015-09-04 13:56 ` Thomas Monjalon 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 2/3] hash: remove deprecated function and macros Thomas Monjalon ` (2 subsequent siblings) 3 siblings, 0 replies; 10+ messages in thread From: Thomas Monjalon @ 2015-09-04 13:56 UTC (permalink / raw) To: pablo.de.lara.guarch; +Cc: dev From: Pablo de Lara <pablo.de.lara.guarch@intel.com> RTE_HASH_KEY_LENGTH_MAX was deprecated, and the hash table actually is hosting bigger keys than that size, so key length has been increased to properly allocate all keys. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Sujith Sankar <ssujith@cisco.com> --- drivers/net/enic/enic_clsf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/enic/enic_clsf.c b/drivers/net/enic/enic_clsf.c index 9c2abfb..656b25b 100644 --- a/drivers/net/enic/enic_clsf.c +++ b/drivers/net/enic/enic_clsf.c @@ -214,7 +214,7 @@ int enic_fdir_add_fltr(struct enic *enic, struct rte_eth_fdir_filter *params) enic->fdir.stats.add++; } - pos = rte_hash_add_key(enic->fdir.hash, (void *)key); + pos = rte_hash_add_key(enic->fdir.hash, params); enic->fdir.nodes[pos] = key; return 0; } @@ -244,7 +244,7 @@ int enic_clsf_init(struct enic *enic) struct rte_hash_parameters hash_params = { .name = "enicpmd_clsf_hash", .entries = ENICPMD_CLSF_HASH_ENTRIES, - .key_len = RTE_HASH_KEY_LENGTH_MAX, + .key_len = sizeof(struct rte_eth_fdir_filter), .hash_func = DEFAULT_HASH_FUNC, .hash_func_init_val = 0, .socket_id = SOCKET_0, -- 2.5.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2 2/3] hash: remove deprecated function and macros 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 0/3] clean deprecated code in hash library Thomas Monjalon 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 1/3] enic: use appropriate key length in hash table Thomas Monjalon @ 2015-09-04 13:56 ` Thomas Monjalon 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 3/3] version: 2.2.0-rc0 Thomas Monjalon 2015-09-07 13:28 ` [dpdk-dev] [PATCH v2 0/3] clean deprecated code in hash library Thomas Monjalon 3 siblings, 0 replies; 10+ messages in thread From: Thomas Monjalon @ 2015-09-04 13:56 UTC (permalink / raw) To: pablo.de.lara.guarch; +Cc: dev From: Pablo de Lara <pablo.de.lara.guarch@intel.com> The function rte_jhash2() was renamed rte_jhash_32b and macros RTE_HASH_KEY_LENGTH_MAX and RTE_HASH_BUCKET_ENTRIES_MAX were tagged as deprecated, so they can be removed in 2.2. RTE_HASH_KEY_LENGTH is replaced in unit tests by an internal macro for the memory allocation of all keys used. The library version number is incremented. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> --- app/test/test_hash.c | 7 ++++--- app/test/test_hash_functions.c | 4 ++-- app/test/test_hash_perf.c | 2 +- doc/guides/rel_notes/deprecation.rst | 5 ----- doc/guides/rel_notes/release_2_2.rst | 5 ++++- lib/librte_hash/Makefile | 2 +- lib/librte_hash/rte_hash.h | 6 ------ lib/librte_hash/rte_jhash.h | 15 ++------------- 8 files changed, 14 insertions(+), 32 deletions(-) diff --git a/app/test/test_hash.c b/app/test/test_hash.c index 7f8c0d3..4f2509d 100644 --- a/app/test/test_hash.c +++ b/app/test/test_hash.c @@ -66,6 +66,7 @@ static rte_hash_function hashtest_funcs[] = {rte_jhash, rte_hash_crc}; static uint32_t hashtest_initvals[] = {0}; static uint32_t hashtest_key_lens[] = {0, 2, 4, 5, 6, 7, 8, 10, 11, 15, 16, 21, 31, 32, 33, 63, 64}; +#define MAX_KEYSIZE 64 /******************************************************************************/ #define LOCAL_FBK_HASH_ENTRIES_MAX (1 << 15) @@ -238,7 +239,7 @@ test_crc32_hash_alg_equiv(void) static void run_hash_func_test(rte_hash_function f, uint32_t init_val, uint32_t key_len) { - static uint8_t key[RTE_HASH_KEY_LENGTH_MAX]; + static uint8_t key[MAX_KEYSIZE]; unsigned i; @@ -1100,7 +1101,7 @@ test_hash_creation_with_good_parameters(void) static int test_average_table_utilization(void) { struct rte_hash *handle; - uint8_t simple_key[RTE_HASH_KEY_LENGTH_MAX]; + uint8_t simple_key[MAX_KEYSIZE]; unsigned i, j; unsigned added_keys, average_keys_added = 0; int ret; @@ -1154,7 +1155,7 @@ static int test_hash_iteration(void) { struct rte_hash *handle; unsigned i; - uint8_t keys[NUM_ENTRIES][RTE_HASH_KEY_LENGTH_MAX]; + uint8_t keys[NUM_ENTRIES][MAX_KEYSIZE]; const void *next_key; void *next_data; void *data[NUM_ENTRIES]; diff --git a/app/test/test_hash_functions.c b/app/test/test_hash_functions.c index 8c7cf63..3ad6d80 100644 --- a/app/test/test_hash_functions.c +++ b/app/test/test_hash_functions.c @@ -85,7 +85,7 @@ static uint32_t hash_values_crc[2][10] = {{ * from the array entries is tested. */ #define HASHTEST_ITERATIONS 1000000 - +#define MAX_KEYSIZE 64 static rte_hash_function hashtest_funcs[] = {rte_jhash, rte_hash_crc}; static uint32_t hashtest_initvals[] = {0, 0xdeadbeef}; static uint32_t hashtest_key_lens[] = { @@ -119,7 +119,7 @@ static void run_hash_func_perf_test(uint32_t key_len, uint32_t init_val, rte_hash_function f) { - static uint8_t key[HASHTEST_ITERATIONS][RTE_HASH_KEY_LENGTH_MAX]; + static uint8_t key[HASHTEST_ITERATIONS][MAX_KEYSIZE]; uint64_t ticks, start, end; unsigned i, j; diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c index a87fc80..9d53c14 100644 --- a/app/test/test_hash_perf.c +++ b/app/test/test_hash_perf.c @@ -140,7 +140,7 @@ shuffle_input_keys(unsigned table_index) { unsigned i; uint32_t swap_idx; - uint8_t temp_key[RTE_HASH_KEY_LENGTH_MAX]; + uint8_t temp_key[MAX_KEYSIZE]; hash_sig_t temp_signature; int32_t temp_position; diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 5f6079b..fffad80 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -13,11 +13,6 @@ Deprecation Notices There is no backward compatibility planned from release 2.2. All binaries will need to be rebuilt from release 2.2. -* The Macros RTE_HASH_BUCKET_ENTRIES_MAX and RTE_HASH_KEY_LENGTH_MAX are - deprecated and will be removed with version 2.2. - -* The function rte_jhash2 is deprecated and should be removed. - * The following fields have been deprecated in rte_eth_stats: imissed, ibadcrc, ibadlen, imcasts, fdirmatch, fdirmiss, tx_pause_xon, rx_pause_xon, tx_pause_xoff, rx_pause_xoff diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst index abe57b4..682f468 100644 --- a/doc/guides/rel_notes/release_2_2.rst +++ b/doc/guides/rel_notes/release_2_2.rst @@ -21,6 +21,9 @@ API Changes * The deprecated ACL API ipv4vlan is removed. +* The deprecated hash function rte_jhash2() is removed. + It was replaced by rte_jhash_32b(). + * The deprecated KNI functions are removed: rte_kni_create(), rte_kni_get_port_id() and rte_kni_info_get(). @@ -58,7 +61,7 @@ The libraries prepended with a plus sign were incremented in this version. librte_cmdline.so.1 librte_distributor.so.1 + librte_eal.so.2 - librte_hash.so.1 + + librte_hash.so.2 librte_ip_frag.so.1 librte_ivshmem.so.1 librte_jobstats.so.1 diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile index 4bb3848..7902c2b 100644 --- a/lib/librte_hash/Makefile +++ b/lib/librte_hash/Makefile @@ -39,7 +39,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) EXPORT_MAP := rte_hash_version.map -LIBABIVER := 1 +LIBABIVER := 2 # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_HASH) := rte_cuckoo_hash.c diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h index 1cddc07..175c0bb 100644 --- a/lib/librte_hash/rte_hash.h +++ b/lib/librte_hash/rte_hash.h @@ -49,12 +49,6 @@ extern "C" { /** Maximum size of hash table that can be created. */ #define RTE_HASH_ENTRIES_MAX (1 << 30) -/** @deprecated Maximum bucket size that can be created. */ -#define RTE_HASH_BUCKET_ENTRIES_MAX 4 - -/** @deprecated Maximum length of key that can be used. */ -#define RTE_HASH_KEY_LENGTH_MAX 64 - /** Maximum number of characters in hash name.*/ #define RTE_HASH_NAMESIZE 32 diff --git a/lib/librte_hash/rte_jhash.h b/lib/librte_hash/rte_jhash.h index f9a8266..457f225 100644 --- a/lib/librte_hash/rte_jhash.h +++ b/lib/librte_hash/rte_jhash.h @@ -267,10 +267,10 @@ rte_jhash_2hashes(const void *key, uint32_t length, uint32_t *pc, uint32_t *pb) } /** - * Same as rte_jhash2, but takes two seeds and return two uint32_ts. + * Same as rte_jhash_32b, but takes two seeds and return two uint32_ts. * pc and pb must be non-null, and *pc and *pb must both be initialized * with seeds. If you pass in (*pb)=0, the output (*pc) will be - * the same as the return value from rte_jhash2. + * the same as the return value from rte_jhash_32b. * * @param k * Key to calculate hash of. @@ -335,17 +335,6 @@ rte_jhash_32b(const uint32_t *k, uint32_t length, uint32_t initval) } static inline uint32_t -__attribute__ ((deprecated)) -rte_jhash2(const uint32_t *k, uint32_t length, uint32_t initval) -{ - uint32_t initval2 = 0; - - rte_jhash_32b_2hashes(k, length, &initval, &initval2); - - return initval; -} - -static inline uint32_t __rte_jhash_3words(uint32_t a, uint32_t b, uint32_t c, uint32_t initval) { a += RTE_JHASH_GOLDEN_RATIO + initval; -- 2.5.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2 3/3] version: 2.2.0-rc0 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 0/3] clean deprecated code in hash library Thomas Monjalon 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 1/3] enic: use appropriate key length in hash table Thomas Monjalon 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 2/3] hash: remove deprecated function and macros Thomas Monjalon @ 2015-09-04 13:56 ` Thomas Monjalon 2015-09-07 13:28 ` [dpdk-dev] [PATCH v2 0/3] clean deprecated code in hash library Thomas Monjalon 3 siblings, 0 replies; 10+ messages in thread From: Thomas Monjalon @ 2015-09-04 13:56 UTC (permalink / raw) To: pablo.de.lara.guarch; +Cc: dev Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> --- lib/librte_eal/common/include/rte_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/include/rte_version.h b/lib/librte_eal/common/include/rte_version.h index 29baa06..08cc87a 100644 --- a/lib/librte_eal/common/include/rte_version.h +++ b/lib/librte_eal/common/include/rte_version.h @@ -60,7 +60,7 @@ extern "C" { /** * Minor version number i.e. the y in x.y.z */ -#define RTE_VER_MINOR 1 +#define RTE_VER_MINOR 2 /** * Patch level number i.e. the z in x.y.z @@ -70,14 +70,14 @@ extern "C" { /** * Extra string to be appended to version number */ -#define RTE_VER_SUFFIX "" +#define RTE_VER_SUFFIX "-rc" /** * Patch release number * 0-15 = release candidates * 16 = release */ -#define RTE_VER_PATCH_RELEASE 16 +#define RTE_VER_PATCH_RELEASE 0 /** * Macro to compute a version number usable for comparisons -- 2.5.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/3] clean deprecated code in hash library 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 0/3] clean deprecated code in hash library Thomas Monjalon ` (2 preceding siblings ...) 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 3/3] version: 2.2.0-rc0 Thomas Monjalon @ 2015-09-07 13:28 ` Thomas Monjalon 3 siblings, 0 replies; 10+ messages in thread From: Thomas Monjalon @ 2015-09-07 13:28 UTC (permalink / raw) To: pablo.de.lara.guarch; +Cc: dev 2015-09-04 15:56, Thomas Monjalon: > This patchset removes all deprecated macros and functions > from the hash library. > Then the DPDK version can be changed to 2.2.0-rc0. > > Changes in v2: > - increment hash library version > - merge hash patches > - increment DPDK version > > Pablo de Lara (2): > enic: use appropriate key length in hash table > hash: remove deprecated function and macros > > Thomas Monjalon (1): > version: 2.2.0-rc0 Applied, thanks ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-09-07 13:29 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-09-04 9:05 [dpdk-dev] [PATCH 0/3] clean deprecated code in hash library Pablo de Lara 2015-09-04 9:05 ` [dpdk-dev] [PATCH 1/3] hash: use max key length as internal macro instead of deprecated one Pablo de Lara 2015-09-04 9:05 ` [dpdk-dev] [PATCH 2/3] enic: use appropriate key length in hash table Pablo de Lara 2015-09-04 10:15 ` Sujith Sankar (ssujith) 2015-09-04 9:05 ` [dpdk-dev] [PATCH 3/3] hash: remove deprecated functions and macros Pablo de Lara 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 0/3] clean deprecated code in hash library Thomas Monjalon 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 1/3] enic: use appropriate key length in hash table Thomas Monjalon 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 2/3] hash: remove deprecated function and macros Thomas Monjalon 2015-09-04 13:56 ` [dpdk-dev] [PATCH v2 3/3] version: 2.2.0-rc0 Thomas Monjalon 2015-09-07 13:28 ` [dpdk-dev] [PATCH v2 0/3] clean deprecated code in hash library Thomas Monjalon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).