[dpdk-stable] patch 'compress/isal: fix getting information about CPU' has been queued to LTS release 18.11.2

Kevin Traynor ktraynor at redhat.com
Thu Apr 25 17:40:20 CEST 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/01/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches can be viewed on the 18.11 branch at:
	https://github.com/kevintraynor/dpdk-stable-queue.git

Thanks.

Kevin Traynor

---
>From 5f90208ac879367e413e70467c5b86f694fa54e3 Mon Sep 17 00:00:00 2001
From: Tomasz Cel <tomaszx.cel at intel.com>
Date: Thu, 7 Mar 2019 12:28:21 +0100
Subject: [PATCH] compress/isal: fix getting information about CPU

[ upstream commit bbbc39b2c2e5deb3eaa182c3ddb86aafc2ab962f ]

This patch adds query about CPU features

Fixes: 53a9baa98c36 ("compress/isal: add basic PMD ops")

Signed-off-by: Tomasz Cel <tomaszx.cel at intel.com>
Acked-by: Lee Daly <lee.daly at 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 41cade87e..472e54e8e 100644
--- a/drivers/compress/isal/isal_compress_pmd_ops.c
+++ b/drivers/compress/isal/isal_compress_pmd_ops.c
@@ -134,8 +134,16 @@ 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;
 	}
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-25 16:37:48.689333393 +0100
+++ 0045-compress-isal-fix-getting-information-about-CPU.patch	2019-04-25 16:37:46.758294652 +0100
@@ -1 +1 @@
-From bbbc39b2c2e5deb3eaa182c3ddb86aafc2ab962f Mon Sep 17 00:00:00 2001
+From 5f90208ac879367e413e70467c5b86f694fa54e3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bbbc39b2c2e5deb3eaa182c3ddb86aafc2ab962f ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
-index 7b9184922..fe9995992 100644
+index 41cade87e..472e54e8e 100644
@@ -21 +22 @@
-@@ -136,8 +136,16 @@ isal_comp_pmd_info_get(struct rte_compressdev *dev __rte_unused,
+@@ -134,8 +134,16 @@ isal_comp_pmd_info_get(struct rte_compressdev *dev __rte_unused,


More information about the stable mailing list