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 7A01CA0563; Wed, 15 Apr 2020 15:32:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E5FCC1D715; Wed, 15 Apr 2020 15:32:13 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id D9D1E1D6FC for ; Wed, 15 Apr 2020 15:32:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586957532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=22M9R1LepDokH3v7qwnCR77fqRLiMQ2nOlofcipFeas=; b=FK6HarhvROTU1wGVhi5bfZfwRp26+BG9OpsqvcuQhHnb3FhrNP8M0+lTpv3Cq2bW2Pv2nO xnkUVVqg0ABy+PmuZEdFfgQ+dvaAMTL1SyQeIZGSwMocjGgGdXj6SmuIelcKzhvU2k5KNH 5yQU1WpGuC60G/uW0itiXehcjWY2b18= Received: from mail-io1-f72.google.com (mail-io1-f72.google.com [209.85.166.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-88-hjmUGV1_NsCk6TIBTjNhAw-1; Wed, 15 Apr 2020 09:32:08 -0400 X-MC-Unique: hjmUGV1_NsCk6TIBTjNhAw-1 Received: by mail-io1-f72.google.com with SMTP id v19so19007468ioq.16 for ; Wed, 15 Apr 2020 06:32:08 -0700 (PDT) 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; bh=zpzQ5yWhOIJgz1n3s7pXaq8QrAq93P/lkXesctja/BI=; b=qm5COYGnXdKdbme9TmosuumhCrgjhsQfJi4Oi5m8fkX6DQChmrcdAyyhWBFuiupZtV ErH5lywvWP+pagfOGSrQzR/MwAaaZ3CGQNvUg5ZEK5HP43jtGhzh9PW+NKWoyDOvZ0Ze EoYf3APUWD1remRvr/QUVdhjMO7K9nwDkUDrz7QbgCMCOKZU1dUNuJ4id4g4TDon/MlP EBXR4tT0HFfB3L11u24eJqfRJT3jAsGFiOSPTrVtx374LaTVgsTy946SaDdzvsQFcBPK fSENRktuLlZmlEqVM5tbqKP/g7TpSPeTO9zwqIT46NQxlNu/rRD771BU2COL+3hc0brU jXxA== X-Gm-Message-State: AGi0PubC7sp5p6OEu3HJA3FCG+gTAz1bx/iy2ejv5RSlk+ty4r+U0L7N OIFYDGFuc2nHj1Lw65XNrAb5e3rGk3igCQE7CAlS5ru+0kC/goFOWrUhseQ3YA6QRnkKf26Ynm2 woM9Te38N6DvFzB8CnLM= X-Received: by 2002:a92:d912:: with SMTP id s18mr472143iln.30.1586957528157; Wed, 15 Apr 2020 06:32:08 -0700 (PDT) X-Google-Smtp-Source: APiQypJ3lJ5hbMlRYLRjqEHHjYa+ittd0nTHk3FMSpc6p30HWldOWx1it/Do5NSohUu/en1oll41xcap3NN/WAr+64M= X-Received: by 2002:a92:d912:: with SMTP id s18mr472120iln.30.1586957527935; Wed, 15 Apr 2020 06:32:07 -0700 (PDT) MIME-Version: 1.0 References: <20200313174230.74661-1-yong.liu@intel.com> <20200415164733.75416-1-yong.liu@intel.com> <20200415164733.75416-7-yong.liu@intel.com> In-Reply-To: <20200415164733.75416-7-yong.liu@intel.com> From: David Marchand Date: Wed, 15 Apr 2020 15:31:57 +0200 Message-ID: To: Marvin Liu Cc: Maxime Coquelin , Xiaolong Ye , Zhihong Wang , Van Haaren Harry , dev , Kevin Laatz , "Kinsella, Ray" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v4 6/8] eal/x86: identify AVX512 extensions flag 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 Wed, Apr 15, 2020 at 11:14 AM Marvin Liu wrote: > > Read CPUID to check if AVX512 extensions are supported. > > Signed-off-by: Marvin Liu > > diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_e= al/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[] = =3D { > 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 mas= ter. A similar patch had been proposed by Kevin: http://patchwork.dpdk.org/patch/67438/ --=20 David Marchand