[4/8] examples/performance-thread: rename directory to standard

Message ID 20191014113448.7442-5-bruce.richardson@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series support all examples in a meson build |

Checks

Context Check Description
ci/Intel-compilation fail apply issues
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson Oct. 14, 2019, 11:34 a.m. UTC
  In other places in DPDK, e.g. EAL, the architecture-specific files for arm
are just stored in a folder called "arm". Rename the "arm64" folder for
performance thread example to align to this naming.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/performance-thread/common/arch/{arm64 => arm}/ctx.c   | 0
 examples/performance-thread/common/arch/{arm64 => arm}/ctx.h   | 0
 examples/performance-thread/common/arch/{arm64 => arm}/stack.h | 0
 examples/performance-thread/common/common.mk                   | 2 +-
 4 files changed, 1 insertion(+), 1 deletion(-)
 rename examples/performance-thread/common/arch/{arm64 => arm}/ctx.c (100%)
 rename examples/performance-thread/common/arch/{arm64 => arm}/ctx.h (100%)
 rename examples/performance-thread/common/arch/{arm64 => arm}/stack.h (100%)
  

Comments

Jerin Jacob Oct. 14, 2019, 4:16 p.m. UTC | #1
On Mon, Oct 14, 2019 at 5:05 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> In other places in DPDK, e.g. EAL, the architecture-specific files for arm
> are just stored in a folder called "arm". Rename the "arm64" folder for
> performance thread example to align to this naming.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  examples/performance-thread/common/arch/{arm64 => arm}/ctx.c   | 0
>  examples/performance-thread/common/arch/{arm64 => arm}/ctx.h   | 0
>  examples/performance-thread/common/arch/{arm64 => arm}/stack.h | 0
>  examples/performance-thread/common/common.mk                   | 2 +-
>  4 files changed, 1 insertion(+), 1 deletion(-)
>  rename examples/performance-thread/common/arch/{arm64 => arm}/ctx.c (100%)

This code only works for arm64 as it is storing and restoring arm64 registers.
armv7 registers are different so this code does not work for the generic arm.

arm64 specific code, we always named as arm64

F: lib/librte_hash/rte*_arm64.h
F: lib/librte_efd/rte*_arm64.h
F: lib/librte_table/rte*_arm64.h

IMO, If armv7 support adds in future then we can change the directory
as arch/arm
and have ctx_64.c and ctx_32.c etc. I think, for now, technically it
is correct to call the directory as arm64
  
Bruce Richardson Oct. 14, 2019, 4:41 p.m. UTC | #2
On Mon, Oct 14, 2019 at 09:46:50PM +0530, Jerin Jacob wrote:
> On Mon, Oct 14, 2019 at 5:05 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > In other places in DPDK, e.g. EAL, the architecture-specific files for arm
> > are just stored in a folder called "arm". Rename the "arm64" folder for
> > performance thread example to align to this naming.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> >  examples/performance-thread/common/arch/{arm64 => arm}/ctx.c   | 0
> >  examples/performance-thread/common/arch/{arm64 => arm}/ctx.h   | 0
> >  examples/performance-thread/common/arch/{arm64 => arm}/stack.h | 0
> >  examples/performance-thread/common/common.mk                   | 2 +-
> >  4 files changed, 1 insertion(+), 1 deletion(-)
> >  rename examples/performance-thread/common/arch/{arm64 => arm}/ctx.c (100%)
> 
> This code only works for arm64 as it is storing and restoring arm64 registers.
> armv7 registers are different so this code does not work for the generic arm.
> 
> arm64 specific code, we always named as arm64
> 
> F: lib/librte_hash/rte*_arm64.h
> F: lib/librte_efd/rte*_arm64.h
> F: lib/librte_table/rte*_arm64.h
> 
> IMO, If armv7 support adds in future then we can change the directory
> as arch/arm
> and have ctx_64.c and ctx_32.c etc. I think, for now, technically it
> is correct to call the directory as arm64

Ok, fair enough. The code isn't meant to build for ARMv7 so I thought I'd
save some logic by just using x86 and arm, rather than having to compute
the directory names individually.

I'll rework the patch.

/Bruce
  

Patch

diff --git a/examples/performance-thread/common/arch/arm64/ctx.c b/examples/performance-thread/common/arch/arm/ctx.c
similarity index 100%
rename from examples/performance-thread/common/arch/arm64/ctx.c
rename to examples/performance-thread/common/arch/arm/ctx.c
diff --git a/examples/performance-thread/common/arch/arm64/ctx.h b/examples/performance-thread/common/arch/arm/ctx.h
similarity index 100%
rename from examples/performance-thread/common/arch/arm64/ctx.h
rename to examples/performance-thread/common/arch/arm/ctx.h
diff --git a/examples/performance-thread/common/arch/arm64/stack.h b/examples/performance-thread/common/arch/arm/stack.h
similarity index 100%
rename from examples/performance-thread/common/arch/arm64/stack.h
rename to examples/performance-thread/common/arch/arm/stack.h
diff --git a/examples/performance-thread/common/common.mk b/examples/performance-thread/common/common.mk
index 5e2b18a9f..021e61aea 100644
--- a/examples/performance-thread/common/common.mk
+++ b/examples/performance-thread/common/common.mk
@@ -11,7 +11,7 @@  MKFILE_PATH=$(abspath $(dir $(lastword $(MAKEFILE_LIST))))
 ifeq ($(CONFIG_RTE_ARCH_X86_64),y)
 ARCH_PATH += $(MKFILE_PATH)/arch/x86
 else ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
-ARCH_PATH += $(MKFILE_PATH)/arch/arm64
+ARCH_PATH += $(MKFILE_PATH)/arch/arm
 endif
 
 VPATH := $(MKFILE_PATH) $(ARCH_PATH)