[EXPERIMENTAL,3/3] helper: platform: dpdk: build with consistent CFLAGS

Message ID 1470323563-32164-3-git-send-email-zoltan.kiss@linaro.org
State New
Headers show

Commit Message

Zoltan Kiss Aug. 4, 2016, 3:12 p.m.
By default RTE_MACHINE is "native", which means "-march=native" will be
passed to gcc. That means the code will be optimized to the CPU of the
build machine, which could be one of the following on x86:
- Atom
- Haswell
- Ivy Bridge
- Nehalem
- Sandy Bridge
- Westmere

On ARMv8 there are also different optimizations.
From packaging point of view, we either have to compile one with "default"
or "armv8" to support everything, or create several different packages for
each microarchitecture. The second would be better, so we don't lose out
on performance.
From CI point of view, either we should run it with default, or run
separate jobs with each. Again, the second would be better to have better
code coverage, but it would need the CI to run on an machine which supports all
these instruction set extensions. That means a Haswell CPU at the moment on x86.

Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
 helper/platform/dpdk | 1 +
 1 file changed, 1 insertion(+)


diff --git a/helper/platform/dpdk b/helper/platform/dpdk
index 192a305..1d0c2e7 100644
--- a/helper/platform/dpdk
+++ b/helper/platform/dpdk
@@ -39,6 +39,7 @@  dpdk_build() {
     make -j ${NUM_CPUS} config T="${dpdk_target}" O="${dpdk_target}"
     sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' "${dpdk_target}"/.config
     sed -ri 's,(CONFIG_RTE_BUILD_SHARED_LIB=).*,\1y,' "${dpdk_target}"/.config
+    sed -ri 's,(CONFIG_RTE_MACHINE=\").*,\1default\",' "${dpdk_target}"/.config
     sed -ri 's,(CONFIG_RTE_MAX_MEMSEG=).*,\11024,' "${dpdk_target}"/.config
 # I had some issue with cxgbe compilation on ARM, might have been fixed now
 #    sed -ri 's,(CONFIG_RTE_LIBRTE_CXGBE_PMD=).*,\1n,' "${dpdk_target}"/.config