blob: 71b2b58cd3a19656c9e2c6dd9a8dafba26bd4cd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
From 95c5c42b9581f595881df11ca8393dc6925f7d7d Mon Sep 17 00:00:00 2001
From: Nipun Gupta <nipun.gupta@nxp.com>
Date: Thu, 14 Feb 2019 17:57:14 +0530
Subject: [PATCH] netdev-dpdk: have env based configurable number of packet
buffers
use $export DPDK_NUM_MBUF=number
Upstream-Status: Pending
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
lib/netdev-dpdk.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 6187129c0..1f456a63f 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -656,6 +656,11 @@ dpdk_calculate_mbufs(struct netdev_dpdk *dev, int mtu, bool per_port_mp)
{
uint32_t n_mbufs;
+ if (getenv("DPDK_NUM_MBUF")) {
+ n_mbufs = atoi(getenv("DPDK_NUM_MBUF"));
+ return n_mbufs;
+ }
+
if (!per_port_mp) {
/* Shared memory are being used.
* XXX: this is a really rough method of provisioning memory.
--
2.17.1
|