dpdk-config: Remove the config patch file, and rewrite the config file

post `make config'

The config file patch is a bit cumbersome to maintain. Any time the
config files change, it will be required to regenerate this patch
against the new sets of files. Additionally, it is difficult to build
modular enable/disables for these configs down the line.

With this set, create a block for PMD enable/disable. RHEL wants this
enabled, for sure.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Neil Horman <nhorman@redhat.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
This commit is contained in:
Aaron Conole 2015-09-30 11:20:27 -04:00
parent b6c6c73d13
commit 549fcba8af
2 changed files with 27 additions and 115 deletions

View File

@ -1,106 +0,0 @@
diff -up ./dpdk-2.1.0/config/common_linuxapp.config ./dpdk-2.1.0/config/common_linuxapp
--- ./dpdk-2.1.0/config/common_linuxapp.config 2015-08-27 09:51:50.192529771 -0400
+++ ./dpdk-2.1.0/config/common_linuxapp 2015-08-27 09:52:48.342213540 -0400
@@ -52,7 +52,7 @@ CONFIG_RTE_EXEC_ENV_LINUXAPP=y
## Note: if your compiler does not support the relevant -march options,
## it will be compiled with whatever latest processor the compiler supports!
##
-#CONFIG_RTE_MACHINE="native"
+CONFIG_RTE_MACHINE="default"
#
##
## define the architecture we compile for.
@@ -91,7 +91,7 @@ CONFIG_RTE_BUILD_COMBINE_LIBS=n
#
# Use newest code breaking previous ABI
#
-CONFIG_RTE_NEXT_ABI=y
+CONFIG_RTE_NEXT_ABI=n
#
# Compile Environment Abstraction Layer
@@ -107,7 +107,7 @@ CONFIG_RTE_LOG_HISTORY=256
CONFIG_RTE_LIBEAL_USE_HPET=n
CONFIG_RTE_EAL_ALLOW_INV_SOCKET_ID=n
CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n
-CONFIG_RTE_EAL_IGB_UIO=y
+CONFIG_RTE_EAL_IGB_UIO=n
CONFIG_RTE_EAL_VFIO=y
CONFIG_RTE_MALLOC_DEBUG=n
@@ -152,8 +152,8 @@ CONFIG_RTE_NIC_BYPASS=n
#
# Compile burst-oriented IGB & EM PMD drivers
#
-CONFIG_RTE_LIBRTE_EM_PMD=y
-CONFIG_RTE_LIBRTE_IGB_PMD=y
+CONFIG_RTE_LIBRTE_EM_PMD=n
+CONFIG_RTE_LIBRTE_IGB_PMD=n
CONFIG_RTE_LIBRTE_E1000_DEBUG_INIT=n
CONFIG_RTE_LIBRTE_E1000_DEBUG_RX=n
CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n
@@ -164,7 +164,7 @@ CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP
#
# Compile burst-oriented IXGBE PMD driver
#
-CONFIG_RTE_LIBRTE_IXGBE_PMD=y
+CONFIG_RTE_LIBRTE_IXGBE_PMD=n
CONFIG_RTE_LIBRTE_IXGBE_DEBUG_INIT=n
CONFIG_RTE_LIBRTE_IXGBE_DEBUG_RX=n
CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX=n
@@ -177,7 +177,7 @@ CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=y
#
# Compile burst-oriented I40E PMD driver
#
-CONFIG_RTE_LIBRTE_I40E_PMD=y
+CONFIG_RTE_LIBRTE_I40E_PMD=n
CONFIG_RTE_LIBRTE_I40E_DEBUG_INIT=n
CONFIG_RTE_LIBRTE_I40E_DEBUG_RX=n
CONFIG_RTE_LIBRTE_I40E_DEBUG_TX=n
@@ -267,7 +267,7 @@ CONFIG_RTE_PMD_RING_MAX_TX_RINGS=16
#
# Compile software PMD backed by PCAP files
#
-CONFIG_RTE_LIBRTE_PMD_PCAP=n
+CONFIG_RTE_LIBRTE_PMD_PCAP=y
#
# Compile link bonding PMD library
@@ -356,7 +356,7 @@ CONFIG_RTE_LIBRTE_LPM_DEBUG=n
#
# Compile librte_acl
#
-CONFIG_RTE_LIBRTE_ACL=y
+CONFIG_RTE_LIBRTE_ACL=n
CONFIG_RTE_LIBRTE_ACL_DEBUG=n
#
@@ -424,9 +424,9 @@ CONFIG_RTE_PIPELINE_STATS_COLLECT=n
#
# Compile librte_kni
#
-CONFIG_RTE_LIBRTE_KNI=y
-CONFIG_RTE_KNI_KMOD=y
-CONFIG_RTE_KNI_PREEMPT_DEFAULT=y
+CONFIG_RTE_LIBRTE_KNI=n
+CONFIG_RTE_KNI_KMOD=n
+CONFIG_RTE_KNI_PREEMPT_DEFAULT=n
CONFIG_RTE_KNI_KO_DEBUG=n
CONFIG_RTE_KNI_VHOST=n
CONFIG_RTE_KNI_VHOST_MAX_CACHE_SIZE=1024
diff -up ./dpdk-2.1.0/config/defconfig_x86_64-native-linuxapp-gcc.config ./dpdk-2.1.0/config/defconfig_x86_64-native-linuxapp-gcc
--- ./dpdk-2.1.0/config/defconfig_x86_64-native-linuxapp-gcc.config 2015-08-17 13:35:37.000000000 -0400
+++ ./dpdk-2.1.0/config/defconfig_x86_64-native-linuxapp-gcc 2015-08-27 09:52:29.304662294 -0400
@@ -31,8 +31,10 @@
#
#include "common_linuxapp"
-
-CONFIG_RTE_MACHINE="native"
+# Note: if your compiler does not support the relevant -march options,
+# it will be compiled with whatever latest processor the compiler supports!
+#
+CONFIG_RTE_MACHINE="default"
CONFIG_RTE_ARCH="x86_64"
CONFIG_RTE_ARCH_X86_64=y

View File

@ -11,8 +11,7 @@ Release: 1%{?dist}
URL: http://dpdk.org
Source: http://dpdk.org/browse/dpdk/snapshot/dpdk-%{version}.tar.gz
Patch1: dpdk-config.patch
Patch2: enic-pun-fix.patch
Patch1: enic-pun-fix.patch
Summary: Set of libraries and drivers for fast packet processing
@ -84,15 +83,18 @@ Requires: kmod pciutils findutils iproute
%prep
%setup -q
%patch1 -p2 -z .config
%patch2 -p2 -z .enic
%if %{with shared}
sed -i 's:^CONFIG_RTE_BUILD_SHARED_LIB=n$:CONFIG_RTE_BUILD_SHARED_LIB=y:g' config/common_linuxapp
%endif
%patch1 -p2 -z .enic
%build
# set up a method for modifying the resulting .config file
function setconf() {
if grep -q $1 %{target}/.config; then
sed -i "s:^$1=.*$:$1=$2:g" %{target}/.config
else
echo $1=$2 >> %{target}/.config
fi
}
# In case dpdk-devel is installed, we should ignore its hints about the SDK directories
unset RTE_SDK RTE_INCLUDE RTE_TARGET
@ -107,6 +109,22 @@ export EXTRA_CFLAGS="%{optflags} -Wformat -fPIC -Wno-error=array-bounds"
# machines, but runtime checks in DPDK will catch those situations.
make V=1 O=%{target} T=%{target} %{?_smp_mflags} config
setconf CONFIG_RTE_MACHINE "default"
setconf CONFIG_RTE_NEXT_ABI n
setconf CONFIG_RTE_LIBRTE_PMD_PCAP y
setconf CONFIG_RTE_LIBRTE_VHOST y
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
%if %{with shared}
setconf CONFIG_RTE_BUILD_SHARED_LIB y
%endif
make V=1 O=%{target} %{?_smp_mflags}
make V=1 O=%{target} %{?_smp_mflags} doc-api-html doc-guides-html %{?with_pdfdoc: guides-pdf}