[dpdk-dev] [PATCH v4 6/8] eal/x86: identify AVX512 extensions flag

Liu, Yong yong.liu at intel.com
Wed Apr 15 16:57:12 CEST 2020


Thanks for note, David.  Kevin's patch can fully cover this one.  

> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: Wednesday, April 15, 2020 9:32 PM
> To: Liu, Yong <yong.liu at intel.com>
> Cc: Maxime Coquelin <maxime.coquelin at redhat.com>; Ye, Xiaolong
> <xiaolong.ye at intel.com>; Wang, Zhihong <zhihong.wang at intel.com>; Van
> Haaren, Harry <harry.van.haaren at intel.com>; dev <dev at dpdk.org>; Laatz,
> Kevin <kevin.laatz at intel.com>; Kinsella, Ray <ray.kinsella at intel.com>
> Subject: Re: [dpdk-dev] [PATCH v4 6/8] eal/x86: identify AVX512 extensions
> flag
> 
> On Wed, Apr 15, 2020 at 11:14 AM Marvin Liu <yong.liu at intel.com> wrote:
> >
> > Read CPUID to check if AVX512 extensions are supported.
> >
> > Signed-off-by: Marvin Liu <yong.liu at intel.com>
> >
> > diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> > index 6492df556..54e9f6185 100644
> > --- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> > +++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> > @@ -109,6 +109,9 @@ const struct feature_entry rte_cpu_feature_table[]
> = {
> >         FEAT_DEF(RTM, 0x00000007, 0, RTE_REG_EBX, 11)
> >         FEAT_DEF(AVX512F, 0x00000007, 0, RTE_REG_EBX, 16)
> >         FEAT_DEF(RDSEED, 0x00000007, 0, RTE_REG_EBX, 18)
> > +       FEAT_DEF(AVX512CD, 0x00000007, 0, RTE_REG_EBX, 28)
> > +       FEAT_DEF(AVX512BW, 0x00000007, 0, RTE_REG_EBX, 30)
> > +       FEAT_DEF(AVX512VL, 0x00000007, 0, RTE_REG_EBX, 31)
> >
> >         FEAT_DEF(LAHF_SAHF, 0x80000001, 0, RTE_REG_ECX,  0)
> >         FEAT_DEF(LZCNT, 0x80000001, 0, RTE_REG_ECX,  4)
> > diff --git a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> > index 25ba47b96..5bf99e05f 100644
> > --- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> > +++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> > @@ -98,6 +98,9 @@ enum rte_cpu_flag_t {
> >         RTE_CPUFLAG_RTM,                    /**< Transactional memory */
> >         RTE_CPUFLAG_AVX512F,                /**< AVX512F */
> >         RTE_CPUFLAG_RDSEED,                 /**< RDSEED instruction */
> > +       RTE_CPUFLAG_AVX512CD,               /**< AVX512CD */
> > +       RTE_CPUFLAG_AVX512BW,               /**< AVX512BW */
> > +       RTE_CPUFLAG_AVX512VL,               /**< AVX512VL */
> >
> >         /* (EAX 80000001h) ECX features */
> >         RTE_CPUFLAG_LAHF_SAHF,              /**< LAHF_SAHF */
> 
> This patch most likely breaks the ABI (renumbering flags after
> RTE_CPUFLAG_LAHF_SAHF).
> This change should not go through the virtio tree and is not rebased on
> master.
> A similar patch had been proposed by Kevin:
> http://patchwork.dpdk.org/patch/67438/
> 
> 
> --
> David Marchand



More information about the dev mailing list