Skip to contentSkip to conversation

mk: add tuning for default machine type

RFC Superseded Ferruh Yigit 1 participant 3 messages Dec 15, 2017 – Dec 16, 2017

lore
Share & tools
lore
#0 lore raw

RFC 1/1 mk: add tuning for default machine type

Wile keeping backward compatibility for default machine type, tune binary for latest generation of cores to benefit more from them.

---

Cc Bruce Richardson <[email protected]>
Cc Konstantin Ananyev <[email protected]>
---
 mk/machine/default/rte.vars.mk | 6 ++++++
 1 file changed, 6 insertions(+)
mk/machine/default/rte.vars.mk +6 -0
index 71a25bcae..d174532f2 100644
@@ -56,3 +56,9 @@
 # CPU_ASFLAGS =
 
 MACHINE_CFLAGS += -march=corei7
+
+-include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.toolchain-compat.mk
+
+ifeq ($(shell test $(GCC_VERSION) -ge 49 && echo 1), 1)
+MACHINE_CFLAGS += -mtune=intel
+endif
Signature · 1 line
2.14.3
#1 lore raw

PATCH v2 1/1 mk: add tuning for default machine type

Wile keeping backward compatibility for default machine type, tune binary for latest generation of cores to benefit more from them.

---

Cc Bruce Richardson <[email protected]>
Cc Konstantin Ananyev <[email protected]>

v2:
* prevent warning via clang:
bin/sh: line 0: test: -ge: unary operator expected

---
 mk/machine/default/rte.vars.mk | 6 ++++++
 1 file changed, 6 insertions(+)
mk/machine/default/rte.vars.mk +6 -0
index 71a25bcae..914964302 100644
@@ -56,3 +56,9 @@
 # CPU_ASFLAGS =
 
 MACHINE_CFLAGS += -march=corei7
+
+-include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.toolchain-compat.mk
+
+ifeq ($(shell test -n "$(GCC_VERSION)" && test $(GCC_VERSION) -ge 49 && echo 1), 1)
+MACHINE_CFLAGS += -mtune=intel
+endif
Signature · 1 line
2.14.3
#2 lore raw

RFC v3 1/1 mk: add tuning for default machine type

Wile keeping backward compatibility for default machine type, tune binary for latest generation of cores to benefit more from them.

---

Cc Bruce Richardson <[email protected]>
Cc Konstantin Ananyev <[email protected]>

v2:
* prevent warning via clang:
bin/sh: line 0: test: -ge: unary operator expected

v3:
* add missing RFC tag to the patch title

---
 mk/machine/default/rte.vars.mk | 6 ++++++
 1 file changed, 6 insertions(+)
mk/machine/default/rte.vars.mk +6 -0
index 71a25bcae..914964302 100644
@@ -56,3 +56,9 @@
 # CPU_ASFLAGS =
 
 MACHINE_CFLAGS += -march=corei7
+
+-include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.toolchain-compat.mk
+
+ifeq ($(shell test -n "$(GCC_VERSION)" && test $(GCC_VERSION) -ge 49 && echo 1), 1)
+MACHINE_CFLAGS += -mtune=intel
+endif
Signature · 1 line
2.14.3