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 690bacc61c55e4f8f3195faaac068da83790ebf4 (commit)
from 0287f1432eda1cf3e7fb8323e0fda838cf744816 (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 690bacc61c55e4f8f3195faaac068da83790ebf4
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Thu Oct 18 09:49:01 2018 +0300
linux-gen: pool: increase minimum packet segment length
Some DPDK NICs need at least 2176 byte buffers (2048B + headroom) to not
segment standard ethernet frames. Increase minimum segment length to avoid
this and add matching check to zero-copy dpdk pktio pool create.
Reported-by: P. Gyanesh Kumar Patra <pgyanesh.patra(a)gmail.com>
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Tested-by: P. Gyanesh Kumar Patra <pgyanesh.patra(a)gmail.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/include/odp_config_internal.h b/platform/linux-generic/include/odp_config_internal.h
index a94012acc..8ceb325b2 100644
--- a/platform/linux-generic/include/odp_config_internal.h
+++ b/platform/linux-generic/include/odp_config_internal.h
@@ -125,8 +125,8 @@ 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 ((2 * 1024) - \
- CONFIG_PACKET_HEADROOM - \
+#define CONFIG_PACKET_SEG_LEN_MIN ((2 * 1024) + \
+ CONFIG_PACKET_HEADROOM + \
CONFIG_PACKET_TAILROOM)
/* Maximum number of shared memory blocks.
diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c
index 23f39445e..4253451f5 100644
--- a/platform/linux-generic/pktio/dpdk.c
+++ b/platform/linux-generic/pktio/dpdk.c
@@ -327,6 +327,13 @@ static struct rte_mempool *mbuf_pool_create(const char *name,
goto fail;
}
+ if (pool_entry->seg_len < RTE_MBUF_DEFAULT_BUF_SIZE) {
+ ODP_ERR("Some NICs need at least %dB buffers to not segment "
+ "standard ethernet frames. Increase pool seg_len.\n",
+ RTE_MBUF_DEFAULT_BUF_SIZE);
+ goto fail;
+ }
+
total_size = rte_mempool_calc_obj_size(elt_size, MEMPOOL_F_NO_SPREAD,
&sz);
if (total_size != pool_entry->block_size) {
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/include/odp_config_internal.h | 4 ++--
platform/linux-generic/pktio/dpdk.c | 7 +++++++
2 files changed, 9 insertions(+), 2 deletions(-)
hooks/post-receive
--