[dpdk-dev] mk: Introduce NXP dpaa2 architecture based on armv8-a

Message ID 1462801702-30918-1-git-send-email-hemant.agrawal@nxp.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Hemant Agrawal May 9, 2016, 1:48 p.m. UTC
  This patch introduces dpaa2 machine target to address difference
in cpu parameter, number of core to 8 and no numa support
w.r.t default armv8-a machine

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 config/defconfig_arm64-dpaa2-linuxapp-gcc | 44 +++++++++++++++++++++++
 mk/machine/dpaa2/rte.vars.mk              | 60 +++++++++++++++++++++++++++++++
 mk/rte.module.mk                          |  5 +++
 3 files changed, 109 insertions(+)
 create mode 100644 config/defconfig_arm64-dpaa2-linuxapp-gcc
 create mode 100644 mk/machine/dpaa2/rte.vars.mk
  

Comments

Santosh Shukla May 9, 2016, 8:20 a.m. UTC | #1
On Mon, May 9, 2016 at 7:18 PM, Hemant Agrawal <hemant.agrawal@nxp.com>
wrote:

> This patch introduces dpaa2 machine target to address difference
> in cpu parameter, number of core to 8 and no numa support
> w.r.t default armv8-a machine
>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
>  config/defconfig_arm64-dpaa2-linuxapp-gcc | 44 +++++++++++++++++++++++
>  mk/machine/dpaa2/rte.vars.mk              | 60
> +++++++++++++++++++++++++++++++
>  mk/rte.module.mk                          |  5 +++
>  3 files changed, 109 insertions(+)
>  create mode 100644 config/defconfig_arm64-dpaa2-linuxapp-gcc
>  create mode 100644 mk/machine/dpaa2/rte.vars.mk
>
> diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc
> b/config/defconfig_arm64-dpaa2-linuxapp-gcc
> new file mode 100644
> index 0000000..80bda26
> --- /dev/null
> +++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc
> @@ -0,0 +1,44 @@
> +#   BSD LICENSE
> +#
> +#   Copyright(c) 2016 Freescale Semiconductor, Inc. All rights reserved.
> +#
> +#   Redistribution and use in source and binary forms, with or without
> +#   modification, are permitted provided that the following conditions
> +#   are met:
> +#
> +#     * Redistributions of source code must retain the above copyright
> +#       notice, this list of conditions and the following disclaimer.
> +#     * Redistributions in binary form must reproduce the above copyright
> +#       notice, this list of conditions and the following disclaimer in
> +#       the documentation and/or other materials provided with the
> +#       distribution.
> +#     * Neither the name of Freescale Semiconductor nor the names of its
> +#       contributors may be used to endorse or promote products derived
> +#       from this software without specific prior written permission.
> +#
> +#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> +#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> +#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> +#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> +#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> +#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> +#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> +#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> +#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +#
> +
> +#include "defconfig_arm64-armv8a-linuxapp-gcc"
> +
> +# NXP (Freescale) - Soc Architecture with WRIOP and QBMAN support
> +CONFIG_RTE_MACHINE="dpaa2"
> +CONFIG_RTE_ARCH_ARM_TUNE="cortex-a57+fp+simd"
> +
> +#
> +# Compile Environment Abstraction Layer
> +#
> +CONFIG_RTE_MAX_LCORE=8
> +CONFIG_RTE_MAX_NUMA_NODES=1
> +CONFIG_RTE_EAL_IGB_UIO=n
> +CONFIG_RTE_EAL_VFIO=y
>
by default _VFIO=y enabled in common_linuxapp, no need to keep here...
  
Thomas Monjalon May 9, 2016, 8:39 a.m. UTC | #2
2016-05-09 19:18, Hemant Agrawal:
> This patch introduces dpaa2 machine target to address difference
> in cpu parameter, number of core to 8 and no numa support
> w.r.t default armv8-a machine
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
[...]
> --- /dev/null
> +++ b/mk/machine/dpaa2/rte.vars.mk
> +# ARCH =
> +# CROSS =
> +# MACHINE_CFLAGS =
> +# MACHINE_LDFLAGS =
> +# MACHINE_ASFLAGS =
> +# CPU_CFLAGS =
> +# CPU_LDFLAGS =
> +# CPU_ASFLAGS =
> +MACHINE_CFLAGS += -march=armv8-a
> +
> +ifdef CONFIG_RTE_ARCH_ARM_TUNE
> +MACHINE_CFLAGS += -mcpu=$(CONFIG_RTE_ARCH_ARM_TUNE)
> +endif

There is nothing specific in this file.

> --- a/mk/rte.module.mk
> +++ b/mk/rte.module.mk
> +#### Linaro toolchain usages arm64 instread of aarch64 in kernel
> +ifeq ($(ARCH), aarch64)
> +ARCH = arm64
> +endif

Could you provide more explanations please?
aarch64 shouldn't be used I think.
  
Jerin Jacob May 9, 2016, 9:06 a.m. UTC | #3
On Mon, May 09, 2016 at 07:18:22PM +0530, Hemant Agrawal wrote:
> This patch introduces dpaa2 machine target to address difference
> in cpu parameter, number of core to 8 and no numa support
> w.r.t default armv8-a machine
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
>  config/defconfig_arm64-dpaa2-linuxapp-gcc | 44 +++++++++++++++++++++++
>  mk/machine/dpaa2/rte.vars.mk              | 60 +++++++++++++++++++++++++++++++
>  mk/rte.module.mk                          |  5 +++
>  3 files changed, 109 insertions(+)
>  create mode 100644 config/defconfig_arm64-dpaa2-linuxapp-gcc
>  create mode 100644 mk/machine/dpaa2/rte.vars.mk
> 
> diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc b/config/defconfig_arm64-dpaa2-linuxapp-gcc
> new file mode 100644
> index 0000000..80bda26
> --- /dev/null
> +++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc
> @@ -0,0 +1,44 @@
> +#   BSD LICENSE
> +#
> +#   Copyright(c) 2016 Freescale Semiconductor, Inc. All rights reserved.
> +#
> +#   Redistribution and use in source and binary forms, with or without
> +#   modification, are permitted provided that the following conditions
> +#   are met:
> +#
> +#     * Redistributions of source code must retain the above copyright
> +#       notice, this list of conditions and the following disclaimer.
> +#     * Redistributions in binary form must reproduce the above copyright
> +#       notice, this list of conditions and the following disclaimer in
> +#       the documentation and/or other materials provided with the
> +#       distribution.
> +#     * Neither the name of Freescale Semiconductor nor the names of its
> +#       contributors may be used to endorse or promote products derived
> +#       from this software without specific prior written permission.
> +#
> +#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> +#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> +#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> +#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> +#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> +#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> +#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> +#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> +#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +#
> +
> +#include "defconfig_arm64-armv8a-linuxapp-gcc"
> +
> +# NXP (Freescale) - Soc Architecture with WRIOP and QBMAN support
> +CONFIG_RTE_MACHINE="dpaa2"
> +CONFIG_RTE_ARCH_ARM_TUNE="cortex-a57+fp+simd"
> +
> +#
> +# Compile Environment Abstraction Layer
> +#
> +CONFIG_RTE_MAX_LCORE=8
> +CONFIG_RTE_MAX_NUMA_NODES=1
> +CONFIG_RTE_EAL_IGB_UIO=n

I think it makes sense to move this option to generic arm64 config
as upstream arm64 kernel does not have support for sysfs based PCI mmap
resource file,(/sys/bus/pci/devices/B:D:F/resource[_wc]X) need for
CONFIG_RTE_EAL_IGB_UIO to work) and use VFIO for all cases.

Any objections?

> +CONFIG_RTE_EAL_VFIO=y
> diff --git a/mk/machine/dpaa2/rte.vars.mk b/mk/machine/dpaa2/rte.vars.mk
> new file mode 100644
> index 0000000..8541633
> --- /dev/null
> +++ b/mk/machine/dpaa2/rte.vars.mk
> @@ -0,0 +1,60 @@
> +#   BSD LICENSE
> +#
> +#   Copyright(c) 2016 Freescale Semiconductor, Inc. All rights reserved.
> +#
> +#   Redistribution and use in source and binary forms, with or without
> +#   modification, are permitted provided that the following conditions
> +#   are met:
> +#
> +#     * Redistributions of source code must retain the above copyright
> +#       notice, this list of conditions and the following disclaimer.
> +#     * Redistributions in binary form must reproduce the above copyright
> +#       notice, this list of conditions and the following disclaimer in
> +#       the documentation and/or other materials provided with the
> +#       distribution.
> +#     * Neither the name of Freescale Semiconductor nor the names of its
> +#       contributors may be used to endorse or promote products derived
> +#       from this software without specific prior written permission.
> +#
> +#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> +#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> +#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> +#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> +#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> +#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> +#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> +#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> +#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> +#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> +
> +#
> +# machine:
> +#
> +#   - can define ARCH variable (overridden by cmdline value)
> +#   - can define CROSS variable (overridden by cmdline value)
> +#   - define MACHINE_CFLAGS variable (overridden by cmdline value)
> +#   - define MACHINE_LDFLAGS variable (overridden by cmdline value)
> +#   - define MACHINE_ASFLAGS variable (overridden by cmdline value)
> +#   - can define CPU_CFLAGS variable (overridden by cmdline value) that
> +#     overrides the one defined in arch.
> +#   - can define CPU_LDFLAGS variable (overridden by cmdline value) that
> +#     overrides the one defined in arch.
> +#   - can define CPU_ASFLAGS variable (overridden by cmdline value) that
> +#     overrides the one defined in arch.
> +#   - may override any previously defined variable
> +#
> +
> +# ARCH =
> +# CROSS =
> +# MACHINE_CFLAGS =
> +# MACHINE_LDFLAGS =
> +# MACHINE_ASFLAGS =
> +# CPU_CFLAGS =
> +# CPU_LDFLAGS =
> +# CPU_ASFLAGS =
> +MACHINE_CFLAGS += -march=armv8-a
> +
> +ifdef CONFIG_RTE_ARCH_ARM_TUNE
> +MACHINE_CFLAGS += -mcpu=$(CONFIG_RTE_ARCH_ARM_TUNE)
> +endif
> diff --git a/mk/rte.module.mk b/mk/rte.module.mk
> index 53ed4fe..09bf51b 100644
> --- a/mk/rte.module.mk
> +++ b/mk/rte.module.mk
> @@ -29,6 +29,11 @@
>  #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
>  #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>  
> +#### Linaro toolchain usages arm64 instread of aarch64 in kernel
> +ifeq ($(ARCH), aarch64)
> +ARCH = arm64
> +endif
> +
>  ##### if sourced from kernel Kbuild system
>  ifneq ($(KERNELRELEASE),)
>  override EXTRA_CFLAGS = $(MODULE_CFLAGS) $(EXTRA_KERNEL_CFLAGS)
> -- 
> 1.9.1
>
  
Hemant Agrawal May 9, 2016, 9:09 a.m. UTC | #4
-----Original Message-----
From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] 
Sent: Monday, May 09, 2016 2:10 PM
To: Hemant Agrawal <hemant.agrawal@nxp.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] mk: Introduce NXP dpaa2 architecture based on armv8-a

2016-05-09 19:18, Hemant Agrawal:
> This patch introduces dpaa2 machine target to address difference in 
> cpu parameter, number of core to 8 and no numa support w.r.t default 
> armv8-a machine
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
[...]
> --- /dev/null
> +++ b/mk/machine/dpaa2/rte.vars.mk
> +# ARCH =
> +# CROSS =
> +# MACHINE_CFLAGS =
> +# MACHINE_LDFLAGS =
> +# MACHINE_ASFLAGS =
> +# CPU_CFLAGS =
> +# CPU_LDFLAGS =
> +# CPU_ASFLAGS =
> +MACHINE_CFLAGS += -march=armv8-a
> +
> +ifdef CONFIG_RTE_ARCH_ARM_TUNE
> +MACHINE_CFLAGS += -mcpu=$(CONFIG_RTE_ARCH_ARM_TUNE) endif

There is nothing specific in this file.
[Hemant] The arch is "armv8-a" instead of "armv8-a+crc".  Also, we are using "mcpu" for ARM tuning. This is not present in the armv8a machine. The armv7a machine usages RTE_ARCH_ARM_TUNE to configure "mtune". 

> --- a/mk/rte.module.mk
> +++ b/mk/rte.module.mk
> +#### Linaro toolchain usages arm64 instread of aarch64 in kernel ifeq 
> +($(ARCH), aarch64) ARCH = arm64 endif

Could you provide more explanations please?
aarch64 shouldn't be used I think.
[Hemant] you are right. This is not required. I was using an old toolchain.
  
Santosh Shukla May 9, 2016, 9:13 a.m. UTC | #5
On Mon, May 9, 2016 at 2:36 PM, Jerin Jacob <jerin.jacob@caviumnetworks.com>
wrote:

> On Mon, May 09, 2016 at 07:18:22PM +0530, Hemant Agrawal wrote:
> > This patch introduces dpaa2 machine target to address difference
> > in cpu parameter, number of core to 8 and no numa support
> > w.r.t default armv8-a machine
> >
> > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> > ---
> >  config/defconfig_arm64-dpaa2-linuxapp-gcc | 44 +++++++++++++++++++++++
> >  mk/machine/dpaa2/rte.vars.mk              | 60
> +++++++++++++++++++++++++++++++
> >  mk/rte.module.mk                          |  5 +++
> >  3 files changed, 109 insertions(+)
> >  create mode 100644 config/defconfig_arm64-dpaa2-linuxapp-gcc
> >  create mode 100644 mk/machine/dpaa2/rte.vars.mk
> >
> > diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc
> b/config/defconfig_arm64-dpaa2-linuxapp-gcc
> > new file mode 100644
> > index 0000000..80bda26
> > --- /dev/null
> > +++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc
> > @@ -0,0 +1,44 @@
> > +#   BSD LICENSE
> > +#
> > +#   Copyright(c) 2016 Freescale Semiconductor, Inc. All rights reserved.
> > +#
> > +#   Redistribution and use in source and binary forms, with or without
> > +#   modification, are permitted provided that the following conditions
> > +#   are met:
> > +#
> > +#     * Redistributions of source code must retain the above copyright
> > +#       notice, this list of conditions and the following disclaimer.
> > +#     * Redistributions in binary form must reproduce the above
> copyright
> > +#       notice, this list of conditions and the following disclaimer in
> > +#       the documentation and/or other materials provided with the
> > +#       distribution.
> > +#     * Neither the name of Freescale Semiconductor nor the names of its
> > +#       contributors may be used to endorse or promote products derived
> > +#       from this software without specific prior written permission.
> > +#
> > +#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > +#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > +#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
> FOR
> > +#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > +#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
> INCIDENTAL,
> > +#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > +#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
> USE,
> > +#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
> ANY
> > +#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > +#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> USE
> > +#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > +#
> > +
> > +#include "defconfig_arm64-armv8a-linuxapp-gcc"
> > +
> > +# NXP (Freescale) - Soc Architecture with WRIOP and QBMAN support
> > +CONFIG_RTE_MACHINE="dpaa2"
> > +CONFIG_RTE_ARCH_ARM_TUNE="cortex-a57+fp+simd"
> > +
> > +#
> > +# Compile Environment Abstraction Layer
> > +#
> > +CONFIG_RTE_MAX_LCORE=8
> > +CONFIG_RTE_MAX_NUMA_NODES=1
> > +CONFIG_RTE_EAL_IGB_UIO=n
>
> I think it makes sense to move this option to generic arm64 config
> as upstream arm64 kernel does not have support for sysfs based PCI mmap
> resource file,(/sys/bus/pci/devices/B:D:F/resource[_wc]X) need for
> CONFIG_RTE_EAL_IGB_UIO to work) and use VFIO for all cases.
>
> Any objections?
>

Make sense. IGB_UIO for arm64 is NA.

>
> > +CONFIG_RTE_EAL_VFIO=y
> > diff --git a/mk/machine/dpaa2/rte.vars.mk b/mk/machine/dpaa2/rte.vars.mk
> > new file mode 100644
> > index 0000000..8541633
> > --- /dev/null
> > +++ b/mk/machine/dpaa2/rte.vars.mk
> > @@ -0,0 +1,60 @@
> > +#   BSD LICENSE
> > +#
> > +#   Copyright(c) 2016 Freescale Semiconductor, Inc. All rights reserved.
> > +#
> > +#   Redistribution and use in source and binary forms, with or without
> > +#   modification, are permitted provided that the following conditions
> > +#   are met:
> > +#
> > +#     * Redistributions of source code must retain the above copyright
> > +#       notice, this list of conditions and the following disclaimer.
> > +#     * Redistributions in binary form must reproduce the above
> copyright
> > +#       notice, this list of conditions and the following disclaimer in
> > +#       the documentation and/or other materials provided with the
> > +#       distribution.
> > +#     * Neither the name of Freescale Semiconductor nor the names of its
> > +#       contributors may be used to endorse or promote products derived
> > +#       from this software without specific prior written permission.
> > +#
> > +#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > +#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > +#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
> FOR
> > +#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > +#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
> INCIDENTAL,
> > +#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > +#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
> USE,
> > +#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
> ANY
> > +#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > +#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> USE
> > +#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > +
> > +#
> > +# machine:
> > +#
> > +#   - can define ARCH variable (overridden by cmdline value)
> > +#   - can define CROSS variable (overridden by cmdline value)
> > +#   - define MACHINE_CFLAGS variable (overridden by cmdline value)
> > +#   - define MACHINE_LDFLAGS variable (overridden by cmdline value)
> > +#   - define MACHINE_ASFLAGS variable (overridden by cmdline value)
> > +#   - can define CPU_CFLAGS variable (overridden by cmdline value) that
> > +#     overrides the one defined in arch.
> > +#   - can define CPU_LDFLAGS variable (overridden by cmdline value) that
> > +#     overrides the one defined in arch.
> > +#   - can define CPU_ASFLAGS variable (overridden by cmdline value) that
> > +#     overrides the one defined in arch.
> > +#   - may override any previously defined variable
> > +#
> > +
> > +# ARCH =
> > +# CROSS =
> > +# MACHINE_CFLAGS =
> > +# MACHINE_LDFLAGS =
> > +# MACHINE_ASFLAGS =
> > +# CPU_CFLAGS =
> > +# CPU_LDFLAGS =
> > +# CPU_ASFLAGS =
> > +MACHINE_CFLAGS += -march=armv8-a
> > +
> > +ifdef CONFIG_RTE_ARCH_ARM_TUNE
> > +MACHINE_CFLAGS += -mcpu=$(CONFIG_RTE_ARCH_ARM_TUNE)
> > +endif
> > diff --git a/mk/rte.module.mk b/mk/rte.module.mk
> > index 53ed4fe..09bf51b 100644
> > --- a/mk/rte.module.mk
> > +++ b/mk/rte.module.mk
> > @@ -29,6 +29,11 @@
> >  #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> USE
> >  #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> >
> > +#### Linaro toolchain usages arm64 instread of aarch64 in kernel
> > +ifeq ($(ARCH), aarch64)
> > +ARCH = arm64
> > +endif
> > +
> >  ##### if sourced from kernel Kbuild system
> >  ifneq ($(KERNELRELEASE),)
> >  override EXTRA_CFLAGS = $(MODULE_CFLAGS) $(EXTRA_KERNEL_CFLAGS)
> > --
> > 1.9.1
> >
>
  
Hemant Agrawal May 9, 2016, 9:16 a.m. UTC | #6
From: Santosh Shukla [mailto:sshukla@mvista.com]

Sent: Monday, May 09, 2016 2:44 PM
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cc: Hemant Agrawal <hemant.agrawal@nxp.com>; dpdk <dev@dpdk.org>; Jianbo Liu <jianbo.liu@linaro.org>; Shukla, Santosh <santosh.shukla@caviumnetworks.com>
Subject: Re: [dpdk-dev] [PATCH] mk: Introduce NXP dpaa2 architecture based on armv8-a



On Mon, May 9, 2016 at 2:36 PM, Jerin Jacob <jerin.jacob@caviumnetworks.com<mailto:jerin.jacob@caviumnetworks.com>> wrote:
On Mon, May 09, 2016 at 07:18:22PM +0530, Hemant Agrawal wrote:
> This patch introduces dpaa2 machine target to address difference

> in cpu parameter, number of core to 8 and no numa support

> w.r.t default armv8-a machine

>

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com<mailto:hemant.agrawal@nxp.com>>

> ---

>  config/defconfig_arm64-dpaa2-linuxapp-gcc | 44 +++++++++++++++++++++++

>  mk/machine/dpaa2/rte.vars.mk<http://rte.vars.mk>              | 60 +++++++++++++++++++++++++++++++

>  mk/rte.module.mk<http://rte.module.mk>                          |  5 +++

>  3 files changed, 109 insertions(+)

>  create mode 100644 config/defconfig_arm64-dpaa2-linuxapp-gcc

>  create mode 100644 mk/machine/dpaa2/rte.vars.mk<http://rte.vars.mk>

>

> diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc b/config/defconfig_arm64-dpaa2-linuxapp-gcc

> new file mode 100644

> index 0000000..80bda26

> --- /dev/null

> +++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc

> @@ -0,0 +1,44 @@

> +#   BSD LICENSE

> +#

> +#   Copyright(c) 2016 Freescale Semiconductor, Inc. All rights reserved.

> +#

> +#   Redistribution and use in source and binary forms, with or without

> +#   modification, are permitted provided that the following conditions

> +#   are met:

> +#

> +#     * Redistributions of source code must retain the above copyright

> +#       notice, this list of conditions and the following disclaimer.

> +#     * Redistributions in binary form must reproduce the above copyright

> +#       notice, this list of conditions and the following disclaimer in

> +#       the documentation and/or other materials provided with the

> +#       distribution.

> +#     * Neither the name of Freescale Semiconductor nor the names of its

> +#       contributors may be used to endorse or promote products derived

> +#       from this software without specific prior written permission.

> +#

> +#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

> +#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

> +#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR

> +#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT

> +#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,

> +#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT

> +#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,

> +#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY

> +#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT

> +#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

> +#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

> +#

> +

> +#include "defconfig_arm64-armv8a-linuxapp-gcc"

> +

> +# NXP (Freescale) - Soc Architecture with WRIOP and QBMAN support

> +CONFIG_RTE_MACHINE="dpaa2"

> +CONFIG_RTE_ARCH_ARM_TUNE="cortex-a57+fp+simd"

> +

> +#

> +# Compile Environment Abstraction Layer

> +#

> +CONFIG_RTE_MAX_LCORE=8

> +CONFIG_RTE_MAX_NUMA_NODES=1

> +CONFIG_RTE_EAL_IGB_UIO=n

I think it makes sense to move this option to generic arm64 config
as upstream arm64 kernel does not have support for sysfs based PCI mmap
resource file,(/sys/bus/pci/devices/B:D:F/resource[_wc]X) need for
CONFIG_RTE_EAL_IGB_UIO to work) and use VFIO for all cases.

Any objections?

Make sense. IGB_UIO for arm64 is NA.
+1
I can take care of it in next version of patch


> +CONFIG_RTE_EAL_VFIO=y

> diff --git a/mk/machine/dpaa2/rte.vars.mk<http://rte.vars.mk> b/mk/machine/dpaa2/rte.vars.mk<http://rte.vars.mk>

> new file mode 100644

> index 0000000..8541633

> --- /dev/null

> +++ b/mk/machine/dpaa2/rte.vars.mk<http://rte.vars.mk>

> @@ -0,0 +1,60 @@

> +#   BSD LICENSE

> +#

> +#   Copyright(c) 2016 Freescale Semiconductor, Inc. All rights reserved.

> +#

> +#   Redistribution and use in source and binary forms, with or without

> +#   modification, are permitted provided that the following conditions

> +#   are met:

> +#

> +#     * Redistributions of source code must retain the above copyright

> +#       notice, this list of conditions and the following disclaimer.

> +#     * Redistributions in binary form must reproduce the above copyright

> +#       notice, this list of conditions and the following disclaimer in

> +#       the documentation and/or other materials provided with the

> +#       distribution.

> +#     * Neither the name of Freescale Semiconductor nor the names of its

> +#       contributors may be used to endorse or promote products derived

> +#       from this software without specific prior written permission.

> +#

> +#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

> +#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

> +#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR

> +#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT

> +#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,

> +#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT

> +#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,

> +#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY

> +#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT

> +#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

> +#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

> +

> +#

> +# machine:

> +#

> +#   - can define ARCH variable (overridden by cmdline value)

> +#   - can define CROSS variable (overridden by cmdline value)

> +#   - define MACHINE_CFLAGS variable (overridden by cmdline value)

> +#   - define MACHINE_LDFLAGS variable (overridden by cmdline value)

> +#   - define MACHINE_ASFLAGS variable (overridden by cmdline value)

> +#   - can define CPU_CFLAGS variable (overridden by cmdline value) that

> +#     overrides the one defined in arch.

> +#   - can define CPU_LDFLAGS variable (overridden by cmdline value) that

> +#     overrides the one defined in arch.

> +#   - can define CPU_ASFLAGS variable (overridden by cmdline value) that

> +#     overrides the one defined in arch.

> +#   - may override any previously defined variable

> +#

> +

> +# ARCH =

> +# CROSS =

> +# MACHINE_CFLAGS =

> +# MACHINE_LDFLAGS =

> +# MACHINE_ASFLAGS =

> +# CPU_CFLAGS =

> +# CPU_LDFLAGS =

> +# CPU_ASFLAGS =

> +MACHINE_CFLAGS += -march=armv8-a

> +

> +ifdef CONFIG_RTE_ARCH_ARM_TUNE

> +MACHINE_CFLAGS += -mcpu=$(CONFIG_RTE_ARCH_ARM_TUNE)

> +endif

> diff --git a/mk/rte.module.mk<http://rte.module.mk> b/mk/rte.module.mk<http://rte.module.mk>

> index 53ed4fe..09bf51b 100644

> --- a/mk/rte.module.mk<http://rte.module.mk>

> +++ b/mk/rte.module.mk<http://rte.module.mk>

> @@ -29,6 +29,11 @@

>  #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

>  #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

>

> +#### Linaro toolchain usages arm64 instread of aarch64 in kernel

> +ifeq ($(ARCH), aarch64)

> +ARCH = arm64

> +endif

> +

>  ##### if sourced from kernel Kbuild system

>  ifneq ($(KERNELRELEASE),)

>  override EXTRA_CFLAGS = $(MODULE_CFLAGS) $(EXTRA_KERNEL_CFLAGS)

> --

> 1.9.1

>
  
Jianbo Liu May 9, 2016, 11:02 a.m. UTC | #7
On 9 May 2016 at 17:06, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
> On Mon, May 09, 2016 at 07:18:22PM +0530, Hemant Agrawal wrote:
>> This patch introduces dpaa2 machine target to address difference
>> in cpu parameter, number of core to 8 and no numa support
>> w.r.t default armv8-a machine
>>
>> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>> ---
>>  config/defconfig_arm64-dpaa2-linuxapp-gcc | 44 +++++++++++++++++++++++
>>  mk/machine/dpaa2/rte.vars.mk              | 60 +++++++++++++++++++++++++++++++
>>  mk/rte.module.mk                          |  5 +++
>>  3 files changed, 109 insertions(+)
>>  create mode 100644 config/defconfig_arm64-dpaa2-linuxapp-gcc
>>  create mode 100644 mk/machine/dpaa2/rte.vars.mk
>>
>> diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc b/config/defconfig_arm64-dpaa2-linuxapp-gcc
>> new file mode 100644
>> index 0000000..80bda26
>> --- /dev/null
>> +++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc
>> @@ -0,0 +1,44 @@
>> +#   BSD LICENSE
>> +#
>> +#   Copyright(c) 2016 Freescale Semiconductor, Inc. All rights reserved.
>> +#
>> +#   Redistribution and use in source and binary forms, with or without
>> +#   modification, are permitted provided that the following conditions
>> +#   are met:
>> +#
>> +#     * Redistributions of source code must retain the above copyright
>> +#       notice, this list of conditions and the following disclaimer.
>> +#     * Redistributions in binary form must reproduce the above copyright
>> +#       notice, this list of conditions and the following disclaimer in
>> +#       the documentation and/or other materials provided with the
>> +#       distribution.
>> +#     * Neither the name of Freescale Semiconductor nor the names of its
>> +#       contributors may be used to endorse or promote products derived
>> +#       from this software without specific prior written permission.
>> +#
>> +#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
>> +#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
>> +#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
>> +#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
>> +#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
>> +#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
>> +#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
>> +#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
>> +#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
>> +#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
>> +#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>> +#
>> +
>> +#include "defconfig_arm64-armv8a-linuxapp-gcc"
>> +
>> +# NXP (Freescale) - Soc Architecture with WRIOP and QBMAN support
>> +CONFIG_RTE_MACHINE="dpaa2"
>> +CONFIG_RTE_ARCH_ARM_TUNE="cortex-a57+fp+simd"
>> +
>> +#
>> +# Compile Environment Abstraction Layer
>> +#
>> +CONFIG_RTE_MAX_LCORE=8
>> +CONFIG_RTE_MAX_NUMA_NODES=1
>> +CONFIG_RTE_EAL_IGB_UIO=n
>
> I think it makes sense to move this option to generic arm64 config
> as upstream arm64 kernel does not have support for sysfs based PCI mmap
> resource file,(/sys/bus/pci/devices/B:D:F/resource[_wc]X) need for
> CONFIG_RTE_EAL_IGB_UIO to work) and use VFIO for all cases.
>
> Any objections?
>
Is there any conflict to keep both?
  
Jerin Jacob May 9, 2016, 12:11 p.m. UTC | #8
On Mon, May 09, 2016 at 07:02:36PM +0800, Jianbo Liu wrote:
> On 9 May 2016 at 17:06, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
> > On Mon, May 09, 2016 at 07:18:22PM +0530, Hemant Agrawal wrote:
> >> This patch introduces dpaa2 machine target to address difference
> >> in cpu parameter, number of core to 8 and no numa support
> >> w.r.t default armv8-a machine
> >>
> >> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> >> ---
> >>  config/defconfig_arm64-dpaa2-linuxapp-gcc | 44 +++++++++++++++++++++++
> >>  mk/machine/dpaa2/rte.vars.mk              | 60 +++++++++++++++++++++++++++++++
> >>  mk/rte.module.mk                          |  5 +++
> >>  3 files changed, 109 insertions(+)
> >>  create mode 100644 config/defconfig_arm64-dpaa2-linuxapp-gcc
> >>  create mode 100644 mk/machine/dpaa2/rte.vars.mk
> >>
> >> diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc b/config/defconfig_arm64-dpaa2-linuxapp-gcc
> >> new file mode 100644
> >> index 0000000..80bda26
> >> --- /dev/null
> >> +++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc
> >> @@ -0,0 +1,44 @@
> >> +#   BSD LICENSE
> >> +#
> >> +#   Copyright(c) 2016 Freescale Semiconductor, Inc. All rights reserved.
> >> +#
> >> +#   Redistribution and use in source and binary forms, with or without
> >> +#   modification, are permitted provided that the following conditions
> >> +#   are met:
> >> +#
> >> +#     * Redistributions of source code must retain the above copyright
> >> +#       notice, this list of conditions and the following disclaimer.
> >> +#     * Redistributions in binary form must reproduce the above copyright
> >> +#       notice, this list of conditions and the following disclaimer in
> >> +#       the documentation and/or other materials provided with the
> >> +#       distribution.
> >> +#     * Neither the name of Freescale Semiconductor nor the names of its
> >> +#       contributors may be used to endorse or promote products derived
> >> +#       from this software without specific prior written permission.
> >> +#
> >> +#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> >> +#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> >> +#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> >> +#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> >> +#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> >> +#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> >> +#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> >> +#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> >> +#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> >> +#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> >> +#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> >> +#
> >> +
> >> +#include "defconfig_arm64-armv8a-linuxapp-gcc"
> >> +
> >> +# NXP (Freescale) - Soc Architecture with WRIOP and QBMAN support
> >> +CONFIG_RTE_MACHINE="dpaa2"
> >> +CONFIG_RTE_ARCH_ARM_TUNE="cortex-a57+fp+simd"
> >> +
> >> +#
> >> +# Compile Environment Abstraction Layer
> >> +#
> >> +CONFIG_RTE_MAX_LCORE=8
> >> +CONFIG_RTE_MAX_NUMA_NODES=1
> >> +CONFIG_RTE_EAL_IGB_UIO=n
> >
> > I think it makes sense to move this option to generic arm64 config
> > as upstream arm64 kernel does not have support for sysfs based PCI mmap
> > resource file,(/sys/bus/pci/devices/B:D:F/resource[_wc]X) need for
> > CONFIG_RTE_EAL_IGB_UIO to work) and use VFIO for all cases.
> >
> > Any objections?
> >
> Is there any conflict to keep both?

I would like to avoid the case like below in dpdk.org ml.
http://dpdk.org/ml/archives/dev/2016-January/031313.html
  
Jianbo Liu May 9, 2016, 3:22 p.m. UTC | #9
On 9 May 2016 at 20:11, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
> On Mon, May 09, 2016 at 07:02:36PM +0800, Jianbo Liu wrote:
>> On 9 May 2016 at 17:06, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
>> > On Mon, May 09, 2016 at 07:18:22PM +0530, Hemant Agrawal wrote:
>> >> This patch introduces dpaa2 machine target to address difference
>> >> in cpu parameter, number of core to 8 and no numa support
>> >> w.r.t default armv8-a machine
>> >>
>> >> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>> >> ---
>> >>  config/defconfig_arm64-dpaa2-linuxapp-gcc | 44 +++++++++++++++++++++++
>> >>  mk/machine/dpaa2/rte.vars.mk              | 60 +++++++++++++++++++++++++++++++
>> >>  mk/rte.module.mk                          |  5 +++
>> >>  3 files changed, 109 insertions(+)
>> >>  create mode 100644 config/defconfig_arm64-dpaa2-linuxapp-gcc
>> >>  create mode 100644 mk/machine/dpaa2/rte.vars.mk
>> >>
>> >> diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc b/config/defconfig_arm64-dpaa2-linuxapp-gcc
>> >> new file mode 100644
>> >> index 0000000..80bda26
>> >> --- /dev/null
>> >> +++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc
>> >> @@ -0,0 +1,44 @@
>> >> +#   BSD LICENSE
>> >> +#
>> >> +#   Copyright(c) 2016 Freescale Semiconductor, Inc. All rights reserved.
>> >> +#
>> >> +#   Redistribution and use in source and binary forms, with or without
>> >> +#   modification, are permitted provided that the following conditions
>> >> +#   are met:
>> >> +#
>> >> +#     * Redistributions of source code must retain the above copyright
>> >> +#       notice, this list of conditions and the following disclaimer.
>> >> +#     * Redistributions in binary form must reproduce the above copyright
>> >> +#       notice, this list of conditions and the following disclaimer in
>> >> +#       the documentation and/or other materials provided with the
>> >> +#       distribution.
>> >> +#     * Neither the name of Freescale Semiconductor nor the names of its
>> >> +#       contributors may be used to endorse or promote products derived
>> >> +#       from this software without specific prior written permission.
>> >> +#
>> >> +#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
>> >> +#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
>> >> +#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
>> >> +#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
>> >> +#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
>> >> +#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
>> >> +#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
>> >> +#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
>> >> +#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
>> >> +#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
>> >> +#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>> >> +#
>> >> +
>> >> +#include "defconfig_arm64-armv8a-linuxapp-gcc"
>> >> +
>> >> +# NXP (Freescale) - Soc Architecture with WRIOP and QBMAN support
>> >> +CONFIG_RTE_MACHINE="dpaa2"
>> >> +CONFIG_RTE_ARCH_ARM_TUNE="cortex-a57+fp+simd"
>> >> +
>> >> +#
>> >> +# Compile Environment Abstraction Layer
>> >> +#
>> >> +CONFIG_RTE_MAX_LCORE=8
>> >> +CONFIG_RTE_MAX_NUMA_NODES=1
>> >> +CONFIG_RTE_EAL_IGB_UIO=n
>> >
>> > I think it makes sense to move this option to generic arm64 config
>> > as upstream arm64 kernel does not have support for sysfs based PCI mmap
>> > resource file,(/sys/bus/pci/devices/B:D:F/resource[_wc]X) need for
>> > CONFIG_RTE_EAL_IGB_UIO to work) and use VFIO for all cases.
>> >
>> > Any objections?
>> >
>> Is there any conflict to keep both?
>
> I would like to avoid the case like below in dpdk.org ml.
> http://dpdk.org/ml/archives/dev/2016-January/031313.html
>
So no conflict to enable both.
I'd rather keep as it is for armv8a defconfig, becasue it's the base,
any change may affect existing user.
  
Jerin Jacob May 9, 2016, 4:17 p.m. UTC | #10
On Mon, May 09, 2016 at 11:22:15PM +0800, Jianbo Liu wrote:
> On 9 May 2016 at 20:11, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
> > On Mon, May 09, 2016 at 07:02:36PM +0800, Jianbo Liu wrote:
> >> On 9 May 2016 at 17:06, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
> >> > On Mon, May 09, 2016 at 07:18:22PM +0530, Hemant Agrawal wrote:
> >> >> This patch introduces dpaa2 machine target to address difference
> >> >> in cpu parameter, number of core to 8 and no numa support
> >> >> w.r.t default armv8-a machine
> >> >>
> >> >> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> >> >> ---

Snip

> >> >> +#
> >> >> +# Compile Environment Abstraction Layer
> >> >> +#
> >> >> +CONFIG_RTE_MAX_LCORE=8
> >> >> +CONFIG_RTE_MAX_NUMA_NODES=1
> >> >> +CONFIG_RTE_EAL_IGB_UIO=n
> >> >
> >> > I think it makes sense to move this option to generic arm64 config
> >> > as upstream arm64 kernel does not have support for sysfs based PCI mmap
> >> > resource file,(/sys/bus/pci/devices/B:D:F/resource[_wc]X) need for
> >> > CONFIG_RTE_EAL_IGB_UIO to work) and use VFIO for all cases.
> >> >
> >> > Any objections?
> >> >
> >> Is there any conflict to keep both?
> >
> > I would like to avoid the case like below in dpdk.org ml.
> > http://dpdk.org/ml/archives/dev/2016-January/031313.html
> >
> So no conflict to enable both.

IMO, Conflict part comes secondary, It does not even work with upstream kernel.
Why keep the broken configuration? Two main reasons I think it makes
sense to disable
- It is broken, I don't think arm64 kernel developers likes non VFIO approach
now. So mostly likely it will be broken
- Trying to avoid out of tree patches wherever is possible as
distribution folks like to work with upstream version.

> I'd rather keep as it is for armv8a defconfig, becasue it's the base,
> any change may affect existing user.
IMO, It makes sense to disable at armv8a defconfig otherwise all armv8
variants need add CONFIG_RTE_EAL_IGB_UIO=n in all the configs and its
arch specific issue.
  
Jianbo Liu May 10, 2016, 2:10 a.m. UTC | #11
On 10 May 2016 at 00:17, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
> On Mon, May 09, 2016 at 11:22:15PM +0800, Jianbo Liu wrote:
>> On 9 May 2016 at 20:11, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
>> > On Mon, May 09, 2016 at 07:02:36PM +0800, Jianbo Liu wrote:
>> >> On 9 May 2016 at 17:06, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
>> >> > On Mon, May 09, 2016 at 07:18:22PM +0530, Hemant Agrawal wrote:
>> >> >> This patch introduces dpaa2 machine target to address difference
>> >> >> in cpu parameter, number of core to 8 and no numa support
>> >> >> w.r.t default armv8-a machine
>> >> >>
>> >> >> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>> >> >> ---
>
> Snip
>
>> >> >> +#
>> >> >> +# Compile Environment Abstraction Layer
>> >> >> +#
>> >> >> +CONFIG_RTE_MAX_LCORE=8
>> >> >> +CONFIG_RTE_MAX_NUMA_NODES=1
>> >> >> +CONFIG_RTE_EAL_IGB_UIO=n
>> >> >
>> >> > I think it makes sense to move this option to generic arm64 config
>> >> > as upstream arm64 kernel does not have support for sysfs based PCI mmap
>> >> > resource file,(/sys/bus/pci/devices/B:D:F/resource[_wc]X) need for
>> >> > CONFIG_RTE_EAL_IGB_UIO to work) and use VFIO for all cases.
>> >> >
>> >> > Any objections?
>> >> >
>> >> Is there any conflict to keep both?
>> >
>> > I would like to avoid the case like below in dpdk.org ml.
>> > http://dpdk.org/ml/archives/dev/2016-January/031313.html
>> >
>> So no conflict to enable both.
>
> IMO, Conflict part comes secondary, It does not even work with upstream kernel.
> Why keep the broken configuration? Two main reasons I think it makes
> sense to disable
> - It is broken, I don't think arm64 kernel developers likes non VFIO approach
I don't think DPDK user is kernel developer in most cases. They maybe
like the traditional way.

> now. So mostly likely it will be broken
> - Trying to avoid out of tree patches wherever is possible as
> distribution folks like to work with upstream version.
Agree. But there is possible that people/company maintain their own kernel tree.

>
>> I'd rather keep as it is for armv8a defconfig, becasue it's the base,
>> any change may affect existing user.
> IMO, It makes sense to disable at armv8a defconfig otherwise all armv8
> variants need add CONFIG_RTE_EAL_IGB_UIO=n in all the configs and its
> arch specific issue.
We don't have to do that.
You didn't explictly disable this config in your current
defconfig_arm64-thunderx-linuxapp-gcc, but you know which module to
bind.
  
Jerin Jacob May 10, 2016, 5:26 a.m. UTC | #12
On Tue, May 10, 2016 at 10:10:07AM +0800, Jianbo Liu wrote:
> On 10 May 2016 at 00:17, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
> > On Mon, May 09, 2016 at 11:22:15PM +0800, Jianbo Liu wrote:
> >> On 9 May 2016 at 20:11, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
> >> > On Mon, May 09, 2016 at 07:02:36PM +0800, Jianbo Liu wrote:
> >> >> On 9 May 2016 at 17:06, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
> >> >> > On Mon, May 09, 2016 at 07:18:22PM +0530, Hemant Agrawal wrote:
> >> >> >> This patch introduces dpaa2 machine target to address difference
> >> >> >> in cpu parameter, number of core to 8 and no numa support
> >> >> >> w.r.t default armv8-a machine
> >> >> >>
> >> >> >> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> >> >> >> ---
> >
> > Snip
> >
> >> >> >> +#
> >> >> >> +# Compile Environment Abstraction Layer
> >> >> >> +#
> >> >> >> +CONFIG_RTE_MAX_LCORE=8
> >> >> >> +CONFIG_RTE_MAX_NUMA_NODES=1
> >> >> >> +CONFIG_RTE_EAL_IGB_UIO=n
> >> >> >
> >> >> > I think it makes sense to move this option to generic arm64 config
> >> >> > as upstream arm64 kernel does not have support for sysfs based PCI mmap
> >> >> > resource file,(/sys/bus/pci/devices/B:D:F/resource[_wc]X) need for
> >> >> > CONFIG_RTE_EAL_IGB_UIO to work) and use VFIO for all cases.
> >> >> >
> >> >> > Any objections?
> >> >> >
> >> >> Is there any conflict to keep both?
> >> >
> >> > I would like to avoid the case like below in dpdk.org ml.
> >> > http://dpdk.org/ml/archives/dev/2016-January/031313.html
> >> >
> >> So no conflict to enable both.
> >
> > IMO, Conflict part comes secondary, It does not even work with upstream kernel.
> > Why keep the broken configuration? Two main reasons I think it makes
> > sense to disable
> > - It is broken, I don't think arm64 kernel developers likes non VFIO approach
> I don't think DPDK user is kernel developer in most cases. They maybe
> like the traditional way.

But, the traditional way is _broken_. If we create the shortcut in
dpdk.org then upstream arm64 linux kernel will never get fixed.I attempted
twice to fix it, but arm64 kernel developers like VFIO approach.
if you think it makes sense to have traditional way then can you
upstream the patch to the arm64 linux kernel and add it in common
config

Technically, with VFIO and VFIONOIOMMU way we can replace the need for
uio in both host and virtualization use cases for arm64.

> > now. So mostly likely it will be broken
> > - Trying to avoid out of tree patches wherever is possible as
> > distribution folks like to work with upstream version.
> Agree. But there is possible that people/company maintain their own kernel tree.

This excactly same thing we would like to avoid in long term.

> >
> >> I'd rather keep as it is for armv8a defconfig, becasue it's the base,
> >> any change may affect existing user.
> > IMO, It makes sense to disable at armv8a defconfig otherwise all armv8
> > variants need add CONFIG_RTE_EAL_IGB_UIO=n in all the configs and its
> > arch specific issue.
> We don't have to do that.
> You didn't explictly disable this config in your current
> defconfig_arm64-thunderx-linuxapp-gcc, but you know which module to
> bind.
But not all the end users.
  

Patch

diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc b/config/defconfig_arm64-dpaa2-linuxapp-gcc
new file mode 100644
index 0000000..80bda26
--- /dev/null
+++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc
@@ -0,0 +1,44 @@ 
+#   BSD LICENSE
+#
+#   Copyright(c) 2016 Freescale Semiconductor, Inc. All rights reserved.
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of Freescale Semiconductor nor the names of its
+#       contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#include "defconfig_arm64-armv8a-linuxapp-gcc"
+
+# NXP (Freescale) - Soc Architecture with WRIOP and QBMAN support
+CONFIG_RTE_MACHINE="dpaa2"
+CONFIG_RTE_ARCH_ARM_TUNE="cortex-a57+fp+simd"
+
+#
+# Compile Environment Abstraction Layer
+#
+CONFIG_RTE_MAX_LCORE=8
+CONFIG_RTE_MAX_NUMA_NODES=1
+CONFIG_RTE_EAL_IGB_UIO=n
+CONFIG_RTE_EAL_VFIO=y
diff --git a/mk/machine/dpaa2/rte.vars.mk b/mk/machine/dpaa2/rte.vars.mk
new file mode 100644
index 0000000..8541633
--- /dev/null
+++ b/mk/machine/dpaa2/rte.vars.mk
@@ -0,0 +1,60 @@ 
+#   BSD LICENSE
+#
+#   Copyright(c) 2016 Freescale Semiconductor, Inc. All rights reserved.
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of Freescale Semiconductor nor the names of its
+#       contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#
+# machine:
+#
+#   - can define ARCH variable (overridden by cmdline value)
+#   - can define CROSS variable (overridden by cmdline value)
+#   - define MACHINE_CFLAGS variable (overridden by cmdline value)
+#   - define MACHINE_LDFLAGS variable (overridden by cmdline value)
+#   - define MACHINE_ASFLAGS variable (overridden by cmdline value)
+#   - can define CPU_CFLAGS variable (overridden by cmdline value) that
+#     overrides the one defined in arch.
+#   - can define CPU_LDFLAGS variable (overridden by cmdline value) that
+#     overrides the one defined in arch.
+#   - can define CPU_ASFLAGS variable (overridden by cmdline value) that
+#     overrides the one defined in arch.
+#   - may override any previously defined variable
+#
+
+# ARCH =
+# CROSS =
+# MACHINE_CFLAGS =
+# MACHINE_LDFLAGS =
+# MACHINE_ASFLAGS =
+# CPU_CFLAGS =
+# CPU_LDFLAGS =
+# CPU_ASFLAGS =
+MACHINE_CFLAGS += -march=armv8-a
+
+ifdef CONFIG_RTE_ARCH_ARM_TUNE
+MACHINE_CFLAGS += -mcpu=$(CONFIG_RTE_ARCH_ARM_TUNE)
+endif
diff --git a/mk/rte.module.mk b/mk/rte.module.mk
index 53ed4fe..09bf51b 100644
--- a/mk/rte.module.mk
+++ b/mk/rte.module.mk
@@ -29,6 +29,11 @@ 
 #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+#### Linaro toolchain usages arm64 instread of aarch64 in kernel
+ifeq ($(ARCH), aarch64)
+ARCH = arm64
+endif
+
 ##### if sourced from kernel Kbuild system
 ifneq ($(KERNELRELEASE),)
 override EXTRA_CFLAGS = $(MODULE_CFLAGS) $(EXTRA_KERNEL_CFLAGS)