diff --git a/0002-fix-cpu-compatibility.patch b/0002-fix-cpu-compatibility.patch new file mode 100644 index 0000000..6deba31 --- /dev/null +++ b/0002-fix-cpu-compatibility.patch @@ -0,0 +1,60 @@ +From: mvarlese@suse.de + +diff -Nuar dpdk-18.11.old/drivers/bus/vdev/vdev.c dpdk-18.11/drivers/bus/vdev/vdev.c +--- dpdk-18.11.old/drivers/bus/vdev/vdev.c 2019-02-20 14:26:48.849061397 +0100 ++++ dpdk-18.11/drivers/bus/vdev/vdev.c 2019-02-20 14:33:12.638554838 +0100 +@@ -55,7 +55,11 @@ + static rte_spinlock_t vdev_custom_scan_lock = RTE_SPINLOCK_INITIALIZER; + + /* register a driver */ ++#if defined(__x86_64__) || defined(__i386__) ++void __attribute__((target ("sse2"))) ++#else + void ++#endif + rte_vdev_register(struct rte_vdev_driver *driver) + { + TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next); +diff -Nuar dpdk-18.11.old/lib/librte_eal/common/eal_common_bus.c dpdk-18.11/lib/librte_eal/common/eal_common_bus.c +--- dpdk-18.11.old/lib/librte_eal/common/eal_common_bus.c 2019-02-20 14:26:48.801061210 +0100 ++++ dpdk-18.11/lib/librte_eal/common/eal_common_bus.c 2019-02-20 14:28:52.933544223 +0100 +@@ -43,8 +43,11 @@ + + static struct rte_bus_list rte_bus_list = + TAILQ_HEAD_INITIALIZER(rte_bus_list); +- ++#if defined(__x86_64__) || defined(__i386__) ++void __attribute__((target ("sse2"))) ++#else + void ++#endif + rte_bus_register(struct rte_bus *bus) + { + RTE_VERIFY(bus); +diff -Nuar dpdk-18.11.old/lib/librte_eal/common/include/rte_common.h dpdk-18.11/lib/librte_eal/common/include/rte_common.h +--- dpdk-18.11.old/lib/librte_eal/common/include/rte_common.h 2019-02-20 14:26:48.809061243 +0100 ++++ dpdk-18.11/lib/librte_eal/common/include/rte_common.h 2019-02-20 14:51:56.275496936 +0100 +@@ -103,8 +103,21 @@ + * Priority number must be above 100. + * Lowest number is the first to run. + */ ++#if defined(__x86_64__) || defined(__i386__) + #define RTE_INIT_PRIO(func, prio) \ +-static void __attribute__((constructor(RTE_PRIO(prio)), used)) func(void) ++static void \ ++ __attribute__((constructor(RTE_PRIO(prio)), used)) \ ++ __attribute__((target ("sse2"))) \ ++ __attribute__((target ("no-sse3"))) \ ++ __attribute__((target ("no-sse4"))) \ ++ func(void) ++#else ++#define RTE_INIT_PRIO(func, prio) \ ++static void \ ++ __attribute__((constructor(RTE_PRIO(prio)), used)) \ ++ func(void) ++#endif ++ + + /** + * Run function before main() with low priority. + diff --git a/dpdk-thunderx.changes b/dpdk-thunderx.changes index 57d53c0..64c9d44 100644 --- a/dpdk-thunderx.changes +++ b/dpdk-thunderx.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Feb 22 10:57:13 CET 2019 - ndas@suse.de + +- Add 0002-fix-cpu-compatibility.patch to address issue with older + CPUs (bsc#1125961) + [+ 0002-fix-cpu-compatibility.patch] + ------------------------------------------------------------------- Thu Jan 24 14:17:48 CET 2019 - ndas@suse.de diff --git a/dpdk-thunderx.spec b/dpdk-thunderx.spec index 1102f7a..6a873d0 100644 --- a/dpdk-thunderx.spec +++ b/dpdk-thunderx.spec @@ -58,6 +58,7 @@ Group: System/Libraries Url: http://dpdk.org Source: http://fast.dpdk.org/rel/dpdk-%{version}.tar.xz Source1: preamble +Patch1: 0002-fix-cpu-compatibility.patch BuildRequires: doxygen BuildRequires: fdupes BuildRequires: libelf-devel @@ -155,6 +156,7 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the %prep # can't use %{name} because of dpdk-thunderx %setup -q -n dpdk-%{version} +%patch1 -p1 -z .init # This fixes CROSS compilation (broken) in the mk file for ThunderX sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk diff --git a/dpdk.changes b/dpdk.changes index 57d53c0..64c9d44 100644 --- a/dpdk.changes +++ b/dpdk.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Feb 22 10:57:13 CET 2019 - ndas@suse.de + +- Add 0002-fix-cpu-compatibility.patch to address issue with older + CPUs (bsc#1125961) + [+ 0002-fix-cpu-compatibility.patch] + ------------------------------------------------------------------- Thu Jan 24 14:17:48 CET 2019 - ndas@suse.de diff --git a/dpdk.spec b/dpdk.spec index 32c8146..f92f151 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -56,6 +56,7 @@ Group: System/Libraries Url: http://dpdk.org Source: http://fast.dpdk.org/rel/dpdk-%{version}.tar.xz Source1: preamble +Patch1: 0002-fix-cpu-compatibility.patch BuildRequires: doxygen BuildRequires: fdupes BuildRequires: libelf-devel @@ -153,6 +154,7 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the %prep # can't use %{name} because of dpdk-thunderx %setup -q -n dpdk-%{version} +%patch1 -p1 -z .init # This fixes CROSS compilation (broken) in the mk file for ThunderX sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk