diff --git a/.gitignore b/.gitignore index 73cccc7..2453457 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /dpdk-1.7.0-20140603git5ebbb1728.tgz /dpdk-1.7.0.tar.gz +/dpdk-2.0.0.tar.gz diff --git a/dpdk-config.patch b/dpdk-config.patch index 23afa21..5d1c926 100644 --- a/dpdk-config.patch +++ b/dpdk-config.patch @@ -1,6 +1,6 @@ -diff -up dpdk-1.7.0/config/common_linuxapp.config dpdk-1.7.0/config/common_linuxapp ---- dpdk-1.7.0/config/common_linuxapp.config 2014-07-04 04:18:07.000000000 -0400 -+++ dpdk-1.7.0/config/common_linuxapp 2014-07-17 14:43:44.359455939 -0400 +diff -up dpdk-2.0.0/config/common_linuxapp.orig dpdk-2.0.0/config/common_linuxapp +--- dpdk-2.0.0/config/common_linuxapp.orig 2015-04-03 10:13:45.000000000 -0400 ++++ dpdk-2.0.0/config/common_linuxapp 2015-04-06 10:52:14.073329962 -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! @@ -10,7 +10,7 @@ diff -up dpdk-1.7.0/config/common_linuxapp.config dpdk-1.7.0/config/common_linux # ## ## define the architecture we compile for. -@@ -123,7 +123,7 @@ CONFIG_RTE_LOG_HISTORY=256 +@@ -98,7 +98,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 @@ -19,7 +19,7 @@ diff -up dpdk-1.7.0/config/common_linuxapp.config dpdk-1.7.0/config/common_linux CONFIG_RTE_EAL_VFIO=y # -@@ -170,8 +170,8 @@ CONFIG_RTE_NIC_BYPASS=n +@@ -147,8 +147,8 @@ CONFIG_RTE_NIC_BYPASS=n # # Compile burst-oriented IGB & EM PMD drivers # @@ -30,7 +30,7 @@ diff -up dpdk-1.7.0/config/common_linuxapp.config dpdk-1.7.0/config/common_linux CONFIG_RTE_LIBRTE_E1000_DEBUG_INIT=n CONFIG_RTE_LIBRTE_E1000_DEBUG_RX=n CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n -@@ -182,7 +182,7 @@ CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP +@@ -159,7 +159,7 @@ CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP # # Compile burst-oriented IXGBE PMD driver # @@ -39,7 +39,7 @@ diff -up dpdk-1.7.0/config/common_linuxapp.config dpdk-1.7.0/config/common_linux CONFIG_RTE_LIBRTE_IXGBE_DEBUG_INIT=n CONFIG_RTE_LIBRTE_IXGBE_DEBUG_RX=n CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX=n -@@ -197,7 +197,7 @@ CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=y +@@ -173,7 +173,7 @@ CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=y # # Compile burst-oriented I40E PMD driver # @@ -48,7 +48,7 @@ diff -up dpdk-1.7.0/config/common_linuxapp.config dpdk-1.7.0/config/common_linux CONFIG_RTE_LIBRTE_I40E_DEBUG_INIT=n CONFIG_RTE_LIBRTE_I40E_DEBUG_RX=n CONFIG_RTE_LIBRTE_I40E_DEBUG_TX=n -@@ -241,7 +241,7 @@ CONFIG_RTE_PMD_RING_MAX_TX_RINGS=16 +@@ -242,7 +242,7 @@ CONFIG_RTE_PMD_RING_MAX_TX_RINGS=16 # # Compile software PMD backed by PCAP files # @@ -57,33 +57,39 @@ diff -up dpdk-1.7.0/config/common_linuxapp.config dpdk-1.7.0/config/common_linux # # Compile link bonding PMD library -@@ -320,7 +320,7 @@ CONFIG_RTE_LIBRTE_LPM_DEBUG=n +@@ -338,7 +338,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 - CONFIG_RTE_LIBRTE_ACL_STANDALONE=n -@@ -381,7 +381,7 @@ CONFIG_RTE_LIBRTE_PIPELINE=y + # +@@ -403,8 +403,8 @@ CONFIG_RTE_LIBRTE_PIPELINE=y # # Compile librte_kni # -CONFIG_RTE_LIBRTE_KNI=y +-CONFIG_RTE_KNI_PREEMPT_DEFAULT=y +CONFIG_RTE_LIBRTE_KNI=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-1.7.0/config/defconfig_x86_64-native-linuxapp-gcc.config dpdk-1.7.0/config/defconfig_x86_64-native-linuxapp-gcc ---- dpdk-1.7.0/config/defconfig_x86_64-native-linuxapp-gcc.config 2014-07-04 04:18:07.000000000 -0400 -+++ dpdk-1.7.0/config/defconfig_x86_64-native-linuxapp-gcc 2014-07-17 14:40:09.881651791 -0400 -@@ -46,7 +46,7 @@ - # Note: if your compiler does not support the relevant -march options, - # it will be compiled with whatever latest processor the compiler supports! +diff -up dpdk-2.0.0/config/defconfig_x86_64-native-linuxapp-gcc.orig dpdk-2.0.0/config/defconfig_x86_64-native-linuxapp-gcc +--- dpdk-2.0.0/config/defconfig_x86_64-native-linuxapp-gcc.orig 2015-04-03 10:13:45.000000000 -0400 ++++ dpdk-2.0.0/config/defconfig_x86_64-native-linuxapp-gcc 2015-04-06 10:53:01.495666675 -0400 +@@ -31,8 +31,10 @@ # --CONFIG_RTE_MACHINE="native" -+#CONFIG_RTE_MACHINE="native" - # - # define the architecture we compile for. + #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 diff --git a/dpdk.spec b/dpdk.spec index f26961c..8129dd1 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -1,16 +1,17 @@ # Add option to enable combined library (--with combined) %bcond_with combined -# Add option to build as shared libraries (--with shared) -%bcond_with shared +# Add option to build as static libraries (--without shared) +%bcond_without shared Name: dpdk -Version: 1.7.0 -Release: 8%{?dist} +Version: 2.0.0 +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 +Patch3: null_array-bounds.patch Summary: Set of libraries and drivers for fast packet processing @@ -34,7 +35,8 @@ ExclusiveArch: x86_64 -BuildRequires: kernel-headers, libpcap-devel, doxygen +BuildRequires: kernel-headers, libpcap-devel, doxygen, texlive-dejavu +BuildRequires: python-sphinx inkscape %description The Data Plane Development Kit is a set of libraries and drivers for @@ -64,6 +66,8 @@ API programming documentation for the Data Plane Development Kit. %prep %setup -q %patch1 -p1 -z .config +%patch2 -p1 -z .enic +%patch3 -p1 -z .null %if %{with shared} sed -i 's:^CONFIG_RTE_BUILD_SHARED_LIB=n$:CONFIG_RTE_BUILD_SHARED_LIB=y:g' config/common_linuxapp @@ -157,7 +161,7 @@ install -m 644 ${comblib} %{buildroot}/%{_libdir}/%{name}-%{version}/${comblib} %{_bindir}/* %dir %{_libdir}/%{name}-%{version} %if %{with shared} -%{_libdir}/%{name}-%{version}/*.so +%{_libdir}/%{name}-%{version}/*.so.* %endif %files doc @@ -171,9 +175,15 @@ install -m 644 ${comblib} %{buildroot}/%{_libdir}/%{name}-%{version}/${comblib} %{_sysconfdir}/profile.d/dpdk-sdk-*.* %if ! %{with shared} %{_libdir}/%{name}-%{version}/*.a +%else +%{_libdir}/%{name}-%{version}/*.so %endif %changelog +* Mon Apr 06 2015 Neil Horman - 2.0.0-1 +- Update to dpdk 2.0 +- converted --with shared option to --without shared option + * Wed Jan 28 2015 Panu Matilainen - 1.7.0-8 - Always build with -fPIC diff --git a/enic-pun-fix.patch b/enic-pun-fix.patch new file mode 100644 index 0000000..b8fd828 --- /dev/null +++ b/enic-pun-fix.patch @@ -0,0 +1,24 @@ +diff -up dpdk-2.0.0/build/.config.orig dpdk-2.0.0/build/.config +diff -up dpdk-2.0.0/lib/librte_pmd_enic/enic_ethdev.c.orig dpdk-2.0.0/lib/librte_pmd_enic/enic_ethdev.c +--- dpdk-2.0.0/lib/librte_pmd_enic/enic_ethdev.c.orig 2015-04-06 14:01:57.388519083 -0400 ++++ dpdk-2.0.0/lib/librte_pmd_enic/enic_ethdev.c 2015-04-06 14:05:50.939207323 -0400 +@@ -313,13 +313,15 @@ static void enicpmd_dev_stop(struct rte_ + { + struct rte_eth_link link; + struct enic *enic = pmd_priv(eth_dev); ++ uint64_t *dev_link_ptr = (uint64_t *)ð_dev->data->dev_link; ++ uint64_t *link_ptr = (uint64_t *)&link; + + ENICPMD_FUNC_TRACE(); + enic_disable(enic); + memset(&link, 0, sizeof(link)); +- rte_atomic64_cmpset((uint64_t *)ð_dev->data->dev_link, +- *(uint64_t *)ð_dev->data->dev_link, +- *(uint64_t *)&link); ++ rte_atomic64_cmpset(dev_link_ptr, ++ *dev_link_ptr, ++ *link_ptr); + } + + /* +diff -up dpdk-2.0.0/test/.config.orig dpdk-2.0.0/test/.config diff --git a/null_array-bounds.patch b/null_array-bounds.patch new file mode 100644 index 0000000..5383a0d --- /dev/null +++ b/null_array-bounds.patch @@ -0,0 +1,19 @@ +diff -up dpdk-2.0.0/lib/librte_pmd_null/rte_eth_null.c.orig dpdk-2.0.0/lib/librte_pmd_null/rte_eth_null.c +--- dpdk-2.0.0/lib/librte_pmd_null/rte_eth_null.c.orig 2015-04-07 15:54:49.437739442 -0400 ++++ dpdk-2.0.0/lib/librte_pmd_null/rte_eth_null.c 2015-04-07 15:55:48.880447043 -0400 +@@ -71,8 +71,13 @@ struct pmd_internals { + unsigned nb_rx_queues; + unsigned nb_tx_queues; + +- struct null_queue rx_null_queues[1]; +- struct null_queue tx_null_queues[1]; ++ /* ++ * NH these should both be 1, but we want to work ++ * around a gcc compiler error here ++ * as -Werror=array-bounds trips over this when its 1 ++ */ ++ struct null_queue rx_null_queues[2]; ++ struct null_queue tx_null_queues[2]; + }; + + diff --git a/sources b/sources index 3424e9e..f2ef9c8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fb44b52b0f19508d0ffab2af24b29205 dpdk-1.7.0.tar.gz +e9e7935c9eec920841ad373949514934 dpdk-2.0.0.tar.gz