[dpdk-dev] app/test: decrease memory requirements for hash

Message ID 1473680288-29525-1-git-send-email-olivier.matz@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Commit Message

Olivier Matz Sept. 12, 2016, 11:38 a.m. UTC
  In hash autotest, the size of tables that should be succesfully created
is 32K entries (256KB), except for the table called "different_name",
which is 1M entries (8MB). When memory is too fragmented (with 2M
hugepages), the test can fail.

To avoid allocation failures due to memory fragmentation, decrease the
size of the table to 32K.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 app/test/test_hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon Sept. 23, 2016, 4:42 p.m. UTC | #1
2016-09-12 13:38, Olivier Matz:
> In hash autotest, the size of tables that should be succesfully created
> is 32K entries (256KB), except for the table called "different_name",
> which is 1M entries (8MB). When memory is too fragmented (with 2M
> hugepages), the test can fail.
> 
> To avoid allocation failures due to memory fragmentation, decrease the
> size of the table to 32K.
> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>

Applied, thanks
  

Patch

diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index 94300e1..2c87efe 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -783,7 +783,7 @@  fbk_hash_unit_test(void)
 	 */
 	struct rte_fbk_hash_params different_name = {
 		.name = "different_name",			/* different name */
-		.entries = RTE_FBK_HASH_ENTRIES_MAX,
+		.entries = LOCAL_FBK_HASH_ENTRIES_MAX,
 		.entries_per_bucket = 4,
 		.socket_id = 0,
 	};