From: Anatoly Burakov Date: Wed, 18 Jun 2014 14:50:36 +0000 (+0100) Subject: examples/ip_reassembly: reduce memory usage X-Git-Tag: spdx-start~10583 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d47bd10c8dd1a6174d08791c0266d9aacf956902;p=dpdk.git examples/ip_reassembly: reduce memory usage Signed-off-by: Anatoly Burakov Acked-by: Thomas Monjalon --- diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index d02a969d93..1b60e410ac 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -942,15 +942,15 @@ setup_queue_tbl(struct rx_queue *rxq, uint32_t lcore, uint32_t queue) } /* - * At any given moment up to + * At any given moment up to * mbufs could be stored int the fragment table. * Plus, each TX queue can hold up to packets. */ - nb_mbuf = 2 * RTE_MAX(max_flow_num, 2UL * MAX_PKT_BURST) * MAX_FRAG_NUM; + nb_mbuf = RTE_MAX(max_flow_num, 2UL * MAX_PKT_BURST) * MAX_FRAG_NUM; nb_mbuf *= (port_conf.rxmode.max_rx_pkt_len + BUF_SIZE - 1) / BUF_SIZE; - nb_mbuf += RTE_TEST_RX_DESC_DEFAULT + RTE_TEST_TX_DESC_DEFAULT; nb_mbuf *= 2; /* ipv4 and ipv6 */ + nb_mbuf += RTE_TEST_RX_DESC_DEFAULT + RTE_TEST_TX_DESC_DEFAULT; nb_mbuf = RTE_MAX(nb_mbuf, (uint32_t)NB_MBUF);