DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <akhil.goyal@nxp.com>
To: Tomasz Cel <tomaszx.cel@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	"fiona.trahe@intel.com" <fiona.trahe@intel.com>,
	"lee.daly@intel.com" <lee.daly@intel.com>
Subject: Re: [dpdk-dev] [PATCH] compress/isal: fix getting information about CPU
Date: Wed, 27 Mar 2019 14:05:41 +0000	[thread overview]
Message-ID: <bd24b0fb-f548-738a-b634-717c09a6f9af@nxp.com> (raw)
Message-ID: <20190327140541.8AaK_4VH8MRGsaPlGChRugiWviZU1LIxIA7V8qhJB10@z> (raw)
In-Reply-To: <1551958101-15679-1-git-send-email-tomaszx.cel@intel.com>

Hi Fiona/Lee,

Could you please review this patch.

Thanks,
Akhil

On 3/7/2019 4:58 PM, Tomasz Cel wrote:
> This patch adds query about CPU features
>
> Fixes: 53a9baa98c36 ("compress/isal: add basic PMD ops")
> Cc: stable@dpdk.org
>
> Signed-off-by: Tomasz Cel <tomaszx.cel@intel.com>
> ---
>   drivers/compress/isal/isal_compress_pmd_ops.c | 16 ++++++++++++----
>   1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c b/drivers/compress/isal/isal_compress_pmd_ops.c
> index 7b91849..fe99959 100644
> --- a/drivers/compress/isal/isal_compress_pmd_ops.c
> +++ b/drivers/compress/isal/isal_compress_pmd_ops.c
> @@ -135,10 +135,18 @@ isal_comp_pmd_info_get(struct rte_compressdev *dev __rte_unused,
>   {
>   	if (dev_info != NULL) {
>   		dev_info->capabilities = isal_pmd_capabilities;
> -		dev_info->feature_flags = RTE_COMPDEV_FF_CPU_AVX512 |
> -				RTE_COMPDEV_FF_CPU_AVX2 |
> -				RTE_COMPDEV_FF_CPU_AVX |
> -				RTE_COMPDEV_FF_CPU_SSE;
> +
> +		/* Check CPU for supported vector instruction and set
> +		 * feature_flags
> +		 */
> +		if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F))
> +			dev_info->feature_flags |= RTE_COMPDEV_FF_CPU_AVX512;
> +		else if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2))
> +			dev_info->feature_flags |= RTE_COMPDEV_FF_CPU_AVX2;
> +		else if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX))
> +			dev_info->feature_flags |= RTE_COMPDEV_FF_CPU_AVX;
> +		else
> +			dev_info->feature_flags |= RTE_COMPDEV_FF_CPU_SSE;
>   	}
>   }
>   


  reply	other threads:[~2019-03-27 14:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 11:28 Tomasz Cel
2019-03-27 14:05 ` Akhil Goyal [this message]
2019-03-27 14:05   ` Akhil Goyal
2019-03-27 15:01   ` Daly, Lee
2019-03-27 15:01     ` Daly, Lee
2019-03-29 15:28     ` Daly, Lee
2019-03-29 15:28       ` Daly, Lee
2019-03-29 15:37       ` Akhil Goyal
2019-03-29 15:37         ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd24b0fb-f548-738a-b634-717c09a6f9af@nxp.com \
    --to=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=lee.daly@intel.com \
    --cc=stable@dpdk.org \
    --cc=tomaszx.cel@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).