From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1CF57A00C5; Mon, 6 Jul 2020 11:11:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 001191D911; Mon, 6 Jul 2020 11:11:47 +0200 (CEST) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id AA81E1D711 for ; Mon, 6 Jul 2020 11:11:46 +0200 (CEST) Received: by mail-io1-f68.google.com with SMTP id f6so22986486ioj.5 for ; Mon, 06 Jul 2020 02:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=HibdD8pjgJDIL8s5jbF+8o9RXs/+hLKD3laoQezRfrI=; b=JlCKSKFAzpDqfyWnbnV5ts5x38fqxexU57dYcbsKD3WKXjaZRtAH0MhQS6w07XgX3u ZCLaXTL0CvO0R9MQ+rTuv5ay/zPbfDkxHqWC1aHjX5ujUmKeJiREmoUid4w2lGzrdmTu m0h7v2eevrCEFTmqti9QH59cGkQ3IuP8VyN/twTbYzoVlYbxOHZdWeRUu2F/7HlYMptY a5wpABWTdtFzHr/JdwBd4M5KQ+y/0en9GpFMNlxLLbZzWYDwQECxGb4bpNEJmSsZxND4 hgUbx6LklJ5iyCXqJwjTKA7b0cPvHfVgi2I4sbix/t/tEoMMXAf22lEdCBSEVf6b2Hh3 8ByQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=HibdD8pjgJDIL8s5jbF+8o9RXs/+hLKD3laoQezRfrI=; b=oLHE3nPAJj1TK3eYUyMA+bOkBUukrOxpDF1bb5SEP8AsCcqIsMC2m8UOScNJHm5+hj FnJBpUH+0t5axWMQbde+i+y3QrEUgtEAmNCQb4DQbR+UnLclCoUn2HNFPi3yAScmMwjC O+ANpys+fRlWbHKlNngqURgSoLTqtUT3Fn3rUWv4LhR6rXbc13kjYyZHLOeJ/J6sSzZp 98hhT3MR2bP6CzlBKrgnlhGlusohpUt61HYAhGREn3L/0y8sqChX+WCFewyQblPYjQr3 51+mf6LUpjd/+YD4sBIlMCh1vlWsAI7McE8z3JZjTqxJqzTGChbGdDL9FpjulZK/6eTW p3+Q== X-Gm-Message-State: AOAM533okjvDmRFlWwTcAPRs+au5Tkqd8pl7bvjtF4kM3+uMygysw6/A YOFMujWLFVCERhkq/oOGUdx+HYYgxagR/hJBuI4= X-Google-Smtp-Source: ABdhPJxEbBTANFt6NvkKApNRsMrVvhF07D5gr/mw2uMjpBr/cCUC08Vu683pU5GSPh+OVNTOt7tTEGfdu/adaw6JOHA= X-Received: by 2002:a5e:880f:: with SMTP id l15mr23266260ioj.94.1594026705924; Mon, 06 Jul 2020 02:11:45 -0700 (PDT) MIME-Version: 1.0 References: <1588155872-13032-1-git-send-email-juraj.linkes@pantheon.tech> <1594024094-15515-1-git-send-email-juraj.linkes@pantheon.tech> <1594024094-15515-3-git-send-email-juraj.linkes@pantheon.tech> In-Reply-To: <1594024094-15515-3-git-send-email-juraj.linkes@pantheon.tech> From: Jerin Jacob Date: Mon, 6 Jul 2020 14:41:30 +0530 Message-ID: To: =?UTF-8?Q?Juraj_Linke=C5=A1?= Cc: "Richardson, Bruce" , Aaron Conole , Michael Santana , dpdk-dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Jul 6, 2020 at 1:59 PM Juraj Linke=C5=A1 wrote: > > Base the flags on config/defconfig_arm-armv7a-linuxapp-gcc. > Omit driver flags which can be built on arm32. > > Signed-off-by: Juraj Linke=C5=A1 Hi Juraj, Not strictly specific to this patch. Just to understand, How armv7 support has been used? - Is it for Running arm32 program on arm64 machines? - Is it for Native DPDK support from arm32. If so, What kind of PMD supports native arm32 DPDK? Or some other use case? I would like to understand the arm32 use case, so we can review it at that angle. > --- > config/arm/meson.build | 135 ++++++++++++++++++++++------------------- > 1 file changed, 74 insertions(+), 61 deletions(-) > > diff --git a/config/arm/meson.build b/config/arm/meson.build > index 8728051d5..b02fc95d9 100644 > --- a/config/arm/meson.build > +++ b/config/arm/meson.build > @@ -34,6 +34,11 @@ flags_generic =3D [ > ['RTE_MAX_LCORE', 256], > ['RTE_USE_C11_MEM_MODEL', true], > ['RTE_CACHE_LINE_SIZE', 128]] > +flags_generic_arm32 =3D [ > + ['RTE_MACHINE', '"armv7a"'], > + ['RTE_MAX_LCORE', 128], > + ['RTE_USE_C11_MEM_MODEL', false], > + ['RTE_CACHE_LINE_SIZE', 64]] > flags_arm =3D [ > ['RTE_MACHINE', '"armv8a"'], > ['RTE_MAX_LCORE', 16], > @@ -63,6 +68,10 @@ flags_armada =3D [ > ['RTE_MAX_LCORE', 16]] > > flags_default_extra =3D [] > +flags_default_arm32_extra =3D [ > + ['RTE_ARCH_ARM_NEON_MEMCPY', false], > + ['RTE_ARCH_STRICT_ALIGN', true], > + ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false]] > flags_n1sdp_extra =3D [ > ['RTE_MACHINE', '"n1sdp"'], > ['RTE_MAX_NUMA_NODES', 1], > @@ -99,6 +108,9 @@ machine_args_generic =3D [ > ['0xd0b', ['-mcpu=3Dcortex-a76']], > ['0xd0c', ['-march=3Darmv8.2-a+crc+crypto', '-mcpu=3Dneoverse-n1'= ], flags_n1sdp_extra]] > > +machine_args_generic_arm32 =3D [ > + ['default_arm32', ['-march=3Darmv7-a', '-mtune=3Dcortex-a9', '-m= fpu=3Dneon'], flags_default_arm32_extra]] > + > machine_args_cavium =3D [ > ['default', ['-march=3Darmv8-a+crc+crypto','-mcpu=3Dthunderx']], > ['native', ['-march=3Dnative']], > @@ -114,6 +126,7 @@ machine_args_emag =3D [ > > ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) > impl_generic =3D ['Generic armv8', flags_generic, machine_args_generic] > +impl_generic_arm32 =3D ['Generic armv7', flags_generic_arm32, machine_ar= gs_generic_arm32] > impl_0x41 =3D ['Arm', flags_arm, machine_args_generic] > impl_0x42 =3D ['Broadcom', flags_generic, machine_args_generic] > impl_0x43 =3D ['Cavium', flags_cavium, machine_args_cavium] > @@ -136,74 +149,74 @@ if not dpdk_conf.get('RTE_ARCH_64') > dpdk_conf.set('RTE_ARCH_ARMv7', 1) > # the minimum architecture supported, armv7-a, needs the followin= g, > # mk/machine/armv7a/rte.vars.mk sets it too > - machine_args +=3D '-mfpu=3Dneon' > else > dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128) > dpdk_conf.set('RTE_ARCH_ARM64', 1) > +endif > > - machine =3D [] > - cmd_generic =3D ['generic', '', '', 'default', ''] > - cmd_output =3D cmd_generic # Set generic by default > - machine_args =3D [] # Clear previous machine args > - if arm_force_default_march and not meson.is_cross_build() > +machine =3D [] > +machine_args =3D [] # Clear previous machine args > +cmd_generic =3D ['generic', '', '', 'default', ''] > +cmd_output =3D cmd_generic # Set generic by default > +if arm_force_default_march and not meson.is_cross_build() > + machine =3D impl_generic > + impl_pn =3D 'default' > +elif not meson.is_cross_build() > + # The script returns ['Implementer', 'Variant', 'Architecture', > + # 'Primary Part number', 'Revision'] > + detect_vendor =3D find_program(join_paths( > + meson.current_source_dir(), 'armv8_machine.py')) > + cmd =3D run_command(detect_vendor.path()) > + if cmd.returncode() =3D=3D 0 > + cmd_output =3D cmd.stdout().to_lower().strip().split(' ') > + endif > + # Set to generic if variable is not found > + machine =3D get_variable('impl_' + cmd_output[0], ['generic']) > + if machine[0] =3D=3D 'generic' > machine =3D impl_generic > - impl_pn =3D 'default' > - elif not meson.is_cross_build() > - # The script returns ['Implementer', 'Variant', 'Architec= ture', > - # 'Primary Part number', 'Revision'] > - detect_vendor =3D find_program(join_paths( > - meson.current_source_dir(), 'armv8_machin= e.py')) > - cmd =3D run_command(detect_vendor.path()) > - if cmd.returncode() =3D=3D 0 > - cmd_output =3D cmd.stdout().to_lower().strip().sp= lit(' ') > - endif > - # Set to generic if variable is not found > - machine =3D get_variable('impl_' + cmd_output[0], ['gener= ic']) > - if machine[0] =3D=3D 'generic' > - machine =3D impl_generic > - cmd_output =3D cmd_generic > - endif > - impl_pn =3D cmd_output[3] > - if arm_force_native_march =3D=3D true > - impl_pn =3D 'native' > - endif > - else > - impl_id =3D meson.get_cross_property('implementor_id', 'g= eneric') > - impl_pn =3D meson.get_cross_property('implementor_pn', 'd= efault') > - machine =3D get_variable('impl_' + impl_id) > + cmd_output =3D cmd_generic > endif > - > - # Apply Common Defaults. These settings may be overwritten by mac= hine > - # settings later. > - foreach flag: flags_common_default > - if flag.length() > 0 > - dpdk_conf.set(flag[0], flag[1]) > - endif > - endforeach > - > - message('Implementer : ' + machine[0]) > - foreach flag: machine[1] > - if flag.length() > 0 > - dpdk_conf.set(flag[0], flag[1]) > - endif > - endforeach > - > - foreach marg: machine[2] > - if marg[0] =3D=3D impl_pn > - foreach flag: marg[1] > - if cc.has_argument(flag) > - machine_args +=3D flag > - endif > - endforeach > - # Apply any extra machine specific flags. > - foreach flag: marg.get(2, flags_default_extra) > - if flag.length() > 0 > - dpdk_conf.set(flag[0], flag[1]) > - endif > - endforeach > - endif > - endforeach > + impl_pn =3D cmd_output[3] > + if arm_force_native_march =3D=3D true > + impl_pn =3D 'native' > + endif > +else > + impl_id =3D meson.get_cross_property('implementor_id', 'generic') > + impl_pn =3D meson.get_cross_property('implementor_pn', 'default') > + machine =3D get_variable('impl_' + impl_id) > endif > + > +# Apply Common Defaults. These settings may be overwritten by machine > +# settings later. > +foreach flag: flags_common_default > + if flag.length() > 0 > + dpdk_conf.set(flag[0], flag[1]) > + endif > +endforeach > + > +message('Implementer : ' + machine[0]) > +foreach flag: machine[1] > + if flag.length() > 0 > + dpdk_conf.set(flag[0], flag[1]) > + endif > +endforeach > + > +foreach marg: machine[2] > + if marg[0] =3D=3D impl_pn > + foreach flag: marg[1] > + if cc.has_argument(flag) > + machine_args +=3D flag > + endif > + endforeach > + # Apply any extra machine specific flags. > + foreach flag: marg.get(2, flags_default_extra) > + if flag.length() > 0 > + dpdk_conf.set(flag[0], flag[1]) > + message('Setting flag: @0@: @1@'.format(= flag[0], flag[1])) > + endif > + endforeach > + endif > +endforeach > message(machine_args) > > if (cc.get_define('__ARM_NEON', args: machine_args) !=3D '' or > -- > 2.20.1 >