aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorTing Liu <ting.liu@nxp.com>2020-06-09 15:23:50 +0800
committerOtavio Salvador <otavio@ossystems.com.br>2020-06-10 17:12:14 -0300
commitd9251dbd836d762fff82257b8053beb24e745ca1 (patch)
treecf03063858466f48b931094d49d31b3aadcb8909 /recipes-extended
parenta88064755bcad9564cf340dfe8f19034502ac33e (diff)
downloadmeta-freescale-d9251dbd836d762fff82257b8053beb24e745ca1.tar.gz
meta-freescale-d9251dbd836d762fff82257b8053beb24e745ca1.tar.bz2
meta-freescale-d9251dbd836d762fff82257b8053beb24e745ca1.zip
ovs-dpdk: add configurable buffer parameter via env
Provide an alternative way to set packet buffer via env variable DPDK_NUM_MBUF, besides automatic calculation. Signed-off-by: Ting Liu <ting.liu@nxp.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/ovs-dpdk/files/0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch34
-rw-r--r--recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/recipes-extended/ovs-dpdk/files/0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch b/recipes-extended/ovs-dpdk/files/0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch
new file mode 100644
index 00000000..71b2b58c
--- /dev/null
+++ b/recipes-extended/ovs-dpdk/files/0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch
@@ -0,0 +1,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
+
diff --git a/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb b/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb
index 8b48533f..9b5d2516 100644
--- a/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb
+++ b/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb
@@ -8,6 +8,7 @@ RDEPENDS_${PN} = "bash libcrypto libssl python3"
inherit python3native
SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ovs-dpdk;nobranch=1 \
+ file://0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch \
"
SRCREV = "71d553b995d0bd527d3ab1e9fbaf5a2ae34de2f3"