diff options
author | Matias Elo <matias.elo@nokia.com> | 2018-11-27 12:04:29 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-11-30 14:17:38 +0300 |
commit | 013cdab099659623af0d75ff5fd0b606a9c2ce6a (patch) | |
tree | 867b96df9d34112a6f50af268a75ccaaac2c9c16 /platform/linux-generic/odp_pool.c | |
parent | 33f6c963c4c43b6ed32ac2f9282b560f6016b682 (diff) |
linux-gen: pool: move ODP_CONFIG_BUFFER_ALIGN_MIN out of config header
Rename ODP_CONFIG_BUFFER_ALIGN_MIN to BUFFER_ALIGN_MIN and move it to
odp_pool.c as this value links closely to the buffer pool implementation.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/odp_pool.c')
-rw-r--r-- | platform/linux-generic/odp_pool.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 2f8110ead..773cec264 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -46,6 +46,10 @@ /* Define a practical limit for contiguous memory allocations */ #define MAX_SIZE (10 * 1024 * 1024) +/* Minimum supported buffer alignment. Requests for values below this will be + * rounded up to this value. */ +#define BUFFER_ALIGN_MIN ODP_CACHE_LINE_SIZE + ODP_STATIC_ASSERT(CONFIG_POOL_CACHE_SIZE > (2 * CACHE_BURST), "cache_burst_size_too_large_compared_to_cache_size"); @@ -390,8 +394,8 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params, if (params->type == ODP_POOL_BUFFER) align = params->buf.align; - if (align < ODP_CONFIG_BUFFER_ALIGN_MIN) - align = ODP_CONFIG_BUFFER_ALIGN_MIN; + if (align < BUFFER_ALIGN_MIN) + align = BUFFER_ALIGN_MIN; /* Validate requested buffer alignment */ if (align > ODP_CONFIG_BUFFER_ALIGN_MAX || |