summaryrefslogtreecommitdiff
path: root/examples/multi_process/client_server_mp
diff options
context:
space:
mode:
authorKonstantin Ananyev <konstantin.ananyev@intel.com>2015-04-30 00:31:51 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-05-11 15:51:14 +0200
commit824cb29c0e7b8a2b3ed285546c3a39a8e0b3cd44 (patch)
tree2bb414d2d372af4784f915b413c03e5795da49e2 /examples/multi_process/client_server_mp
parent11f51a26d3e3a3cf78efa4c0a20d6aa5b29117c2 (diff)
downloaddpdk-824cb29c0e7b8a2b3ed285546c3a39a8e0b3cd44.zip
dpdk-824cb29c0e7b8a2b3ed285546c3a39a8e0b3cd44.tar.gz
dpdk-824cb29c0e7b8a2b3ed285546c3a39a8e0b3cd44.tar.xz
apps: fix default mbuf size
Latest mbuf changes (priv_size addition and related fixes) exposed small problem with testpmd and few other sample apps: when mbuf size is exaclty 2KB or less, that causes ixgbe PMD to select scattered RX even for configs with 'normal' max packet length (max_rx_pkt_len == ETHER_MAX_LEN). To overcome that problem and unify the code, new macro was created to represent recommended minimal buffer length for mbuf. When appropriate, samples are updated to use that macro. Fixes: dfb03bbe2b ("app/testpmd: use standard functions to initialize mbufs and mbuf pool") Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Diffstat (limited to 'examples/multi_process/client_server_mp')
-rw-r--r--examples/multi_process/client_server_mp/mp_server/init.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/multi_process/client_server_mp/mp_server/init.c b/examples/multi_process/client_server_mp/mp_server/init.c
index dc3647d..7afd51a 100644
--- a/examples/multi_process/client_server_mp/mp_server/init.c
+++ b/examples/multi_process/client_server_mp/mp_server/init.c
@@ -71,7 +71,6 @@
#define MBUFS_PER_CLIENT 1536
#define MBUFS_PER_PORT 1536
#define MBUF_CACHE_SIZE 512
-#define MBUF_DATA_SIZE (2048 + RTE_PKTMBUF_HEADROOM)
#define RTE_MP_RX_DESC_DEFAULT 512
#define RTE_MP_TX_DESC_DEFAULT 512
@@ -103,7 +102,7 @@ init_mbuf_pools(void)
printf("Creating mbuf pool '%s' [%u mbufs] ...\n",
PKTMBUF_POOL_NAME, num_mbufs);
pktmbuf_pool = rte_pktmbuf_pool_create(PKTMBUF_POOL_NAME, num_mbufs,
- MBUF_CACHE_SIZE, 0, MBUF_DATA_SIZE, rte_socket_id());
+ MBUF_CACHE_SIZE, 0, RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());
return (pktmbuf_pool == NULL); /* 0 on success */
}