diff options
author | Jerin Jacob <jerinj@marvell.com> | 2020-07-29 22:26:31 +0530 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2020-08-25 10:55:49 +0300 |
commit | accc89eb28992d77d6ad46e65a3154b4221d0b0d (patch) | |
tree | 5ac5d44c9027ac22afe20192b5b020cfd8b1dc98 /helper/cuckootable.c | |
parent | 1ac7d066f6c5b0687af771721c51da620a90230a (diff) |
validation: pool: honor max_align capability
Honor the odp_pool_capability_t::buf.max_align attribute while
creating the pool.
Some implementation chooses to optimize odp_buffer_t handling in
such a way that implementation-specific metadata and actual
data can be in the same cache-line as a performance optimization
while accessing the odp_buffer_t.
As a fix, except helpers, let the application uses the default
alignment from odp_pool_param_init().
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Diffstat (limited to 'helper/cuckootable.c')
-rw-r--r-- | helper/cuckootable.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/helper/cuckootable.c b/helper/cuckootable.c index 47dd90b6c..49b8a5c86 100644 --- a/helper/cuckootable.c +++ b/helper/cuckootable.c @@ -269,7 +269,8 @@ odph_cuckoo_table_create( odp_pool_param_init(¶m); param.type = ODP_POOL_BUFFER; param.buf.size = kv_entry_size; - param.buf.align = ODP_CACHE_LINE_SIZE; + if (pcapa.buf.max_align >= ODP_CACHE_LINE_SIZE) + param.buf.align = ODP_CACHE_LINE_SIZE; param.buf.num = capacity; pool = odp_pool_create(pool_name, ¶m); |