summaryrefslogtreecommitdiffstats
path: root/cmake/modules/patch-dpdk-conf.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /cmake/modules/patch-dpdk-conf.sh
parentInitial commit. (diff)
downloadceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz
ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/modules/patch-dpdk-conf.sh')
-rwxr-xr-xcmake/modules/patch-dpdk-conf.sh57
1 files changed, 57 insertions, 0 deletions
diff --git a/cmake/modules/patch-dpdk-conf.sh b/cmake/modules/patch-dpdk-conf.sh
new file mode 100755
index 000000000..ad5bbf6a4
--- /dev/null
+++ b/cmake/modules/patch-dpdk-conf.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+# -*- mode:sh; tab-width:4; indent-tabs-mode:nil -*
+
+setconf() {
+ local key=$1
+ local val=$2
+ if grep -q ^$key= ${conf}; then
+ sed -i -e "s:^$key=.*$:$key=$val:g" ${conf}
+ else
+ echo $key=$val >> ${conf}
+ fi
+}
+
+conf=$1/.config
+shift
+machine=$1
+shift
+arch=$1
+shift
+numa=$1
+shift
+
+setconf CONFIG_RTE_MACHINE "${machine}"
+setconf CONFIG_RTE_ARCH "${arch}"
+
+# Disable experimental features
+setconf CONFIG_RTE_NEXT_ABI n
+setconf CONFIG_RTE_LIBRTE_MBUF_OFFLOAD n
+# Disable unmaintained features
+setconf CONFIG_RTE_LIBRTE_POWER n
+
+setconf CONFIG_RTE_EAL_IGB_UIO n
+setconf CONFIG_RTE_LIBRTE_KNI n
+setconf CONFIG_RTE_KNI_KMOD n
+setconf CONFIG_RTE_KNI_PREEMPT_DEFAULT n
+
+# no pdump
+setconf CONFIG_RTE_LIBRTE_PDUMP n
+
+# no vm support
+setconf CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT n
+setconf CONFIG_RTE_LIBRTE_VHOST n
+setconf CONFIG_RTE_LIBRTE_VHOST_NUMA n
+setconf CONFIG_RTE_LIBRTE_VMXNET3_PMD n
+setconf CONFIG_RTE_LIBRTE_PMD_VHOST n
+setconf CONFIG_RTE_APP_EVENTDEV n
+setconf CONFIG_RTE_MAX_VFIO_GROUPS 64
+
+# no test
+setconf CONFIG_RTE_APP_TEST n
+setconf CONFIG_RTE_TEST_PMD n
+
+# async/dpdk does not like it
+setconf CONFIG_RTE_MBUF_REFCNT_ATOMIC n
+
+# balanced allocation of hugepages
+setconf CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES "${numa}"