summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2019-04-15 10:48:46 +0200
committerXavier Simonart <xavier.simonart@intel.com>2019-04-15 16:34:06 +0200
commit7a89c091708f4cddc9849f4a1d6e86403a2d2456 (patch)
treeba72b81b0495137a9b34267d62c3d372ae75bcf7
parentd4216dd28019256fd6363ed4269d540ef64ec23c (diff)
PROX: fix minimum rx buffer size used within generator
Different PMD have different requirements for minimum rx buffer size. vmxnet3 has (in DPDK 18.08) requires minimum 1518 + 128 (RTE_PKTMBUF_HEADROOM). Change-Id: I327ae5b8dcf7eef8dd71fb4e2f0603b9bab6e1d3 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
-rw-r--r--VNFs/DPPD-PROX/prox_port_cfg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/prox_port_cfg.c b/VNFs/DPPD-PROX/prox_port_cfg.c
index a538be4f..043e755b 100644
--- a/VNFs/DPPD-PROX/prox_port_cfg.c
+++ b/VNFs/DPPD-PROX/prox_port_cfg.c
@@ -470,6 +470,9 @@ static void init_port(struct prox_port_cfg *port_cfg)
plog_info("\t\tPort %u had no RX queues, setting to 1\n", port_id);
port_cfg->n_rxq = 1;
uint32_t mbuf_size = TX_MBUF_SIZE;
+ if (mbuf_size < port_cfg->min_rx_bufsize + RTE_PKTMBUF_HEADROOM + sizeof(struct rte_mbuf))
+ mbuf_size = port_cfg->min_rx_bufsize + RTE_PKTMBUF_HEADROOM + sizeof(struct rte_mbuf);
+
plog_info("\t\tAllocating dummy memory pool on socket %u with %u elements of size %u\n",
port_cfg->socket, port_cfg->n_rxd, mbuf_size);
port_cfg->pool[0] = rte_mempool_create(dummy_pool_name, port_cfg->n_rxd, mbuf_size,