Skip to contentSkip to conversation

test/table_autotest: Decrease memory requirement

PATCH Superseded Michael Santana 4 participants 6 messages Jul 25, 2019 – Jul 30, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/table_autotest: Decrease memory requirement

This patch reduces the memory footprint of tables for the unit test. Lower memory footprint means the test now passes when trying to allocate the tables.

---
 app/test/test_table_tables.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/test/test_table_tables.c +2 -2
index 20df2e922..21c4086c2 100644
@@ -464,7 +464,7 @@ test_table_lpm_ipv6(void)
 	struct rte_table_lpm_ipv6_params lpm_params = {
 		.name = "LPM",
 		.n_rules = 1 << 24,
-		.number_tbl8s = 1 << 21,
+		.number_tbl8s = 1 << 18,
 		.entry_unique_size = entry_size,
 		.offset = APP_METADATA_OFFSET(32)
 	};
@@ -492,7 +492,7 @@ test_table_lpm_ipv6(void)
 	if (table != NULL)
 		return -4;
 
-	lpm_params.number_tbl8s = 1 << 21;
+	lpm_params.number_tbl8s = 1 << 18;
 	lpm_params.entry_unique_size = 0;
 	table = rte_table_lpm_ipv6_ops.f_create(&lpm_params, 0, entry_size);
 	if (table != NULL)
Signature · 1 line
2.20.1
#1 lore raw

Hello Michael,

Quoted 4 lines · Michael Santana

This patch reduces the memory footprint of tables for the unit test. Lower memory footprint means the test now passes when trying to allocate the tables.

This is mainly for tests in CI, might be worth mentionning in the commitlog.

Do you have a rough estimate of how the need in memory changes with this patch?

Signature · 1 line
David Marchand
Acked-by on v1 1/1
#3 lore raw
In reply to Michael Santana
Quoted 10 lines

-----Original Message-----
From: Michael Santana [mailto:[email protected]]
Sent: Thursday, July 25, 2019 10:32 PM
To: [email protected]
Cc: Dumitrescu, Cristian <[email protected]>; Michael Santana Francisco <[email protected]>
Subject: [PATCH] test/table_autotest: Decrease memory requirement

Quoted 9 lines

This patch reduces the memory footprint of tables for the unit test. Lower memory footprint means the test now passes when trying to allocate the tables.

---
 app/test/test_table_tables.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
#2 lore raw
In reply to David Marchand
Quoted 7 lines · David Marchand

Hello Michael,

Quoted 3 lines · Michael Santana

This patch reduces the memory footprint of tables for the unit test. Lower memory footprint means the test now passes when trying to allocate the tables.

This is mainly for tests in CI, might be worth mentionning in the commitlog.

will update

Quoted 2 lines

Do you have a rough estimate of how the need in memory changes with this patch?

Based on the equation on lib/librte_lpm/rte_lpm6.c:317, that particular allocation went from 2.2GB to ~300MB

Quoted 2 lines
#4 lore raw

PATCH v2 1/1 test/table_autotest: Decrease memory requirement

In reply to Michael Santana

This patch reduces the memory footprint of tables for the unit test. Lower memory footprint means the test now passes when trying to allocate the tables. This patch is mainly to make table_autotest pass in CI.

---
 app/test/test_table_tables.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/test/test_table_tables.c +2 -2
index 20df2e922..21c4086c2 100644
@@ -464,7 +464,7 @@ test_table_lpm_ipv6(void)
 	struct rte_table_lpm_ipv6_params lpm_params = {
 		.name = "LPM",
 		.n_rules = 1 << 24,
-		.number_tbl8s = 1 << 21,
+		.number_tbl8s = 1 << 18,
 		.entry_unique_size = entry_size,
 		.offset = APP_METADATA_OFFSET(32)
 	};
@@ -492,7 +492,7 @@ test_table_lpm_ipv6(void)
 	if (table != NULL)
 		return -4;
 
-	lpm_params.number_tbl8s = 1 << 21;
+	lpm_params.number_tbl8s = 1 << 18;
 	lpm_params.entry_unique_size = 0;
 	table = rte_table_lpm_ipv6_ops.f_create(&lpm_params, 0, entry_size);
 	if (table != NULL)
Signature · 1 line
2.20.1