This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 536cce998e84a559e125b4741d00f2a760a0d575 (commit) via 013cdab099659623af0d75ff5fd0b606a9c2ce6a (commit) via 33f6c963c4c43b6ed32ac2f9282b560f6016b682 (commit) from b498032d6f1388cf87f415367780a2dc54342d85 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 536cce998e84a559e125b4741d00f2a760a0d575 Author: Matias Elo matias.elo@nokia.com Date: Tue Nov 27 12:29:22 2018 +0200
linux-gen: pool: remove unnecessary align padding from buffers
Buffer and timeout header sizes are rounded up to cache line size, so the following data can be cache line aligned without extra padding.
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
diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 773cec26..7f4bb795 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -489,10 +489,17 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params, block_size = ROUNDUP_CACHE_LINE(hdr_size + align + headroom + seg_len + tailroom); } else { + /* Header size is rounded up to cache line size, so the + * following data can be cache line aligned without extra + * padding. */ + uint32_t align_pad = (align > ODP_CACHE_LINE_SIZE) ? + align - ODP_CACHE_LINE_SIZE : 0; + hdr_size = (params->type == ODP_POOL_BUFFER) ? ROUNDUP_CACHE_LINE(sizeof(odp_buffer_hdr_t)) : ROUNDUP_CACHE_LINE(sizeof(odp_timeout_hdr_t)); - block_size = ROUNDUP_CACHE_LINE(hdr_size + align + seg_len); + + block_size = ROUNDUP_CACHE_LINE(hdr_size + align_pad + seg_len); }
/* Calculate extra space required for storing DPDK objects and mbuf
commit 013cdab099659623af0d75ff5fd0b606a9c2ce6a Author: Matias Elo matias.elo@nokia.com Date: Tue Nov 27 12:04:29 2018 +0200
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
diff --git a/platform/linux-generic/include/odp_config_internal.h b/platform/linux-generic/include/odp_config_internal.h index 642de685..a06e0c97 100644 --- a/platform/linux-generic/include/odp_config_internal.h +++ b/platform/linux-generic/include/odp_config_internal.h @@ -36,14 +36,6 @@ extern "C" { */ #define ODP_CONFIG_PKTIO_ENTRIES 64
-/* - * Minimum buffer alignment - * - * This defines the minimum supported buffer alignment. Requests for values - * below this will be rounded up to this value. - */ -#define ODP_CONFIG_BUFFER_ALIGN_MIN 64 - /* * Maximum buffer alignment * diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 2f8110ea..773cec26 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 ||
commit 33f6c963c4c43b6ed32ac2f9282b560f6016b682 Author: Matias Elo matias.elo@nokia.com Date: Tue Nov 27 10:22:45 2018 +0200
linux-gen: pool: reduce buffer memory usage
Calculate memory block size using pool type specific header.
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
diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 2262f355..2f8110ea 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -23,6 +23,7 @@ #include <odp_global_data.h> #include <odp_libconfig_internal.h> #include <odp_shm_internal.h> +#include <odp_timer_internal.h>
#include <string.h> #include <stdio.h> @@ -479,11 +480,16 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params,
pool->params = *params;
- hdr_size = sizeof(odp_packet_hdr_t); - hdr_size = ROUNDUP_CACHE_LINE(hdr_size); - - block_size = ROUNDUP_CACHE_LINE(hdr_size + align + headroom + seg_len + - tailroom); + if (params->type == ODP_POOL_PACKET) { + hdr_size = ROUNDUP_CACHE_LINE(sizeof(odp_packet_hdr_t)); + block_size = ROUNDUP_CACHE_LINE(hdr_size + align + headroom + + seg_len + tailroom); + } else { + hdr_size = (params->type == ODP_POOL_BUFFER) ? + ROUNDUP_CACHE_LINE(sizeof(odp_buffer_hdr_t)) : + ROUNDUP_CACHE_LINE(sizeof(odp_timeout_hdr_t)); + block_size = ROUNDUP_CACHE_LINE(hdr_size + align + seg_len); + }
/* Calculate extra space required for storing DPDK objects and mbuf * headers. NOP if zero-copy is disabled. */
-----------------------------------------------------------------------
Summary of changes: .../linux-generic/include/odp_config_internal.h | 8 ------ platform/linux-generic/odp_pool.c | 29 +++++++++++++++++----- 2 files changed, 23 insertions(+), 14 deletions(-)
hooks/post-receive