summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/handle_genl4.c
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2018-04-26 01:03:05 +0200
committerDeepak S <deepak.s@linux.intel.com>2018-05-25 14:35:41 +0530
commit05a1a5d34353c5f09c25a01b8dc543b06553915d (patch)
tree843f7746279c443acde5bc4889ac8756dcf925a1 /VNFs/DPPD-PROX/handle_genl4.c
parent9a2cd90e15a77f5ae739ee74a0336b2c03392f57 (diff)
Increase default mbuf size and code simplification/cleanup
mbuf size was setup to achieve the best performance i.e. using the smallest mbuf and not segmenting packets. However this resulted in complex code, much dependent of the way the pmd are working e.g. a change(fix) in recent dpdk i40e implementation caused a 1782 (=1518+8+256) bytes mbuf to be too small to hold a 1518 bytes packets. Hence this change simplifies the mbuf size selection at the price of a potential decreases in performance - as more memory is now used. Except if jumbo frames are used, the mbuf size will now be the same for all modes. The packets will not be segmented except if jumbo frames are enabled. If jumbo frames are enabled, packets are by default segmented, except if the mbuf size is configured big enough in the config file. Change-Id: I222fcac7a65c0d221d5d422f419deb9c0f864172 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/handle_genl4.c')
-rw-r--r--VNFs/DPPD-PROX/handle_genl4.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/VNFs/DPPD-PROX/handle_genl4.c b/VNFs/DPPD-PROX/handle_genl4.c
index 4c62c641..056bd838 100644
--- a/VNFs/DPPD-PROX/handle_genl4.c
+++ b/VNFs/DPPD-PROX/handle_genl4.c
@@ -845,7 +845,7 @@ static void init_task_gen(struct task_base *tbase, struct task_args *targ)
static char name[] = "server_mempool";
name[0]++;
task->mempool = rte_mempool_create(name,
- 4*1024 - 1, MBUF_SIZE,
+ 4*1024 - 1, TX_MBUF_SIZE,
targ->nb_cache_mbuf,
sizeof(struct rte_pktmbuf_pool_private),
rte_pktmbuf_pool_init, NULL,
@@ -959,7 +959,7 @@ static void init_task_gen_client(struct task_base *tbase, struct task_args *targ
const uint32_t socket = rte_lcore_to_socket_id(targ->lconf->id);
name[0]++;
task->mempool = rte_mempool_create(name,
- 4*1024 - 1, MBUF_SIZE,
+ 4*1024 - 1, TX_MBUF_SIZE,
targ->nb_cache_mbuf,
sizeof(struct rte_pktmbuf_pool_private),
rte_pktmbuf_pool_init, NULL,
@@ -1118,7 +1118,6 @@ static struct task_init task_init_gen1 = {
.stop = stop_task_gen_server,
.flag_features = TASK_FEATURE_ZERO_RX,
.size = sizeof(struct task_gen_server),
- .mbuf_size = 2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM,
};
static struct task_init task_init_gen2 = {
@@ -1129,7 +1128,6 @@ static struct task_init task_init_gen2 = {
.stop = stop_task_gen_client,
.flag_features = TASK_FEATURE_ZERO_RX,
.size = sizeof(struct task_gen_client),
- .mbuf_size = 2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM,
};
__attribute__((constructor)) static void reg_task_gen(void)