[dpdk-dev] config: cleanup existing RTE_CACHE_LINE_SIZE selection scheme
Commit Message
by default, all the targets will be configured with the 64-byte cache line
size, targets which have different cache line size can be overridden
through target specific config file.
Selected ThunderX and power8 as CONFIG_RTE_CACHE_LINE_SIZE=128 targets
based on existing configuration.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
config/common_bsdapp | 5 +++++
config/common_linuxapp | 6 +++++-
config/defconfig_arm64-armv8a-linuxapp-gcc | 2 --
config/defconfig_ppc_64-power8-linuxapp-gcc | 2 ++
lib/librte_eal/common/include/rte_memory.h | 3 ---
lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h | 4 ----
mk/arch/arm/rte.vars.mk | 2 +-
mk/arch/ppc_64/rte.vars.mk | 2 +-
mk/machine/armv8a/rte.vars.mk | 2 +-
mk/machine/thunderx/rte.vars.mk | 2 +-
mk/machine/xgene1/rte.vars.mk | 2 +-
11 files changed, 17 insertions(+), 15 deletions(-)
Comments
2015-12-07 19:52, Jerin Jacob:
> by default, all the targets will be configured with the 64-byte cache line
> size, targets which have different cache line size can be overridden
> through target specific config file.
>
> Selected ThunderX and power8 as CONFIG_RTE_CACHE_LINE_SIZE=128 targets
> based on existing configuration.
>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
It looks good.
We are moving from a constant defined on CC command line in most cases
to a constant included in rte_config.h only.
Have you checked that the generated libraries are identical?
It would be good to have a check for POWER8. Chao?
Thanks
On Mon, Dec 07, 2015 at 03:45:10PM +0100, Thomas Monjalon wrote:
> 2015-12-07 19:52, Jerin Jacob:
> > by default, all the targets will be configured with the 64-byte cache line
> > size, targets which have different cache line size can be overridden
> > through target specific config file.
> >
> > Selected ThunderX and power8 as CONFIG_RTE_CACHE_LINE_SIZE=128 targets
> > based on existing configuration.
> >
> > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
>
> It looks good.
> We are moving from a constant defined on CC command line in most cases
> to a constant included in rte_config.h only.
> Have you checked that the generated libraries are identical?
Yes, Tested with a 64byte(x86_64-native-linuxapp-gcc) and a 128byte
(arm64-thunderx-linuxapp-gcc) target.
md5sum build/app/test comes same with or without patch.
> It would be good to have a check for POWER8. Chao?
> Thanks
On Tue, Dec 08, 2015 at 03:03:34PM +0530, Jerin Jacob wrote:
> On Mon, Dec 07, 2015 at 03:45:10PM +0100, Thomas Monjalon wrote:
> > 2015-12-07 19:52, Jerin Jacob:
> > > by default, all the targets will be configured with the 64-byte cache line
> > > size, targets which have different cache line size can be overridden
> > > through target specific config file.
> > >
> > > Selected ThunderX and power8 as CONFIG_RTE_CACHE_LINE_SIZE=128 targets
> > > based on existing configuration.
> > >
> > > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> >
> > It looks good.
> > We are moving from a constant defined on CC command line in most cases
> > to a constant included in rte_config.h only.
> > Have you checked that the generated libraries are identical?
>
> Yes, Tested with a 64byte(x86_64-native-linuxapp-gcc) and a 128byte
> (arm64-thunderx-linuxapp-gcc) target.
> md5sum build/app/test comes same with or without patch.
ping
>
> > It would be good to have a check for POWER8. Chao?
> > Thanks
On Fri, Jan 29, 2016 at 09:54:55AM +0530, Jerin Jacob wrote:
> On Tue, Dec 08, 2015 at 03:03:34PM +0530, Jerin Jacob wrote:
> > On Mon, Dec 07, 2015 at 03:45:10PM +0100, Thomas Monjalon wrote:
> > > 2015-12-07 19:52, Jerin Jacob:
> > > > by default, all the targets will be configured with the 64-byte cache line
> > > > size, targets which have different cache line size can be overridden
> > > > through target specific config file.
> > > >
> > > > Selected ThunderX and power8 as CONFIG_RTE_CACHE_LINE_SIZE=128 targets
> > > > based on existing configuration.
> > > >
> > > > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > >
> > > It looks good.
> > > We are moving from a constant defined on CC command line in most cases
> > > to a constant included in rte_config.h only.
> > > Have you checked that the generated libraries are identical?
> >
> > Yes, Tested with a 64byte(x86_64-native-linuxapp-gcc) and a 128byte
> > (arm64-thunderx-linuxapp-gcc) target.
> > md5sum build/app/test comes same with or without patch.
>
> ping
Thomas, Can you review this, This is a long pending item.
This rework based on your request.
Jerin
>
> >
> > > It would be good to have a check for POWER8. Chao?
> > > Thanks
2015-12-08 15:03, Jerin Jacob:
> On Mon, Dec 07, 2015 at 03:45:10PM +0100, Thomas Monjalon wrote:
> > 2015-12-07 19:52, Jerin Jacob:
> > > by default, all the targets will be configured with the 64-byte cache line
> > > size, targets which have different cache line size can be overridden
> > > through target specific config file.
> > >
> > > Selected ThunderX and power8 as CONFIG_RTE_CACHE_LINE_SIZE=128 targets
> > > based on existing configuration.
> > >
> > > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> >
> > It looks good.
> > We are moving from a constant defined on CC command line in most cases
> > to a constant included in rte_config.h only.
> > Have you checked that the generated libraries are identical?
>
> Yes, Tested with a 64byte(x86_64-native-linuxapp-gcc) and a 128byte
> (arm64-thunderx-linuxapp-gcc) target.
> md5sum build/app/test comes same with or without patch.
>
> > It would be good to have a check for POWER8. Chao?
> > Thanks
It seems we won't have a test on POWER8.
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-02-08 12:44, Thomas Monjalon:
> 2015-12-08 15:03, Jerin Jacob:
> > On Mon, Dec 07, 2015 at 03:45:10PM +0100, Thomas Monjalon wrote:
> > > 2015-12-07 19:52, Jerin Jacob:
> > > > by default, all the targets will be configured with the 64-byte cache line
> > > > size, targets which have different cache line size can be overridden
> > > > through target specific config file.
> > > >
> > > > Selected ThunderX and power8 as CONFIG_RTE_CACHE_LINE_SIZE=128 targets
> > > > based on existing configuration.
> > > >
> > > > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > >
> > > It looks good.
> > > We are moving from a constant defined on CC command line in most cases
> > > to a constant included in rte_config.h only.
> > > Have you checked that the generated libraries are identical?
> >
> > Yes, Tested with a 64byte(x86_64-native-linuxapp-gcc) and a 128byte
> > (arm64-thunderx-linuxapp-gcc) target.
> > md5sum build/app/test comes same with or without patch.
> >
> > > It would be good to have a check for POWER8. Chao?
> > > Thanks
>
> It seems we won't have a test on POWER8.
>
> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Applied, thanks
@@ -94,6 +94,11 @@ CONFIG_RTE_BUILD_COMBINE_LIBS=n
CONFIG_RTE_NEXT_ABI=y
#
+# Machine's cache line size
+#
+CONFIG_RTE_CACHE_LINE_SIZE=64
+
+#
# Compile Environment Abstraction Layer
#
CONFIG_RTE_LIBRTE_EAL=y
@@ -94,6 +94,11 @@ CONFIG_RTE_BUILD_COMBINE_LIBS=n
CONFIG_RTE_NEXT_ABI=y
#
+# Machine's cache line size
+#
+CONFIG_RTE_CACHE_LINE_SIZE=64
+
+#
# Compile Environment Abstraction Layer
#
CONFIG_RTE_LIBRTE_EAL=y
@@ -110,7 +115,6 @@ CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n
CONFIG_RTE_EAL_IGB_UIO=y
CONFIG_RTE_EAL_VFIO=y
CONFIG_RTE_MALLOC_DEBUG=n
-
# Default driver path (or "" to disable)
CONFIG_RTE_EAL_PMD_PATH=""
@@ -43,8 +43,6 @@ CONFIG_RTE_FORCE_INTRINSICS=y
CONFIG_RTE_TOOLCHAIN="gcc"
CONFIG_RTE_TOOLCHAIN_GCC=y
-CONFIG_RTE_CACHE_LINE_SIZE=64
-
CONFIG_RTE_IXGBE_INC_VECTOR=n
CONFIG_RTE_LIBRTE_VIRTIO_PMD=n
CONFIG_RTE_LIBRTE_IVSHMEM=n
@@ -36,6 +36,8 @@ CONFIG_RTE_ARCH="ppc_64"
CONFIG_RTE_ARCH_PPC_64=y
CONFIG_RTE_ARCH_64=y
+CONFIG_RTE_CACHE_LINE_SIZE=128
+
CONFIG_RTE_TOOLCHAIN="gcc"
CONFIG_RTE_TOOLCHAIN_GCC=y
@@ -68,9 +68,6 @@ enum rte_page_sizes {
};
#define SOCKET_ID_ANY -1 /**< Any NUMA socket. */
-#ifndef RTE_CACHE_LINE_SIZE
-#define RTE_CACHE_LINE_SIZE 64 /**< Cache line size. */
-#endif
#define RTE_CACHE_LINE_MASK (RTE_CACHE_LINE_SIZE-1) /**< Cache line mask. */
#define RTE_CACHE_LINE_ROUNDUP(size) \
@@ -68,10 +68,6 @@
*/
#define RTE_KNI_NAMESIZE 32
-#ifndef RTE_CACHE_LINE_SIZE
-#define RTE_CACHE_LINE_SIZE 64 /**< Cache line size. */
-#endif
-
/*
* Request id.
*/
@@ -32,7 +32,7 @@
ARCH ?= arm
CROSS ?=
-CPU_CFLAGS ?= -marm -DRTE_CACHE_LINE_SIZE=64 -munaligned-access
+CPU_CFLAGS ?= -marm -munaligned-access
CPU_LDFLAGS ?=
CPU_ASFLAGS ?= -felf
@@ -32,7 +32,7 @@
ARCH ?= powerpc
CROSS ?=
-CPU_CFLAGS ?= -m64 -DRTE_CACHE_LINE_SIZE=128
+CPU_CFLAGS ?= -m64
CPU_LDFLAGS ?=
CPU_ASFLAGS ?= -felf64
@@ -55,4 +55,4 @@
# CPU_LDFLAGS =
# CPU_ASFLAGS =
-MACHINE_CFLAGS += -march=armv8-a+crc -DRTE_CACHE_LINE_SIZE=64
+MACHINE_CFLAGS += -march=armv8-a+crc
@@ -55,4 +55,4 @@ CROSS ?= aarch64-thunderx-linux-gnu-
# CPU_LDFLAGS =
# CPU_ASFLAGS =
-MACHINE_CFLAGS += -march=armv8-a+crc -mcpu=thunderx -DRTE_CACHE_LINE_SIZE=128
+MACHINE_CFLAGS += -march=armv8-a+crc -mcpu=thunderx
@@ -55,4 +55,4 @@
# CPU_LDFLAGS =
# CPU_ASFLAGS =
-MACHINE_CFLAGS += -march=armv8-a -DRTE_CACHE_LINE_SIZE=64
+MACHINE_CFLAGS += -march=armv8-a