diff options
| author | Ting Liu <ting.liu@nxp.com> | 2020-06-09 15:23:50 +0800 |
|---|---|---|
| committer | Otavio Salvador <otavio@ossystems.com.br> | 2020-06-10 17:12:14 -0300 |
| commit | d9251dbd836d762fff82257b8053beb24e745ca1 (patch) | |
| tree | cf03063858466f48b931094d49d31b3aadcb8909 | |
| parent | a88064755bcad9564cf340dfe8f19034502ac33e (diff) | |
| download | meta-freescale-d9251dbd836d762fff82257b8053beb24e745ca1.tar.gz | |
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>
| -rw-r--r-- | recipes-extended/ovs-dpdk/files/0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch | 34 | ||||
| -rw-r--r-- | recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb | 1 |
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 000000000..71b2b58cd --- /dev/null +++ b/recipes-extended/ovs-dpdk/files/0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From 95c5c42b9581f595881df11ca8393dc6925f7d7d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Nipun Gupta <nipun.gupta@nxp.com> | ||
| 3 | Date: Thu, 14 Feb 2019 17:57:14 +0530 | ||
| 4 | Subject: [PATCH] netdev-dpdk: have env based configurable number of packet | ||
| 5 | buffers | ||
| 6 | |||
| 7 | use $export DPDK_NUM_MBUF=number | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | |||
| 11 | Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> | ||
| 12 | --- | ||
| 13 | lib/netdev-dpdk.c | 5 +++++ | ||
| 14 | 1 file changed, 5 insertions(+) | ||
| 15 | |||
| 16 | diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c | ||
| 17 | index 6187129c0..1f456a63f 100644 | ||
| 18 | --- a/lib/netdev-dpdk.c | ||
| 19 | +++ b/lib/netdev-dpdk.c | ||
| 20 | @@ -656,6 +656,11 @@ dpdk_calculate_mbufs(struct netdev_dpdk *dev, int mtu, bool per_port_mp) | ||
| 21 | { | ||
| 22 | uint32_t n_mbufs; | ||
| 23 | |||
| 24 | + if (getenv("DPDK_NUM_MBUF")) { | ||
| 25 | + n_mbufs = atoi(getenv("DPDK_NUM_MBUF")); | ||
| 26 | + return n_mbufs; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | if (!per_port_mp) { | ||
| 30 | /* Shared memory are being used. | ||
| 31 | * XXX: this is a really rough method of provisioning memory. | ||
| 32 | -- | ||
| 33 | 2.17.1 | ||
| 34 | |||
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 8b48533f5..9b5d25169 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" | |||
| 8 | inherit python3native | 8 | inherit python3native |
| 9 | 9 | ||
| 10 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ovs-dpdk;nobranch=1 \ | 10 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ovs-dpdk;nobranch=1 \ |
| 11 | file://0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch \ | ||
| 11 | " | 12 | " |
| 12 | SRCREV = "71d553b995d0bd527d3ab1e9fbaf5a2ae34de2f3" | 13 | SRCREV = "71d553b995d0bd527d3ab1e9fbaf5a2ae34de2f3" |
| 13 | 14 | ||
