test/rcu: fix test case
Test case for rte_rcu_qsbr_get_memsize is written specifically for 128 threads. Do not use RTE_MAX_LCORE as it changes for different configurations. Fixes: e6a14121f4ae ("test/rcu: remove arbitrary limit on max core count") Cc: stable@dpdk.org Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
This commit is contained in:
parent
104dbec208
commit
21c17c1556
@ -89,13 +89,17 @@ test_rcu_qsbr_get_memsize(void)
|
||||
sz = rte_rcu_qsbr_get_memsize(0);
|
||||
TEST_RCU_QSBR_RETURN_IF_ERROR((sz != 1), "Get Memsize for 0 threads");
|
||||
|
||||
sz = rte_rcu_qsbr_get_memsize(RTE_MAX_LCORE);
|
||||
sz = rte_rcu_qsbr_get_memsize(128);
|
||||
/* For 128 threads,
|
||||
* for machines with cache line size of 64B - 8384
|
||||
* for machines with cache line size of 128 - 16768
|
||||
*/
|
||||
TEST_RCU_QSBR_RETURN_IF_ERROR((sz != 8384 && sz != 16768),
|
||||
"Get Memsize");
|
||||
if (RTE_CACHE_LINE_SIZE == 64)
|
||||
TEST_RCU_QSBR_RETURN_IF_ERROR((sz != 8384),
|
||||
"Get Memsize for 128 threads");
|
||||
else if (RTE_CACHE_LINE_SIZE == 128)
|
||||
TEST_RCU_QSBR_RETURN_IF_ERROR((sz != 16768),
|
||||
"Get Memsize for 128 threads");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user