aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/odp_config_internal.h
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@linaro.org>2018-10-08 11:26:10 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-10-09 17:22:53 +0300
commit21f383e9fa9f0f0c127dbb251e08ae91da56d817 (patch)
treea5192e17410ea2064f882d133cf7b465a5ec868e /platform/linux-generic/include/odp_config_internal.h
parentf6b06ba4ef87d2c62fe47fe8ffe4e240b37c8fc1 (diff)
linux-gen: pool: decrease minimum segment size to 2k
Decrease minimum segment size from about 8k to about 2k bytes. Normal Ethernet frames still fit into first segment, but SHM reservation size is reduced into about 1/3 what it was. There is 1GB limit in process mode SHM allocations, so 1/3 reduction makes a big difference there. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/include/odp_config_internal.h')
-rw-r--r--platform/linux-generic/include/odp_config_internal.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/linux-generic/include/odp_config_internal.h b/platform/linux-generic/include/odp_config_internal.h
index 99c31af74..bfe203bfe 100644
--- a/platform/linux-generic/include/odp_config_internal.h
+++ b/platform/linux-generic/include/odp_config_internal.h
@@ -125,7 +125,9 @@ extern "C" {
* defined segment length (seg_len in odp_pool_param_t) will be rounded up into
* this value.
*/
-#define CONFIG_PACKET_SEG_LEN_MIN CONFIG_PACKET_MAX_SEG_LEN
+#define CONFIG_PACKET_SEG_LEN_MIN ((2 * 1024) - \
+ CONFIG_PACKET_HEADROOM - \
+ CONFIG_PACKET_TAILROOM)
/* Maximum number of shared memory blocks.
*