DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH 00/17] Add CPU flags
@ 2020-03-24 11:49 Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 01/17] eal/cpuflags: add avx512 doubleword and quadword Kevin Laatz
                   ` (18 more replies)
  0 siblings, 19 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

This patch set adds CPU flags which will enable the detection of ISA
features available on more recent x86 based CPUs.

The CPUID leaf information can be found in Section 1.7 of this
document:
https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf

Kevin Laatz (17):
  eal/cpuflags: add avx512 doubleword and quadword
  eal/cpuflags: add avx512 integer fused multiply-add
  eal/cpuflags: add avx512 conflict detection
  eal/cpuflags: add avx512 byte and word
  eal/cpuflags: add avx512 vector length
  eal/cpuflags: add avx512 vector bit manipulation
  eal/cpuflags: add avx512 vector bit manipulation 2
  eal/cpuflags: add galois field new instructions
  eal/cpuflags: add vector AES
  eal/cpuflags: add vector carry-less multiply
  eal/cpuflags: add avx512 vector neural network instructions
  eal/cpuflags: add avx512 bit algorithms
  eal/cpuflags: add avx512 vector popcount
  eal/cpuflags: add cache line demote
  eal/cpuflags: add direct store instructions
  eal/cpuflags: add direct store instructions 64B
  eal/cpuflags: add avx512 two register intersection

 lib/librte_eal/common/arch/x86/rte_cpuflags.c  | 18 ++++++++++++++++++
 .../common/include/arch/x86/rte_cpuflags.h     | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 01/17] eal/cpuflags: add avx512 doubleword and quadword
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 02/17] eal/cpuflags: add avx512 integer fused multiply-add Kevin Laatz
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for AVX-512 doubleword and quadword instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 2 ++
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index 6492df556..2e2fbec1c 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -120,6 +120,8 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(EM64T, 0x80000001, 0, RTE_REG_EDX, 29)
 
 	FEAT_DEF(INVTSC, 0x80000007, 0, RTE_REG_EDX,  8)
+
+	FEAT_DEF(AVX512DQ, 0x00000007, 0, RTE_REG_EBX, 17)
 };
 
 int
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..cec45c382 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -113,6 +113,8 @@ enum rte_cpu_flag_t {
 	/* (EAX 80000007h) EDX features */
 	RTE_CPUFLAG_INVTSC,                 /**< INVTSC */
 
+	RTE_CPUFLAG_AVX512DQ,               /**< AVX512 Doubleword and Quadword */
+
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
 };
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 02/17] eal/cpuflags: add avx512 integer fused multiply-add
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 01/17] eal/cpuflags: add avx512 doubleword and quadword Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 03/17] eal/cpuflags: add avx512 conflict detection Kevin Laatz
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for AVX-512 integer fused multiply-add instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index 2e2fbec1c..d56bd57f9 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -122,6 +122,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(INVTSC, 0x80000007, 0, RTE_REG_EDX,  8)
 
 	FEAT_DEF(AVX512DQ, 0x00000007, 0, RTE_REG_EBX, 17)
+	FEAT_DEF(AVX512IFMA, 0x00000007, 0, RTE_REG_EBX, 21)
 };
 
 int
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 cec45c382..81f510299 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -114,6 +114,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_INVTSC,                 /**< INVTSC */
 
 	RTE_CPUFLAG_AVX512DQ,               /**< AVX512 Doubleword and Quadword */
+	RTE_CPUFLAG_AVX512IFMA,             /**< AVX512 Integer Fused Multiply-Add */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 03/17] eal/cpuflags: add avx512 conflict detection
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 01/17] eal/cpuflags: add avx512 doubleword and quadword Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 02/17] eal/cpuflags: add avx512 integer fused multiply-add Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 04/17] eal/cpuflags: add avx512 byte and word Kevin Laatz
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for AVX-512 conflict detection instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index d56bd57f9..928b3513e 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -123,6 +123,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 
 	FEAT_DEF(AVX512DQ, 0x00000007, 0, RTE_REG_EBX, 17)
 	FEAT_DEF(AVX512IFMA, 0x00000007, 0, RTE_REG_EBX, 21)
+	FEAT_DEF(AVX512CD, 0x00000007, 0, RTE_REG_EBX, 28)
 };
 
 int
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 81f510299..248a198a6 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -115,6 +115,7 @@ enum rte_cpu_flag_t {
 
 	RTE_CPUFLAG_AVX512DQ,               /**< AVX512 Doubleword and Quadword */
 	RTE_CPUFLAG_AVX512IFMA,             /**< AVX512 Integer Fused Multiply-Add */
+	RTE_CPUFLAG_AVX512CD,               /**< AVX512 Conflict Detection*/
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 04/17] eal/cpuflags: add avx512 byte and word
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (2 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 03/17] eal/cpuflags: add avx512 conflict detection Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 05/17] eal/cpuflags: add avx512 vector length Kevin Laatz
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for AVX-512 byte and word instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index 928b3513e..c0bb1bd5c 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -124,6 +124,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(AVX512DQ, 0x00000007, 0, RTE_REG_EBX, 17)
 	FEAT_DEF(AVX512IFMA, 0x00000007, 0, RTE_REG_EBX, 21)
 	FEAT_DEF(AVX512CD, 0x00000007, 0, RTE_REG_EBX, 28)
+	FEAT_DEF(AVX512BW, 0x00000007, 0, RTE_REG_EBX, 30)
 };
 
 int
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 248a198a6..97eeeb247 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -116,6 +116,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_AVX512DQ,               /**< AVX512 Doubleword and Quadword */
 	RTE_CPUFLAG_AVX512IFMA,             /**< AVX512 Integer Fused Multiply-Add */
 	RTE_CPUFLAG_AVX512CD,               /**< AVX512 Conflict Detection*/
+	RTE_CPUFLAG_AVX512BW,               /**< AVX512 Byte and Word */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 05/17] eal/cpuflags: add avx512 vector length
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (3 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 04/17] eal/cpuflags: add avx512 byte and word Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 06/17] eal/cpuflags: add avx512 vector bit manipulation Kevin Laatz
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for AVX-512 vector length instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index c0bb1bd5c..21cb4b649 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -125,6 +125,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(AVX512IFMA, 0x00000007, 0, RTE_REG_EBX, 21)
 	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)
 };
 
 int
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 97eeeb247..42181e32c 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -117,6 +117,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_AVX512IFMA,             /**< AVX512 Integer Fused Multiply-Add */
 	RTE_CPUFLAG_AVX512CD,               /**< AVX512 Conflict Detection*/
 	RTE_CPUFLAG_AVX512BW,               /**< AVX512 Byte and Word */
+	RTE_CPUFLAG_AVX512VL,               /**< AVX512 Vector Length */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 06/17] eal/cpuflags: add avx512 vector bit manipulation
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (4 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 05/17] eal/cpuflags: add avx512 vector length Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 07/17] eal/cpuflags: add avx512 vector bit manipulation 2 Kevin Laatz
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for AVX-512 vector bit manipulation instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index 21cb4b649..773b14074 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -126,6 +126,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	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(AVX512VBMI, 0x00000007, 0, RTE_REG_ECX, 1)
 };
 
 int
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 42181e32c..453193875 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -118,6 +118,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_AVX512CD,               /**< AVX512 Conflict Detection*/
 	RTE_CPUFLAG_AVX512BW,               /**< AVX512 Byte and Word */
 	RTE_CPUFLAG_AVX512VL,               /**< AVX512 Vector Length */
+	RTE_CPUFLAG_AVX512VBMI,             /**< AVX512 Vector Bit Manipulation */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 07/17] eal/cpuflags: add avx512 vector bit manipulation 2
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (5 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 06/17] eal/cpuflags: add avx512 vector bit manipulation Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 08/17] eal/cpuflags: add galois field new instructions Kevin Laatz
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for AVX-512 vector bit manipulation 2 instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index 773b14074..d1ef7e229 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -127,6 +127,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(AVX512BW, 0x00000007, 0, RTE_REG_EBX, 30)
 	FEAT_DEF(AVX512VL, 0x00000007, 0, RTE_REG_EBX, 31)
 	FEAT_DEF(AVX512VBMI, 0x00000007, 0, RTE_REG_ECX, 1)
+	FEAT_DEF(AVX512VBMI2, 0x00000007, 0, RTE_REG_ECX, 6)
 };
 
 int
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 453193875..8544f9dca 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -119,6 +119,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_AVX512BW,               /**< AVX512 Byte and Word */
 	RTE_CPUFLAG_AVX512VL,               /**< AVX512 Vector Length */
 	RTE_CPUFLAG_AVX512VBMI,             /**< AVX512 Vector Bit Manipulation */
+	RTE_CPUFLAG_AVX512VBMI2,            /**< AVX512 Vector Bit Manipulation 2 */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 08/17] eal/cpuflags: add galois field new instructions
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (6 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 07/17] eal/cpuflags: add avx512 vector bit manipulation 2 Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 09/17] eal/cpuflags: add vector AES Kevin Laatz
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for Galois field new instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index d1ef7e229..c2a484789 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -128,6 +128,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(AVX512VL, 0x00000007, 0, RTE_REG_EBX, 31)
 	FEAT_DEF(AVX512VBMI, 0x00000007, 0, RTE_REG_ECX, 1)
 	FEAT_DEF(AVX512VBMI2, 0x00000007, 0, RTE_REG_ECX, 6)
+	FEAT_DEF(GFNI, 0x00000007, 0, RTE_REG_ECX, 8)
 };
 
 int
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 8544f9dca..94714c98b 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -120,6 +120,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_AVX512VL,               /**< AVX512 Vector Length */
 	RTE_CPUFLAG_AVX512VBMI,             /**< AVX512 Vector Bit Manipulation */
 	RTE_CPUFLAG_AVX512VBMI2,            /**< AVX512 Vector Bit Manipulation 2 */
+	RTE_CPUFLAG_GFNI,                   /**< Galois Field New Instructions */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 09/17] eal/cpuflags: add vector AES
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (7 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 08/17] eal/cpuflags: add galois field new instructions Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 10/17] eal/cpuflags: add vector carry-less multiply Kevin Laatz
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for vector AES instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index c2a484789..d4caf76d8 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -129,6 +129,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(AVX512VBMI, 0x00000007, 0, RTE_REG_ECX, 1)
 	FEAT_DEF(AVX512VBMI2, 0x00000007, 0, RTE_REG_ECX, 6)
 	FEAT_DEF(GFNI, 0x00000007, 0, RTE_REG_ECX, 8)
+	FEAT_DEF(VAES, 0x00000007, 0, RTE_REG_ECX, 9)
 };
 
 int
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 94714c98b..22efc166f 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -121,6 +121,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_AVX512VBMI,             /**< AVX512 Vector Bit Manipulation */
 	RTE_CPUFLAG_AVX512VBMI2,            /**< AVX512 Vector Bit Manipulation 2 */
 	RTE_CPUFLAG_GFNI,                   /**< Galois Field New Instructions */
+	RTE_CPUFLAG_VAES,                   /**< Vector AES */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 10/17] eal/cpuflags: add vector carry-less multiply
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (8 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 09/17] eal/cpuflags: add vector AES Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 11/17] eal/cpuflags: add avx512 vector neural network instructions Kevin Laatz
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for vector carry-less multiply instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index d4caf76d8..b01f35e1a 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -130,6 +130,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(AVX512VBMI2, 0x00000007, 0, RTE_REG_ECX, 6)
 	FEAT_DEF(GFNI, 0x00000007, 0, RTE_REG_ECX, 8)
 	FEAT_DEF(VAES, 0x00000007, 0, RTE_REG_ECX, 9)
+	FEAT_DEF(VPCLMULQDQ, 0x00000007, 0, RTE_REG_ECX, 10)
 };
 
 int
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 22efc166f..cbcb1cf71 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -122,6 +122,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_AVX512VBMI2,            /**< AVX512 Vector Bit Manipulation 2 */
 	RTE_CPUFLAG_GFNI,                   /**< Galois Field New Instructions */
 	RTE_CPUFLAG_VAES,                   /**< Vector AES */
+	RTE_CPUFLAG_VPCLMULQDQ,             /**< Vector Carry-less Multiply */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 11/17] eal/cpuflags: add avx512 vector neural network instructions
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (9 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 10/17] eal/cpuflags: add vector carry-less multiply Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 12/17] eal/cpuflags: add avx512 bit algorithms Kevin Laatz
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for AVX-512 vector neural network instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index b01f35e1a..f82d45647 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -131,6 +131,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(GFNI, 0x00000007, 0, RTE_REG_ECX, 8)
 	FEAT_DEF(VAES, 0x00000007, 0, RTE_REG_ECX, 9)
 	FEAT_DEF(VPCLMULQDQ, 0x00000007, 0, RTE_REG_ECX, 10)
+	FEAT_DEF(AVX512VNNI, 0x00000007, 0, RTE_REG_ECX, 11)
 };
 
 int
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 cbcb1cf71..caf92b9f3 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -123,6 +123,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_GFNI,                   /**< Galois Field New Instructions */
 	RTE_CPUFLAG_VAES,                   /**< Vector AES */
 	RTE_CPUFLAG_VPCLMULQDQ,             /**< Vector Carry-less Multiply */
+	RTE_CPUFLAG_AVX512VNNI,             /**< AVX512 Vector Neural Network Instructions */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 12/17] eal/cpuflags: add avx512 bit algorithms
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (10 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 11/17] eal/cpuflags: add avx512 vector neural network instructions Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 13/17] eal/cpuflags: add avx512 vector popcount Kevin Laatz
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag AVX-512 for bit algorithm instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index f82d45647..472becfed 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -132,6 +132,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(VAES, 0x00000007, 0, RTE_REG_ECX, 9)
 	FEAT_DEF(VPCLMULQDQ, 0x00000007, 0, RTE_REG_ECX, 10)
 	FEAT_DEF(AVX512VNNI, 0x00000007, 0, RTE_REG_ECX, 11)
+	FEAT_DEF(AVX512BITALG, 0x00000007, 0, RTE_REG_ECX, 12)
 };
 
 int
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 caf92b9f3..fe4144fc0 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -124,6 +124,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_VAES,                   /**< Vector AES */
 	RTE_CPUFLAG_VPCLMULQDQ,             /**< Vector Carry-less Multiply */
 	RTE_CPUFLAG_AVX512VNNI,             /**< AVX512 Vector Neural Network Instructions */
+	RTE_CPUFLAG_AVX512BITALG,           /**< AVX512 Bit Algorithms */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 13/17] eal/cpuflags: add avx512 vector popcount
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (11 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 12/17] eal/cpuflags: add avx512 bit algorithms Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 14/17] eal/cpuflags: add cache line demote Kevin Laatz
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for AVX-512 vector popcount instructions.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index 472becfed..0b1458d77 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -133,6 +133,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(VPCLMULQDQ, 0x00000007, 0, RTE_REG_ECX, 10)
 	FEAT_DEF(AVX512VNNI, 0x00000007, 0, RTE_REG_ECX, 11)
 	FEAT_DEF(AVX512BITALG, 0x00000007, 0, RTE_REG_ECX, 12)
+	FEAT_DEF(AVX512VPOPCNTDQ, 0x00000007, 0, RTE_REG_ECX,  14)
 };
 
 int
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 fe4144fc0..63281ef5e 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -125,6 +125,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_VPCLMULQDQ,             /**< Vector Carry-less Multiply */
 	RTE_CPUFLAG_AVX512VNNI,             /**< AVX512 Vector Neural Network Instructions */
 	RTE_CPUFLAG_AVX512BITALG,           /**< AVX512 Bit Algorithms */
+	RTE_CPUFLAG_AVX512VPOPCNTDQ,        /**< AVX512 Vector Popcount */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 14/17] eal/cpuflags: add cache line demote
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (12 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 13/17] eal/cpuflags: add avx512 vector popcount Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 15/17] eal/cpuflags: add direct store instructions Kevin Laatz
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for cache line demote instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index 0b1458d77..ac1de715d 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -134,6 +134,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(AVX512VNNI, 0x00000007, 0, RTE_REG_ECX, 11)
 	FEAT_DEF(AVX512BITALG, 0x00000007, 0, RTE_REG_ECX, 12)
 	FEAT_DEF(AVX512VPOPCNTDQ, 0x00000007, 0, RTE_REG_ECX,  14)
+	FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25)
 };
 
 int
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 63281ef5e..3a60f3e68 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -126,6 +126,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_AVX512VNNI,             /**< AVX512 Vector Neural Network Instructions */
 	RTE_CPUFLAG_AVX512BITALG,           /**< AVX512 Bit Algorithms */
 	RTE_CPUFLAG_AVX512VPOPCNTDQ,        /**< AVX512 Vector Popcount */
+	RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 15/17] eal/cpuflags: add direct store instructions
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (13 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 14/17] eal/cpuflags: add cache line demote Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 16/17] eal/cpuflags: add direct store instructions 64B Kevin Laatz
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for direct store instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index ac1de715d..eb9f6b59d 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -135,6 +135,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(AVX512BITALG, 0x00000007, 0, RTE_REG_ECX, 12)
 	FEAT_DEF(AVX512VPOPCNTDQ, 0x00000007, 0, RTE_REG_ECX,  14)
 	FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25)
+	FEAT_DEF(MOVDIRI, 0x00000007, 0, RTE_REG_ECX, 27)
 };
 
 int
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 3a60f3e68..b39abfc38 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -127,6 +127,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_AVX512BITALG,           /**< AVX512 Bit Algorithms */
 	RTE_CPUFLAG_AVX512VPOPCNTDQ,        /**< AVX512 Vector Popcount */
 	RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
+	RTE_CPUFLAG_MOVDIRI,                /**< Direct Store Instructions */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 16/17] eal/cpuflags: add direct store instructions 64B
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (14 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 15/17] eal/cpuflags: add direct store instructions Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 17/17] eal/cpuflags: add avx512 two register intersection Kevin Laatz
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for direct store 64B instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index eb9f6b59d..164381684 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -136,6 +136,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(AVX512VPOPCNTDQ, 0x00000007, 0, RTE_REG_ECX,  14)
 	FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25)
 	FEAT_DEF(MOVDIRI, 0x00000007, 0, RTE_REG_ECX, 27)
+	FEAT_DEF(MOVDIR64B, 0x00000007, 0, RTE_REG_ECX, 28)
 };
 
 int
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 b39abfc38..2379d073d 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -128,6 +128,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_AVX512VPOPCNTDQ,        /**< AVX512 Vector Popcount */
 	RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
 	RTE_CPUFLAG_MOVDIRI,                /**< Direct Store Instructions */
+	RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store Instructions 64B */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH 17/17] eal/cpuflags: add avx512 two register intersection
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (15 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 16/17] eal/cpuflags: add direct store instructions 64B Kevin Laatz
@ 2020-03-24 11:49 ` Kevin Laatz
  2020-03-25  8:36 ` [dpdk-dev] [PATCH 00/17] Add CPU flags David Marchand
  2020-03-25 11:10 ` [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags Kevin Laatz
  18 siblings, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

Add the CPU flag for AVX-512 two register intersection instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c         | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cpuflags.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index 164381684..30439e795 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -137,6 +137,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25)
 	FEAT_DEF(MOVDIRI, 0x00000007, 0, RTE_REG_ECX, 27)
 	FEAT_DEF(MOVDIR64B, 0x00000007, 0, RTE_REG_ECX, 28)
+	FEAT_DEF(AVX512VP2INTERSECT, 0x00000007, 0, RTE_REG_EDX, 8)
 };
 
 int
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 2379d073d..f8f73b19f 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -129,6 +129,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
 	RTE_CPUFLAG_MOVDIRI,                /**< Direct Store Instructions */
 	RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store Instructions 64B */
+	RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register Intersection */
 
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [dpdk-dev] [PATCH 00/17] Add CPU flags
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (16 preceding siblings ...)
  2020-03-24 11:49 ` [dpdk-dev] [PATCH 17/17] eal/cpuflags: add avx512 two register intersection Kevin Laatz
@ 2020-03-25  8:36 ` David Marchand
  2020-03-25 11:10 ` [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags Kevin Laatz
  18 siblings, 0 replies; 29+ messages in thread
From: David Marchand @ 2020-03-25  8:36 UTC (permalink / raw)
  To: Kevin Laatz; +Cc: dev, Bruce Richardson, Van Haaren Harry

On Tue, Mar 24, 2020 at 12:49 PM Kevin Laatz <kevin.laatz@intel.com> wrote:
> This patch set adds CPU flags which will enable the detection of ISA
> features available on more recent x86 based CPUs.
>
> The CPUID leaf information can be found in Section 1.7 of this
> document:
> https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf
>
> Kevin Laatz (17):
>   eal/cpuflags: add avx512 doubleword and quadword
>   eal/cpuflags: add avx512 integer fused multiply-add
>   eal/cpuflags: add avx512 conflict detection
>   eal/cpuflags: add avx512 byte and word
>   eal/cpuflags: add avx512 vector length
>   eal/cpuflags: add avx512 vector bit manipulation
>   eal/cpuflags: add avx512 vector bit manipulation 2
>   eal/cpuflags: add galois field new instructions
>   eal/cpuflags: add vector AES
>   eal/cpuflags: add vector carry-less multiply
>   eal/cpuflags: add avx512 vector neural network instructions
>   eal/cpuflags: add avx512 bit algorithms
>   eal/cpuflags: add avx512 vector popcount
>   eal/cpuflags: add cache line demote
>   eal/cpuflags: add direct store instructions
>   eal/cpuflags: add direct store instructions 64B
>   eal/cpuflags: add avx512 two register intersection
>
>  lib/librte_eal/common/arch/x86/rte_cpuflags.c  | 18 ++++++++++++++++++
>  .../common/include/arch/x86/rte_cpuflags.h     | 18 ++++++++++++++++++
>  2 files changed, 36 insertions(+)

You are just adding definitions, the review should be straightforward
for guys in the know.
I can see little value in splitting in that many patches.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags
  2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
                   ` (17 preceding siblings ...)
  2020-03-25  8:36 ` [dpdk-dev] [PATCH 00/17] Add CPU flags David Marchand
@ 2020-03-25 11:10 ` Kevin Laatz
  2020-03-27 12:24   ` David Marchand
  2020-03-30 12:15   ` [dpdk-dev] [PATCH v3] " Kevin Laatz
  18 siblings, 2 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-25 11:10 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, harry.van.haaren, Kevin Laatz

This patch adds CPU flags which will enable the detection of ISA
features available on more recent x86 based CPUs.

The CPUID leaf information can be found in Section 1.7 of this
document:
https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf

The following CPU flags are added in this patch:
    - AVX-512 doubleword and quadword instructions.
    - AVX-512 integer fused multiply-add instructions.
    - AVX-512 conflict detection instructions.
    - AVX-512 byte and word instructions.
    - AVX-512 vector length instructions.
    - AVX-512 vector bit manipulation instructions.
    - AVX-512 vector bit manipulation 2 instructions.
    - Galois field new instructions.
    - Vector AES instructions.
    - Vector carry-less multiply instructions.
    - AVX-512 vector neural network instructions.
    - AVX-512 for bit algorithm instructions.
    - AVX-512 vector popcount instructions.
    - Cache line demote instructions.
    - Direct store instructions.
    - Direct store 64B instructions.
    - AVX-512 two register intersection instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_cpuflags.c  | 18 ++++++++++++++++++
 .../common/include/arch/x86/rte_cpuflags.h     | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index 6492df556..30439e795 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -120,6 +120,24 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(EM64T, 0x80000001, 0, RTE_REG_EDX, 29)
 
 	FEAT_DEF(INVTSC, 0x80000007, 0, RTE_REG_EDX,  8)
+
+	FEAT_DEF(AVX512DQ, 0x00000007, 0, RTE_REG_EBX, 17)
+	FEAT_DEF(AVX512IFMA, 0x00000007, 0, RTE_REG_EBX, 21)
+	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(AVX512VBMI, 0x00000007, 0, RTE_REG_ECX, 1)
+	FEAT_DEF(AVX512VBMI2, 0x00000007, 0, RTE_REG_ECX, 6)
+	FEAT_DEF(GFNI, 0x00000007, 0, RTE_REG_ECX, 8)
+	FEAT_DEF(VAES, 0x00000007, 0, RTE_REG_ECX, 9)
+	FEAT_DEF(VPCLMULQDQ, 0x00000007, 0, RTE_REG_ECX, 10)
+	FEAT_DEF(AVX512VNNI, 0x00000007, 0, RTE_REG_ECX, 11)
+	FEAT_DEF(AVX512BITALG, 0x00000007, 0, RTE_REG_ECX, 12)
+	FEAT_DEF(AVX512VPOPCNTDQ, 0x00000007, 0, RTE_REG_ECX,  14)
+	FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25)
+	FEAT_DEF(MOVDIRI, 0x00000007, 0, RTE_REG_ECX, 27)
+	FEAT_DEF(MOVDIR64B, 0x00000007, 0, RTE_REG_ECX, 28)
+	FEAT_DEF(AVX512VP2INTERSECT, 0x00000007, 0, RTE_REG_EDX, 8)
 };
 
 int
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..f8f73b19f 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -113,6 +113,24 @@ enum rte_cpu_flag_t {
 	/* (EAX 80000007h) EDX features */
 	RTE_CPUFLAG_INVTSC,                 /**< INVTSC */
 
+	RTE_CPUFLAG_AVX512DQ,               /**< AVX512 Doubleword and Quadword */
+	RTE_CPUFLAG_AVX512IFMA,             /**< AVX512 Integer Fused Multiply-Add */
+	RTE_CPUFLAG_AVX512CD,               /**< AVX512 Conflict Detection*/
+	RTE_CPUFLAG_AVX512BW,               /**< AVX512 Byte and Word */
+	RTE_CPUFLAG_AVX512VL,               /**< AVX512 Vector Length */
+	RTE_CPUFLAG_AVX512VBMI,             /**< AVX512 Vector Bit Manipulation */
+	RTE_CPUFLAG_AVX512VBMI2,            /**< AVX512 Vector Bit Manipulation 2 */
+	RTE_CPUFLAG_GFNI,                   /**< Galois Field New Instructions */
+	RTE_CPUFLAG_VAES,                   /**< Vector AES */
+	RTE_CPUFLAG_VPCLMULQDQ,             /**< Vector Carry-less Multiply */
+	RTE_CPUFLAG_AVX512VNNI,             /**< AVX512 Vector Neural Network Instructions */
+	RTE_CPUFLAG_AVX512BITALG,           /**< AVX512 Bit Algorithms */
+	RTE_CPUFLAG_AVX512VPOPCNTDQ,        /**< AVX512 Vector Popcount */
+	RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
+	RTE_CPUFLAG_MOVDIRI,                /**< Direct Store Instructions */
+	RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store Instructions 64B */
+	RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register Intersection */
+
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
 };
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags
  2020-03-25 11:10 ` [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags Kevin Laatz
@ 2020-03-27 12:24   ` David Marchand
  2020-03-27 13:18     ` Van Haaren, Harry
  2020-03-27 13:44     ` Neil Horman
  2020-03-30 12:15   ` [dpdk-dev] [PATCH v3] " Kevin Laatz
  1 sibling, 2 replies; 29+ messages in thread
From: David Marchand @ 2020-03-27 12:24 UTC (permalink / raw)
  To: Kevin Laatz
  Cc: dev, Bruce Richardson, Van Haaren Harry, Neil Horman,
	Thomas Monjalon, Honnappa Nagarahalli, Dodji Seketeli

On Wed, Mar 25, 2020 at 12:11 PM Kevin Laatz <kevin.laatz@intel.com> wrote:
>
> This patch adds CPU flags which will enable the detection of ISA
> features available on more recent x86 based CPUs.
>
> The CPUID leaf information can be found in Section 1.7 of this
> document:
> https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf
>
> The following CPU flags are added in this patch:
>     - AVX-512 doubleword and quadword instructions.
>     - AVX-512 integer fused multiply-add instructions.
>     - AVX-512 conflict detection instructions.
>     - AVX-512 byte and word instructions.
>     - AVX-512 vector length instructions.
>     - AVX-512 vector bit manipulation instructions.
>     - AVX-512 vector bit manipulation 2 instructions.
>     - Galois field new instructions.
>     - Vector AES instructions.
>     - Vector carry-less multiply instructions.
>     - AVX-512 vector neural network instructions.
>     - AVX-512 for bit algorithm instructions.
>     - AVX-512 vector popcount instructions.
>     - Cache line demote instructions.
>     - Direct store instructions.
>     - Direct store 64B instructions.
>     - AVX-512 two register intersection instructions.
>
> Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
> ---
>  lib/librte_eal/common/arch/x86/rte_cpuflags.c  | 18 ++++++++++++++++++
>  .../common/include/arch/x86/rte_cpuflags.h     | 18 ++++++++++++++++++
>  2 files changed, 36 insertions(+)
>
> diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> index 6492df556..30439e795 100644
> --- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> +++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> @@ -120,6 +120,24 @@ const struct feature_entry rte_cpu_feature_table[] = {
>         FEAT_DEF(EM64T, 0x80000001, 0, RTE_REG_EDX, 29)
>
>         FEAT_DEF(INVTSC, 0x80000007, 0, RTE_REG_EDX,  8)
> +
> +       FEAT_DEF(AVX512DQ, 0x00000007, 0, RTE_REG_EBX, 17)
> +       FEAT_DEF(AVX512IFMA, 0x00000007, 0, RTE_REG_EBX, 21)
> +       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(AVX512VBMI, 0x00000007, 0, RTE_REG_ECX, 1)
> +       FEAT_DEF(AVX512VBMI2, 0x00000007, 0, RTE_REG_ECX, 6)
> +       FEAT_DEF(GFNI, 0x00000007, 0, RTE_REG_ECX, 8)
> +       FEAT_DEF(VAES, 0x00000007, 0, RTE_REG_ECX, 9)
> +       FEAT_DEF(VPCLMULQDQ, 0x00000007, 0, RTE_REG_ECX, 10)
> +       FEAT_DEF(AVX512VNNI, 0x00000007, 0, RTE_REG_ECX, 11)
> +       FEAT_DEF(AVX512BITALG, 0x00000007, 0, RTE_REG_ECX, 12)
> +       FEAT_DEF(AVX512VPOPCNTDQ, 0x00000007, 0, RTE_REG_ECX,  14)
> +       FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25)
> +       FEAT_DEF(MOVDIRI, 0x00000007, 0, RTE_REG_ECX, 27)
> +       FEAT_DEF(MOVDIR64B, 0x00000007, 0, RTE_REG_ECX, 28)
> +       FEAT_DEF(AVX512VP2INTERSECT, 0x00000007, 0, RTE_REG_EDX, 8)
>  };
>
>  int
> 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..f8f73b19f 100644
> --- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> +++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> @@ -113,6 +113,24 @@ enum rte_cpu_flag_t {
>         /* (EAX 80000007h) EDX features */
>         RTE_CPUFLAG_INVTSC,                 /**< INVTSC */
>
> +       RTE_CPUFLAG_AVX512DQ,               /**< AVX512 Doubleword and Quadword */
> +       RTE_CPUFLAG_AVX512IFMA,             /**< AVX512 Integer Fused Multiply-Add */
> +       RTE_CPUFLAG_AVX512CD,               /**< AVX512 Conflict Detection*/
> +       RTE_CPUFLAG_AVX512BW,               /**< AVX512 Byte and Word */
> +       RTE_CPUFLAG_AVX512VL,               /**< AVX512 Vector Length */
> +       RTE_CPUFLAG_AVX512VBMI,             /**< AVX512 Vector Bit Manipulation */
> +       RTE_CPUFLAG_AVX512VBMI2,            /**< AVX512 Vector Bit Manipulation 2 */
> +       RTE_CPUFLAG_GFNI,                   /**< Galois Field New Instructions */
> +       RTE_CPUFLAG_VAES,                   /**< Vector AES */
> +       RTE_CPUFLAG_VPCLMULQDQ,             /**< Vector Carry-less Multiply */
> +       RTE_CPUFLAG_AVX512VNNI,             /**< AVX512 Vector Neural Network Instructions */
> +       RTE_CPUFLAG_AVX512BITALG,           /**< AVX512 Bit Algorithms */
> +       RTE_CPUFLAG_AVX512VPOPCNTDQ,        /**< AVX512 Vector Popcount */
> +       RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
> +       RTE_CPUFLAG_MOVDIRI,                /**< Direct Store Instructions */
> +       RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store Instructions 64B */
> +       RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register Intersection */
> +
>         /* The last item */
>         RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */

This is seen as an ABI break because of the change on _NUMFLAGS:
https://travis-ci.com/github/ovsrobot/dpdk/jobs/302524264#L2351


-- 
David Marchand


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags
  2020-03-27 12:24   ` David Marchand
@ 2020-03-27 13:18     ` Van Haaren, Harry
  2020-03-27 15:04       ` David Marchand
  2020-03-27 13:44     ` Neil Horman
  1 sibling, 1 reply; 29+ messages in thread
From: Van Haaren, Harry @ 2020-03-27 13:18 UTC (permalink / raw)
  To: David Marchand, Laatz, Kevin
  Cc: dev, Richardson, Bruce, Neil Horman, Thomas Monjalon,
	Honnappa Nagarahalli, Dodji Seketeli

> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Friday, March 27, 2020 12:24 PM
> To: Laatz, Kevin <kevin.laatz@intel.com>
> Cc: dev <dev@dpdk.org>; Richardson, Bruce <bruce.richardson@intel.com>; Van
> Haaren, Harry <harry.van.haaren@intel.com>; Neil Horman
> <nhorman@tuxdriver.com>; Thomas Monjalon <thomas@monjalon.net>; Honnappa
> Nagarahalli <Honnappa.Nagarahalli@arm.com>; Dodji Seketeli <dodji@redhat.com>
> Subject: Re: [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags
> 
> On Wed, Mar 25, 2020 at 12:11 PM Kevin Laatz <kevin.laatz@intel.com> wrote:
> >
> > This patch adds CPU flags which will enable the detection of ISA
> > features available on more recent x86 based CPUs.
> >
> > The CPUID leaf information can be found in Section 1.7 of this
> > document:
> > https://software.intel.com/sites/default/files/managed/c5/15/architecture-
> instruction-set-extensions-programming-reference.pdf
> >
> > The following CPU flags are added in this patch:
> >     - AVX-512 doubleword and quadword instructions.
> >     - AVX-512 integer fused multiply-add instructions.
> >     - AVX-512 conflict detection instructions.
> >     - AVX-512 byte and word instructions.
> >     - AVX-512 vector length instructions.
> >     - AVX-512 vector bit manipulation instructions.
> >     - AVX-512 vector bit manipulation 2 instructions.
> >     - Galois field new instructions.
> >     - Vector AES instructions.
> >     - Vector carry-less multiply instructions.
> >     - AVX-512 vector neural network instructions.
> >     - AVX-512 for bit algorithm instructions.
> >     - AVX-512 vector popcount instructions.
> >     - Cache line demote instructions.
> >     - Direct store instructions.
> >     - Direct store 64B instructions.
> >     - AVX-512 two register intersection instructions.
> >
> > Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
> > ---
> >  lib/librte_eal/common/arch/x86/rte_cpuflags.c  | 18 ++++++++++++++++++
> >  .../common/include/arch/x86/rte_cpuflags.h     | 18 ++++++++++++++++++
> >  2 files changed, 36 insertions(+)
> >
> > diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> > index 6492df556..30439e795 100644
> > --- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> > +++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> > @@ -120,6 +120,24 @@ const struct feature_entry rte_cpu_feature_table[] = {
> >         FEAT_DEF(EM64T, 0x80000001, 0, RTE_REG_EDX, 29)
> >
> >         FEAT_DEF(INVTSC, 0x80000007, 0, RTE_REG_EDX,  8)
> > +
> > +       FEAT_DEF(AVX512DQ, 0x00000007, 0, RTE_REG_EBX, 17)
> > +       FEAT_DEF(AVX512IFMA, 0x00000007, 0, RTE_REG_EBX, 21)
> > +       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(AVX512VBMI, 0x00000007, 0, RTE_REG_ECX, 1)
> > +       FEAT_DEF(AVX512VBMI2, 0x00000007, 0, RTE_REG_ECX, 6)
> > +       FEAT_DEF(GFNI, 0x00000007, 0, RTE_REG_ECX, 8)
> > +       FEAT_DEF(VAES, 0x00000007, 0, RTE_REG_ECX, 9)
> > +       FEAT_DEF(VPCLMULQDQ, 0x00000007, 0, RTE_REG_ECX, 10)
> > +       FEAT_DEF(AVX512VNNI, 0x00000007, 0, RTE_REG_ECX, 11)
> > +       FEAT_DEF(AVX512BITALG, 0x00000007, 0, RTE_REG_ECX, 12)
> > +       FEAT_DEF(AVX512VPOPCNTDQ, 0x00000007, 0, RTE_REG_ECX,  14)
> > +       FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25)
> > +       FEAT_DEF(MOVDIRI, 0x00000007, 0, RTE_REG_ECX, 27)
> > +       FEAT_DEF(MOVDIR64B, 0x00000007, 0, RTE_REG_ECX, 28)
> > +       FEAT_DEF(AVX512VP2INTERSECT, 0x00000007, 0, RTE_REG_EDX, 8)
> >  };
> >
> >  int
> > 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..f8f73b19f 100644
> > --- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> > +++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> > @@ -113,6 +113,24 @@ enum rte_cpu_flag_t {
> >         /* (EAX 80000007h) EDX features */
> >         RTE_CPUFLAG_INVTSC,                 /**< INVTSC */
> >
> > +       RTE_CPUFLAG_AVX512DQ,               /**< AVX512 Doubleword and
> Quadword */
> > +       RTE_CPUFLAG_AVX512IFMA,             /**< AVX512 Integer Fused
> Multiply-Add */
> > +       RTE_CPUFLAG_AVX512CD,               /**< AVX512 Conflict Detection*/
> > +       RTE_CPUFLAG_AVX512BW,               /**< AVX512 Byte and Word */
> > +       RTE_CPUFLAG_AVX512VL,               /**< AVX512 Vector Length */
> > +       RTE_CPUFLAG_AVX512VBMI,             /**< AVX512 Vector Bit
> Manipulation */
> > +       RTE_CPUFLAG_AVX512VBMI2,            /**< AVX512 Vector Bit
> Manipulation 2 */
> > +       RTE_CPUFLAG_GFNI,                   /**< Galois Field New
> Instructions */
> > +       RTE_CPUFLAG_VAES,                   /**< Vector AES */
> > +       RTE_CPUFLAG_VPCLMULQDQ,             /**< Vector Carry-less Multiply
> */
> > +       RTE_CPUFLAG_AVX512VNNI,             /**< AVX512 Vector Neural
> Network Instructions */
> > +       RTE_CPUFLAG_AVX512BITALG,           /**< AVX512 Bit Algorithms */
> > +       RTE_CPUFLAG_AVX512VPOPCNTDQ,        /**< AVX512 Vector Popcount */
> > +       RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
> > +       RTE_CPUFLAG_MOVDIRI,                /**< Direct Store Instructions
> */
> > +       RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store Instructions
> 64B */
> > +       RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register
> Intersection */
> > +
> >         /* The last item */
> >         RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the
> last! */
> 
> This is seen as an ABI break because of the change on _NUMFLAGS:
> https://travis-ci.com/github/ovsrobot/dpdk/jobs/302524264#L2351

Correct a publicly exposed enum max value has changed - I don't believe this is an ABI break, but a backward compatible ABI change was expected with this patchset.

Code compiled against eg 19.11 or 20.02 is expected to continue operating correctly.
The new flags were only added at the end of the enum, ensuring to not change the meaning of any existing flags which would be compiled-in constants to the application binary.

The actual size of the CPU flags array is a DPDK internal structure (in a .c file), and is hidden from the application, and never allocated by an application - so no possible mismatch in ABI there? Applications compiled against the older ABI will just not know about the newer flags - but suffer no breakage.

@ABI compatibility folks, please review too - but to the best of my understanding this is not an ABI break, but a backwards compatible update of CPU flag lists?

Thanks for flagging the CI results David!

Regards, -Harry

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags
  2020-03-27 12:24   ` David Marchand
  2020-03-27 13:18     ` Van Haaren, Harry
@ 2020-03-27 13:44     ` Neil Horman
  2020-03-27 14:15       ` Thomas Monjalon
  1 sibling, 1 reply; 29+ messages in thread
From: Neil Horman @ 2020-03-27 13:44 UTC (permalink / raw)
  To: David Marchand
  Cc: Kevin Laatz, dev, Bruce Richardson, Van Haaren Harry,
	Thomas Monjalon, Honnappa Nagarahalli, Dodji Seketeli

On Fri, Mar 27, 2020 at 01:24:12PM +0100, David Marchand wrote:
> On Wed, Mar 25, 2020 at 12:11 PM Kevin Laatz <kevin.laatz@intel.com> wrote:
> >
> > This patch adds CPU flags which will enable the detection of ISA
> > features available on more recent x86 based CPUs.
> >
> > The CPUID leaf information can be found in Section 1.7 of this
> > document:
> > https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf
> >
> > The following CPU flags are added in this patch:
> >     - AVX-512 doubleword and quadword instructions.
> >     - AVX-512 integer fused multiply-add instructions.
> >     - AVX-512 conflict detection instructions.
> >     - AVX-512 byte and word instructions.
> >     - AVX-512 vector length instructions.
> >     - AVX-512 vector bit manipulation instructions.
> >     - AVX-512 vector bit manipulation 2 instructions.
> >     - Galois field new instructions.
> >     - Vector AES instructions.
> >     - Vector carry-less multiply instructions.
> >     - AVX-512 vector neural network instructions.
> >     - AVX-512 for bit algorithm instructions.
> >     - AVX-512 vector popcount instructions.
> >     - Cache line demote instructions.
> >     - Direct store instructions.
> >     - Direct store 64B instructions.
> >     - AVX-512 two register intersection instructions.
> >
> > Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
> > ---
> >  lib/librte_eal/common/arch/x86/rte_cpuflags.c  | 18 ++++++++++++++++++
> >  .../common/include/arch/x86/rte_cpuflags.h     | 18 ++++++++++++++++++
> >  2 files changed, 36 insertions(+)
> >
> > diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> > index 6492df556..30439e795 100644
> > --- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> > +++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> > @@ -120,6 +120,24 @@ const struct feature_entry rte_cpu_feature_table[] = {
> >         FEAT_DEF(EM64T, 0x80000001, 0, RTE_REG_EDX, 29)
> >
> >         FEAT_DEF(INVTSC, 0x80000007, 0, RTE_REG_EDX,  8)
> > +
> > +       FEAT_DEF(AVX512DQ, 0x00000007, 0, RTE_REG_EBX, 17)
> > +       FEAT_DEF(AVX512IFMA, 0x00000007, 0, RTE_REG_EBX, 21)
> > +       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(AVX512VBMI, 0x00000007, 0, RTE_REG_ECX, 1)
> > +       FEAT_DEF(AVX512VBMI2, 0x00000007, 0, RTE_REG_ECX, 6)
> > +       FEAT_DEF(GFNI, 0x00000007, 0, RTE_REG_ECX, 8)
> > +       FEAT_DEF(VAES, 0x00000007, 0, RTE_REG_ECX, 9)
> > +       FEAT_DEF(VPCLMULQDQ, 0x00000007, 0, RTE_REG_ECX, 10)
> > +       FEAT_DEF(AVX512VNNI, 0x00000007, 0, RTE_REG_ECX, 11)
> > +       FEAT_DEF(AVX512BITALG, 0x00000007, 0, RTE_REG_ECX, 12)
> > +       FEAT_DEF(AVX512VPOPCNTDQ, 0x00000007, 0, RTE_REG_ECX,  14)
> > +       FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25)
> > +       FEAT_DEF(MOVDIRI, 0x00000007, 0, RTE_REG_ECX, 27)
> > +       FEAT_DEF(MOVDIR64B, 0x00000007, 0, RTE_REG_ECX, 28)
> > +       FEAT_DEF(AVX512VP2INTERSECT, 0x00000007, 0, RTE_REG_EDX, 8)
> >  };
> >
> >  int
> > 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..f8f73b19f 100644
> > --- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> > +++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> > @@ -113,6 +113,24 @@ enum rte_cpu_flag_t {
> >         /* (EAX 80000007h) EDX features */
> >         RTE_CPUFLAG_INVTSC,                 /**< INVTSC */
> >
> > +       RTE_CPUFLAG_AVX512DQ,               /**< AVX512 Doubleword and Quadword */
> > +       RTE_CPUFLAG_AVX512IFMA,             /**< AVX512 Integer Fused Multiply-Add */
> > +       RTE_CPUFLAG_AVX512CD,               /**< AVX512 Conflict Detection*/
> > +       RTE_CPUFLAG_AVX512BW,               /**< AVX512 Byte and Word */
> > +       RTE_CPUFLAG_AVX512VL,               /**< AVX512 Vector Length */
> > +       RTE_CPUFLAG_AVX512VBMI,             /**< AVX512 Vector Bit Manipulation */
> > +       RTE_CPUFLAG_AVX512VBMI2,            /**< AVX512 Vector Bit Manipulation 2 */
> > +       RTE_CPUFLAG_GFNI,                   /**< Galois Field New Instructions */
> > +       RTE_CPUFLAG_VAES,                   /**< Vector AES */
> > +       RTE_CPUFLAG_VPCLMULQDQ,             /**< Vector Carry-less Multiply */
> > +       RTE_CPUFLAG_AVX512VNNI,             /**< AVX512 Vector Neural Network Instructions */
> > +       RTE_CPUFLAG_AVX512BITALG,           /**< AVX512 Bit Algorithms */
> > +       RTE_CPUFLAG_AVX512VPOPCNTDQ,        /**< AVX512 Vector Popcount */
> > +       RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
> > +       RTE_CPUFLAG_MOVDIRI,                /**< Direct Store Instructions */
> > +       RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store Instructions 64B */
> > +       RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register Intersection */
> > +
> >         /* The last item */
> >         RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
> 
> This is seen as an ABI break because of the change on _NUMFLAGS:
> https://travis-ci.com/github/ovsrobot/dpdk/jobs/302524264#L2351
> 
It shouldn't be, as the only API calls we expose that use rte_cpu_flag_t accept
it as an integer parameter to see if the flag is enabled.  Theres no use of the
enum in a public array or any struct that is sized based on the number of flags,
so you should be good to go
Neil

> 
> -- 
> David Marchand
> 
> 

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags
  2020-03-27 13:44     ` Neil Horman
@ 2020-03-27 14:15       ` Thomas Monjalon
  2020-03-27 14:32         ` Van Haaren, Harry
  0 siblings, 1 reply; 29+ messages in thread
From: Thomas Monjalon @ 2020-03-27 14:15 UTC (permalink / raw)
  To: Neil Horman, Dodji Seketeli, mdr
  Cc: David Marchand, Kevin Laatz, dev, Bruce Richardson,
	Van Haaren Harry, Honnappa Nagarahalli

27/03/2020 14:44, Neil Horman:
> On Fri, Mar 27, 2020 at 01:24:12PM +0100, David Marchand wrote:
> > On Wed, Mar 25, 2020 at 12:11 PM Kevin Laatz <kevin.laatz@intel.com> wrote:
> > > --- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> > > +++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> > > @@ -113,6 +113,24 @@ enum rte_cpu_flag_t {
> > >         /* (EAX 80000007h) EDX features */
> > >         RTE_CPUFLAG_INVTSC,                 /**< INVTSC */
> > >
> > > +       RTE_CPUFLAG_AVX512DQ,               /**< AVX512 Doubleword and Quadword */
> > > +       RTE_CPUFLAG_AVX512IFMA,             /**< AVX512 Integer Fused Multiply-Add */
> > > +       RTE_CPUFLAG_AVX512CD,               /**< AVX512 Conflict Detection*/
> > > +       RTE_CPUFLAG_AVX512BW,               /**< AVX512 Byte and Word */
> > > +       RTE_CPUFLAG_AVX512VL,               /**< AVX512 Vector Length */
> > > +       RTE_CPUFLAG_AVX512VBMI,             /**< AVX512 Vector Bit Manipulation */
> > > +       RTE_CPUFLAG_AVX512VBMI2,            /**< AVX512 Vector Bit Manipulation 2 */
> > > +       RTE_CPUFLAG_GFNI,                   /**< Galois Field New Instructions */
> > > +       RTE_CPUFLAG_VAES,                   /**< Vector AES */
> > > +       RTE_CPUFLAG_VPCLMULQDQ,             /**< Vector Carry-less Multiply */
> > > +       RTE_CPUFLAG_AVX512VNNI,             /**< AVX512 Vector Neural Network Instructions */
> > > +       RTE_CPUFLAG_AVX512BITALG,           /**< AVX512 Bit Algorithms */
> > > +       RTE_CPUFLAG_AVX512VPOPCNTDQ,        /**< AVX512 Vector Popcount */
> > > +       RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
> > > +       RTE_CPUFLAG_MOVDIRI,                /**< Direct Store Instructions */
> > > +       RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store Instructions 64B */
> > > +       RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register Intersection */
> > > +
> > >         /* The last item */
> > >         RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
> > 
> > This is seen as an ABI break because of the change on _NUMFLAGS:
> > https://travis-ci.com/github/ovsrobot/dpdk/jobs/302524264#L2351
> > 
> It shouldn't be, as the only API calls we expose that use rte_cpu_flag_t accept
> it as an integer parameter to see if the flag is enabled.  Theres no use of the
> enum in a public array or any struct that is sized based on the number of flags,
> so you should be good to go

Indeed I cannot imagine an ABI incompatibility in this case.
The only behaviour change is to accept new (higher) RTE_CPUFLAG values
in functions rte_cpu_get_flag_enabled() and rte_cpu_get_flag_name().
Is changing the range of valid values an ABI break?
Why is it flagged by libabigail?




^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags
  2020-03-27 14:15       ` Thomas Monjalon
@ 2020-03-27 14:32         ` Van Haaren, Harry
  2020-03-27 14:36           ` Ray Kinsella
  0 siblings, 1 reply; 29+ messages in thread
From: Van Haaren, Harry @ 2020-03-27 14:32 UTC (permalink / raw)
  To: Thomas Monjalon, Neil Horman, Dodji Seketeli, mdr
  Cc: David Marchand, Laatz, Kevin, dev, Richardson, Bruce,
	Honnappa Nagarahalli

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Friday, March 27, 2020 2:16 PM
> To: Neil Horman <nhorman@tuxdriver.com>; Dodji Seketeli <dodji@redhat.com>;
> mdr@ashroe.eu
> Cc: David Marchand <david.marchand@redhat.com>; Laatz, Kevin
> <kevin.laatz@intel.com>; dev <dev@dpdk.org>; Richardson, Bruce
> <bruce.richardson@intel.com>; Van Haaren, Harry <harry.van.haaren@intel.com>;
> Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
> Subject: Re: [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags
> 
> 27/03/2020 14:44, Neil Horman:
> > On Fri, Mar 27, 2020 at 01:24:12PM +0100, David Marchand wrote:
> > > On Wed, Mar 25, 2020 at 12:11 PM Kevin Laatz <kevin.laatz@intel.com>
> wrote:
> > > > --- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> > > > +++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> > > > @@ -113,6 +113,24 @@ enum rte_cpu_flag_t {
> > > >         /* (EAX 80000007h) EDX features */
> > > >         RTE_CPUFLAG_INVTSC,                 /**< INVTSC */
> > > >
> > > > +       RTE_CPUFLAG_AVX512DQ,               /**< AVX512 Doubleword and
> Quadword */
> > > > +       RTE_CPUFLAG_AVX512IFMA,             /**< AVX512 Integer Fused
> Multiply-Add */
> > > > +       RTE_CPUFLAG_AVX512CD,               /**< AVX512 Conflict
> Detection*/
> > > > +       RTE_CPUFLAG_AVX512BW,               /**< AVX512 Byte and Word */
> > > > +       RTE_CPUFLAG_AVX512VL,               /**< AVX512 Vector Length */
> > > > +       RTE_CPUFLAG_AVX512VBMI,             /**< AVX512 Vector Bit
> Manipulation */
> > > > +       RTE_CPUFLAG_AVX512VBMI2,            /**< AVX512 Vector Bit
> Manipulation 2 */
> > > > +       RTE_CPUFLAG_GFNI,                   /**< Galois Field New
> Instructions */
> > > > +       RTE_CPUFLAG_VAES,                   /**< Vector AES */
> > > > +       RTE_CPUFLAG_VPCLMULQDQ,             /**< Vector Carry-less
> Multiply */
> > > > +       RTE_CPUFLAG_AVX512VNNI,             /**< AVX512 Vector Neural
> Network Instructions */
> > > > +       RTE_CPUFLAG_AVX512BITALG,           /**< AVX512 Bit Algorithms
> */
> > > > +       RTE_CPUFLAG_AVX512VPOPCNTDQ,        /**< AVX512 Vector Popcount
> */
> > > > +       RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
> > > > +       RTE_CPUFLAG_MOVDIRI,                /**< Direct Store
> Instructions */
> > > > +       RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store
> Instructions 64B */
> > > > +       RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register
> Intersection */
> > > > +
> > > >         /* The last item */
> > > >         RTE_CPUFLAG_NUMFLAGS,               /**< This should always be
> the last! */
> > >
> > > This is seen as an ABI break because of the change on _NUMFLAGS:
> > > https://travis-ci.com/github/ovsrobot/dpdk/jobs/302524264#L2351
> > >
> > It shouldn't be, as the only API calls we expose that use rte_cpu_flag_t
> accept
> > it as an integer parameter to see if the flag is enabled.  Theres no use of
> the
> > enum in a public array or any struct that is sized based on the number of
> flags,
> > so you should be good to go
> 
> Indeed I cannot imagine an ABI incompatibility in this case.
> The only behaviour change is to accept new (higher) RTE_CPUFLAG values
> in functions rte_cpu_get_flag_enabled() and rte_cpu_get_flag_name().
> Is changing the range of valid values an ABI break?
> Why is it flagged by libabigail?

If this enum _MAX value was used by the application to allocate an array, that later our DPDK code would write to it could cause out-of-bounds array accesses of the application supplied array. Abigail doesn't know what applications could use the value for, so it flags it.

IMO Abigail is right to flag it to us - a manual review to understand what that _MAX enum value is used for, and then decide on a case by case basis seems the best way forward to me.

Thanks Neil/Thomas for reviewing, as reply in this thread, I also believe this is not going to break ABI.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags
  2020-03-27 14:32         ` Van Haaren, Harry
@ 2020-03-27 14:36           ` Ray Kinsella
  2020-03-27 15:19             ` Thomas Monjalon
  0 siblings, 1 reply; 29+ messages in thread
From: Ray Kinsella @ 2020-03-27 14:36 UTC (permalink / raw)
  To: Van Haaren, Harry, Thomas Monjalon, Neil Horman, Dodji Seketeli
  Cc: David Marchand, Laatz, Kevin, dev, Richardson, Bruce,
	Honnappa Nagarahalli



On 27/03/2020 14:32, Van Haaren, Harry wrote:
>> -----Original Message-----
>> From: Thomas Monjalon <thomas@monjalon.net>
>> Sent: Friday, March 27, 2020 2:16 PM
>> To: Neil Horman <nhorman@tuxdriver.com>; Dodji Seketeli <dodji@redhat.com>;
>> mdr@ashroe.eu
>> Cc: David Marchand <david.marchand@redhat.com>; Laatz, Kevin
>> <kevin.laatz@intel.com>; dev <dev@dpdk.org>; Richardson, Bruce
>> <bruce.richardson@intel.com>; Van Haaren, Harry <harry.van.haaren@intel.com>;
>> Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
>> Subject: Re: [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags
>>
>> 27/03/2020 14:44, Neil Horman:
>>> On Fri, Mar 27, 2020 at 01:24:12PM +0100, David Marchand wrote:
>>>> On Wed, Mar 25, 2020 at 12:11 PM Kevin Laatz <kevin.laatz@intel.com>
>> wrote:
>>>>> --- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
>>>>> +++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
>>>>> @@ -113,6 +113,24 @@ enum rte_cpu_flag_t {
>>>>>         /* (EAX 80000007h) EDX features */
>>>>>         RTE_CPUFLAG_INVTSC,                 /**< INVTSC */
>>>>>
>>>>> +       RTE_CPUFLAG_AVX512DQ,               /**< AVX512 Doubleword and
>> Quadword */
>>>>> +       RTE_CPUFLAG_AVX512IFMA,             /**< AVX512 Integer Fused
>> Multiply-Add */
>>>>> +       RTE_CPUFLAG_AVX512CD,               /**< AVX512 Conflict
>> Detection*/
>>>>> +       RTE_CPUFLAG_AVX512BW,               /**< AVX512 Byte and Word */
>>>>> +       RTE_CPUFLAG_AVX512VL,               /**< AVX512 Vector Length */
>>>>> +       RTE_CPUFLAG_AVX512VBMI,             /**< AVX512 Vector Bit
>> Manipulation */
>>>>> +       RTE_CPUFLAG_AVX512VBMI2,            /**< AVX512 Vector Bit
>> Manipulation 2 */
>>>>> +       RTE_CPUFLAG_GFNI,                   /**< Galois Field New
>> Instructions */
>>>>> +       RTE_CPUFLAG_VAES,                   /**< Vector AES */
>>>>> +       RTE_CPUFLAG_VPCLMULQDQ,             /**< Vector Carry-less
>> Multiply */
>>>>> +       RTE_CPUFLAG_AVX512VNNI,             /**< AVX512 Vector Neural
>> Network Instructions */
>>>>> +       RTE_CPUFLAG_AVX512BITALG,           /**< AVX512 Bit Algorithms
>> */
>>>>> +       RTE_CPUFLAG_AVX512VPOPCNTDQ,        /**< AVX512 Vector Popcount
>> */
>>>>> +       RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
>>>>> +       RTE_CPUFLAG_MOVDIRI,                /**< Direct Store
>> Instructions */
>>>>> +       RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store
>> Instructions 64B */
>>>>> +       RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register
>> Intersection */
>>>>> +
>>>>>         /* The last item */
>>>>>         RTE_CPUFLAG_NUMFLAGS,               /**< This should always be
>> the last! */
>>>>
>>>> This is seen as an ABI break because of the change on _NUMFLAGS:
>>>> https://travis-ci.com/github/ovsrobot/dpdk/jobs/302524264#L2351
>>>>
>>> It shouldn't be, as the only API calls we expose that use rte_cpu_flag_t
>> accept
>>> it as an integer parameter to see if the flag is enabled.  Theres no use of
>> the
>>> enum in a public array or any struct that is sized based on the number of
>> flags,
>>> so you should be good to go
>>
>> Indeed I cannot imagine an ABI incompatibility in this case.
>> The only behaviour change is to accept new (higher) RTE_CPUFLAG values
>> in functions rte_cpu_get_flag_enabled() and rte_cpu_get_flag_name().
>> Is changing the range of valid values an ABI break?
>> Why is it flagged by libabigail?
> 
> If this enum _MAX value was used by the application to allocate an array, that later our DPDK code would write to it could cause out-of-bounds array accesses of the application supplied array. Abigail doesn't know what applications could use the value for, so it flags it.
> 
> IMO Abigail is right to flag it to us - a manual review to understand what that _MAX enum value is used for, and then decide on a case by case basis seems the best way forward to me.
> 
> Thanks Neil/Thomas for reviewing, as reply in this thread, I also believe this is not going to break ABI.
> 
 
+1 to Harrry's comments. 
I can't immediately see how this might break the ABI either. 

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags
  2020-03-27 13:18     ` Van Haaren, Harry
@ 2020-03-27 15:04       ` David Marchand
  0 siblings, 0 replies; 29+ messages in thread
From: David Marchand @ 2020-03-27 15:04 UTC (permalink / raw)
  To: Van Haaren, Harry, Laatz, Kevin
  Cc: dev, Richardson, Bruce, Neil Horman, Thomas Monjalon,
	Honnappa Nagarahalli, Dodji Seketeli

On Fri, Mar 27, 2020 at 2:18 PM Van Haaren, Harry
<harry.van.haaren@intel.com> wrote:
>
> > -----Original Message-----
> > From: David Marchand <david.marchand@redhat.com>
> > Sent: Friday, March 27, 2020 12:24 PM
> > To: Laatz, Kevin <kevin.laatz@intel.com>
> > Cc: dev <dev@dpdk.org>; Richardson, Bruce <bruce.richardson@intel.com>; Van
> > Haaren, Harry <harry.van.haaren@intel.com>; Neil Horman
> > <nhorman@tuxdriver.com>; Thomas Monjalon <thomas@monjalon.net>; Honnappa
> > Nagarahalli <Honnappa.Nagarahalli@arm.com>; Dodji Seketeli <dodji@redhat.com>
> > Subject: Re: [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags
> >
> > On Wed, Mar 25, 2020 at 12:11 PM Kevin Laatz <kevin.laatz@intel.com> wrote:
> > >
> > > This patch adds CPU flags which will enable the detection of ISA
> > > features available on more recent x86 based CPUs.
> > >
> > > The CPUID leaf information can be found in Section 1.7 of this
> > > document:
> > > https://software.intel.com/sites/default/files/managed/c5/15/architecture-
> > instruction-set-extensions-programming-reference.pdf
> > >
> > > The following CPU flags are added in this patch:
> > >     - AVX-512 doubleword and quadword instructions.
> > >     - AVX-512 integer fused multiply-add instructions.
> > >     - AVX-512 conflict detection instructions.
> > >     - AVX-512 byte and word instructions.
> > >     - AVX-512 vector length instructions.
> > >     - AVX-512 vector bit manipulation instructions.
> > >     - AVX-512 vector bit manipulation 2 instructions.
> > >     - Galois field new instructions.
> > >     - Vector AES instructions.
> > >     - Vector carry-less multiply instructions.
> > >     - AVX-512 vector neural network instructions.
> > >     - AVX-512 for bit algorithm instructions.
> > >     - AVX-512 vector popcount instructions.
> > >     - Cache line demote instructions.
> > >     - Direct store instructions.
> > >     - Direct store 64B instructions.
> > >     - AVX-512 two register intersection instructions.
> > >
> > > Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
> > > ---
> > >  lib/librte_eal/common/arch/x86/rte_cpuflags.c  | 18 ++++++++++++++++++
> > >  .../common/include/arch/x86/rte_cpuflags.h     | 18 ++++++++++++++++++
> > >  2 files changed, 36 insertions(+)
> > >
> > > diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> > b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> > > index 6492df556..30439e795 100644
> > > --- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> > > +++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
> > > @@ -120,6 +120,24 @@ const struct feature_entry rte_cpu_feature_table[] = {
> > >         FEAT_DEF(EM64T, 0x80000001, 0, RTE_REG_EDX, 29)
> > >
> > >         FEAT_DEF(INVTSC, 0x80000007, 0, RTE_REG_EDX,  8)
> > > +
> > > +       FEAT_DEF(AVX512DQ, 0x00000007, 0, RTE_REG_EBX, 17)
> > > +       FEAT_DEF(AVX512IFMA, 0x00000007, 0, RTE_REG_EBX, 21)
> > > +       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(AVX512VBMI, 0x00000007, 0, RTE_REG_ECX, 1)
> > > +       FEAT_DEF(AVX512VBMI2, 0x00000007, 0, RTE_REG_ECX, 6)
> > > +       FEAT_DEF(GFNI, 0x00000007, 0, RTE_REG_ECX, 8)
> > > +       FEAT_DEF(VAES, 0x00000007, 0, RTE_REG_ECX, 9)
> > > +       FEAT_DEF(VPCLMULQDQ, 0x00000007, 0, RTE_REG_ECX, 10)
> > > +       FEAT_DEF(AVX512VNNI, 0x00000007, 0, RTE_REG_ECX, 11)
> > > +       FEAT_DEF(AVX512BITALG, 0x00000007, 0, RTE_REG_ECX, 12)
> > > +       FEAT_DEF(AVX512VPOPCNTDQ, 0x00000007, 0, RTE_REG_ECX,  14)
> > > +       FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25)
> > > +       FEAT_DEF(MOVDIRI, 0x00000007, 0, RTE_REG_ECX, 27)
> > > +       FEAT_DEF(MOVDIR64B, 0x00000007, 0, RTE_REG_ECX, 28)
> > > +       FEAT_DEF(AVX512VP2INTERSECT, 0x00000007, 0, RTE_REG_EDX, 8)
> > >  };
> > >
> > >  int
> > > 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..f8f73b19f 100644
> > > --- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> > > +++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> > > @@ -113,6 +113,24 @@ enum rte_cpu_flag_t {
> > >         /* (EAX 80000007h) EDX features */
> > >         RTE_CPUFLAG_INVTSC,                 /**< INVTSC */
> > >
> > > +       RTE_CPUFLAG_AVX512DQ,               /**< AVX512 Doubleword and
> > Quadword */
> > > +       RTE_CPUFLAG_AVX512IFMA,             /**< AVX512 Integer Fused
> > Multiply-Add */
> > > +       RTE_CPUFLAG_AVX512CD,               /**< AVX512 Conflict Detection*/
> > > +       RTE_CPUFLAG_AVX512BW,               /**< AVX512 Byte and Word */
> > > +       RTE_CPUFLAG_AVX512VL,               /**< AVX512 Vector Length */
> > > +       RTE_CPUFLAG_AVX512VBMI,             /**< AVX512 Vector Bit
> > Manipulation */
> > > +       RTE_CPUFLAG_AVX512VBMI2,            /**< AVX512 Vector Bit
> > Manipulation 2 */
> > > +       RTE_CPUFLAG_GFNI,                   /**< Galois Field New
> > Instructions */
> > > +       RTE_CPUFLAG_VAES,                   /**< Vector AES */
> > > +       RTE_CPUFLAG_VPCLMULQDQ,             /**< Vector Carry-less Multiply
> > */
> > > +       RTE_CPUFLAG_AVX512VNNI,             /**< AVX512 Vector Neural
> > Network Instructions */
> > > +       RTE_CPUFLAG_AVX512BITALG,           /**< AVX512 Bit Algorithms */
> > > +       RTE_CPUFLAG_AVX512VPOPCNTDQ,        /**< AVX512 Vector Popcount */
> > > +       RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
> > > +       RTE_CPUFLAG_MOVDIRI,                /**< Direct Store Instructions
> > */
> > > +       RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store Instructions
> > 64B */
> > > +       RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register
> > Intersection */
> > > +
> > >         /* The last item */
> > >         RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the
> > last! */
> >
> > This is seen as an ABI break because of the change on _NUMFLAGS:
> > https://travis-ci.com/github/ovsrobot/dpdk/jobs/302524264#L2351
>
> Correct a publicly exposed enum max value has changed - I don't believe this is an ABI break, but a backward compatible ABI change was expected with this patchset.

A change is that if an application was passing incorrect values to the
functions taking this enum as input, then now it would succeed.
I don't really see the point in doing this :-).

>
> Code compiled against eg 19.11 or 20.02 is expected to continue operating correctly.
> The new flags were only added at the end of the enum, ensuring to not change the meaning of any existing flags which would be compiled-in constants to the application binary.
>
> The actual size of the CPU flags array is a DPDK internal structure (in a .c file), and is hidden from the application, and never allocated by an application - so no possible mismatch in ABI there? Applications compiled against the older ABI will just not know about the newer flags - but suffer no breakage.
>
> @ABI compatibility folks, please review too - but to the best of my understanding this is not an ABI break, but a backwards compatible update of CPU flag lists?
>
> Thanks for flagging the CI results David!

I'd like people to look at this by themselves, not wait for Thomas,
Aaron or me to check.

When a failure is caught by the robot, a mail is sent to the submitter
afaiu (I suppose with Travis instability wrt ARM jobs, the mail might
not have been sent this time).
It is then the responsibility of the submitter to either discuss the
report on the mailing or/and waive it in devtools/libabigail.abignore.

Thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags
  2020-03-27 14:36           ` Ray Kinsella
@ 2020-03-27 15:19             ` Thomas Monjalon
  0 siblings, 0 replies; 29+ messages in thread
From: Thomas Monjalon @ 2020-03-27 15:19 UTC (permalink / raw)
  To: Van Haaren, Harry, Neil Horman, Ray Kinsella, David Marchand,
	Laatz, Kevin
  Cc: Dodji Seketeli, dev, Richardson, Bruce, Honnappa Nagarahalli

27/03/2020 15:36, Ray Kinsella:
> On 27/03/2020 14:32, Van Haaren, Harry wrote:
> > From: Thomas Monjalon <thomas@monjalon.net>
> >> 27/03/2020 14:44, Neil Horman:
> >>> On Fri, Mar 27, 2020 at 01:24:12PM +0100, David Marchand wrote:
> >>>> On Wed, Mar 25, 2020 at 12:11 PM Kevin Laatz <kevin.laatz@intel.com>
> >> wrote:
> >>>>> --- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> >>>>> +++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
> >>>>> @@ -113,6 +113,24 @@ enum rte_cpu_flag_t {
> >>>>>         /* (EAX 80000007h) EDX features */
> >>>>>         RTE_CPUFLAG_INVTSC,                 /**< INVTSC */
> >>>>>
> >>>>> +       RTE_CPUFLAG_AVX512DQ,               /**< AVX512 Doubleword and
> >> Quadword */
> >>>>> +       RTE_CPUFLAG_AVX512IFMA,             /**< AVX512 Integer Fused
> >> Multiply-Add */
> >>>>> +       RTE_CPUFLAG_AVX512CD,               /**< AVX512 Conflict
> >> Detection*/
> >>>>> +       RTE_CPUFLAG_AVX512BW,               /**< AVX512 Byte and Word */
> >>>>> +       RTE_CPUFLAG_AVX512VL,               /**< AVX512 Vector Length */
> >>>>> +       RTE_CPUFLAG_AVX512VBMI,             /**< AVX512 Vector Bit
> >> Manipulation */
> >>>>> +       RTE_CPUFLAG_AVX512VBMI2,            /**< AVX512 Vector Bit
> >> Manipulation 2 */
> >>>>> +       RTE_CPUFLAG_GFNI,                   /**< Galois Field New
> >> Instructions */
> >>>>> +       RTE_CPUFLAG_VAES,                   /**< Vector AES */
> >>>>> +       RTE_CPUFLAG_VPCLMULQDQ,             /**< Vector Carry-less
> >> Multiply */
> >>>>> +       RTE_CPUFLAG_AVX512VNNI,             /**< AVX512 Vector Neural
> >> Network Instructions */
> >>>>> +       RTE_CPUFLAG_AVX512BITALG,           /**< AVX512 Bit Algorithms
> >> */
> >>>>> +       RTE_CPUFLAG_AVX512VPOPCNTDQ,        /**< AVX512 Vector Popcount
> >> */
> >>>>> +       RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
> >>>>> +       RTE_CPUFLAG_MOVDIRI,                /**< Direct Store
> >> Instructions */
> >>>>> +       RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store
> >> Instructions 64B */
> >>>>> +       RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register
> >> Intersection */
> >>>>> +
> >>>>>         /* The last item */
> >>>>>         RTE_CPUFLAG_NUMFLAGS,               /**< This should always be
> >> the last! */
> >>>>
> >>>> This is seen as an ABI break because of the change on _NUMFLAGS:
> >>>> https://travis-ci.com/github/ovsrobot/dpdk/jobs/302524264#L2351
> >>>>
> >>> It shouldn't be, as the only API calls we expose that use rte_cpu_flag_t
> >> accept
> >>> it as an integer parameter to see if the flag is enabled.  Theres no use of
> >> the
> >>> enum in a public array or any struct that is sized based on the number of
> >> flags,
> >>> so you should be good to go
> >>
> >> Indeed I cannot imagine an ABI incompatibility in this case.
> >> The only behaviour change is to accept new (higher) RTE_CPUFLAG values
> >> in functions rte_cpu_get_flag_enabled() and rte_cpu_get_flag_name().
> >> Is changing the range of valid values an ABI break?
> >> Why is it flagged by libabigail?
> > 
> > If this enum _MAX value was used by the application to allocate an array, that later our DPDK code would write to it could cause out-of-bounds array accesses of the application supplied array. Abigail doesn't know what applications could use the value for, so it flags it.
> > 
> > IMO Abigail is right to flag it to us - a manual review to understand what that _MAX enum value is used for, and then decide on a case by case basis seems the best way forward to me.
> > 
> > Thanks Neil/Thomas for reviewing, as reply in this thread, I also believe this is not going to break ABI.
> > 
>  
> +1 to Harrry's comments. 
> I can't immediately see how this might break the ABI either. 


So we all agree that increasing the range of valid rte_cpu_flag_t values
is OK for ABI compatibility.
This conclusion must be written as a libabigail exception in this patch.



^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-dev] [PATCH v3] eal/cpuflags: add x86 based cpu flags
  2020-03-25 11:10 ` [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags Kevin Laatz
  2020-03-27 12:24   ` David Marchand
@ 2020-03-30 12:15   ` " Kevin Laatz
  1 sibling, 0 replies; 29+ messages in thread
From: Kevin Laatz @ 2020-03-30 12:15 UTC (permalink / raw)
  To: dev
  Cc: bruce.richardson, harry.van.haaren, thomas, ray.kinsella,
	nhorman, david.marchand, Kevin Laatz

This patch adds CPU flags which will enable the detection of ISA
features available on more recent x86 based CPUs.

The CPUID leaf information can be found in Section 1.7 of this
document:
https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf

The following CPU flags are added in this patch:
    - AVX-512 doubleword and quadword instructions.
    - AVX-512 integer fused multiply-add instructions.
    - AVX-512 conflict detection instructions.
    - AVX-512 byte and word instructions.
    - AVX-512 vector length instructions.
    - AVX-512 vector bit manipulation instructions.
    - AVX-512 vector bit manipulation 2 instructions.
    - Galois field new instructions.
    - Vector AES instructions.
    - Vector carry-less multiply instructions.
    - AVX-512 vector neural network instructions.
    - AVX-512 for bit algorithm instructions.
    - AVX-512 vector popcount instructions.
    - Cache line demote instructions.
    - Direct store instructions.
    - Direct store 64B instructions.
    - AVX-512 two register intersection instructions.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>

---
v2:
  - Squashed patch set into single patch.

v3:
  - Add abignore entry for 'rte_cpu_flag_t'.
---
 devtools/libabigail.abignore                   |  5 +++++
 lib/librte_eal/common/arch/x86/rte_cpuflags.c  | 18 ++++++++++++++++++
 .../common/include/arch/x86/rte_cpuflags.h     | 18 ++++++++++++++++++
 3 files changed, 41 insertions(+)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index a59df8f13..eb252ae0e 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -11,3 +11,8 @@
         type_kind = enum
         name = rte_crypto_asym_xform_type
         changed_enumerators = RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
+; Ignore this enum update as it should not be allocated by the application
+[suppress_type]
+	type_kind = enum
+	name = rte_cpu_flag_t
+	changed_enumerators = RTE_CPUFLAG_NUMFLAGS
diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
index 6492df556..30439e795 100644
--- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/x86/rte_cpuflags.c
@@ -120,6 +120,24 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(EM64T, 0x80000001, 0, RTE_REG_EDX, 29)
 
 	FEAT_DEF(INVTSC, 0x80000007, 0, RTE_REG_EDX,  8)
+
+	FEAT_DEF(AVX512DQ, 0x00000007, 0, RTE_REG_EBX, 17)
+	FEAT_DEF(AVX512IFMA, 0x00000007, 0, RTE_REG_EBX, 21)
+	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(AVX512VBMI, 0x00000007, 0, RTE_REG_ECX, 1)
+	FEAT_DEF(AVX512VBMI2, 0x00000007, 0, RTE_REG_ECX, 6)
+	FEAT_DEF(GFNI, 0x00000007, 0, RTE_REG_ECX, 8)
+	FEAT_DEF(VAES, 0x00000007, 0, RTE_REG_ECX, 9)
+	FEAT_DEF(VPCLMULQDQ, 0x00000007, 0, RTE_REG_ECX, 10)
+	FEAT_DEF(AVX512VNNI, 0x00000007, 0, RTE_REG_ECX, 11)
+	FEAT_DEF(AVX512BITALG, 0x00000007, 0, RTE_REG_ECX, 12)
+	FEAT_DEF(AVX512VPOPCNTDQ, 0x00000007, 0, RTE_REG_ECX,  14)
+	FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25)
+	FEAT_DEF(MOVDIRI, 0x00000007, 0, RTE_REG_ECX, 27)
+	FEAT_DEF(MOVDIR64B, 0x00000007, 0, RTE_REG_ECX, 28)
+	FEAT_DEF(AVX512VP2INTERSECT, 0x00000007, 0, RTE_REG_EDX, 8)
 };
 
 int
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..f8f73b19f 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cpuflags.h
@@ -113,6 +113,24 @@ enum rte_cpu_flag_t {
 	/* (EAX 80000007h) EDX features */
 	RTE_CPUFLAG_INVTSC,                 /**< INVTSC */
 
+	RTE_CPUFLAG_AVX512DQ,               /**< AVX512 Doubleword and Quadword */
+	RTE_CPUFLAG_AVX512IFMA,             /**< AVX512 Integer Fused Multiply-Add */
+	RTE_CPUFLAG_AVX512CD,               /**< AVX512 Conflict Detection*/
+	RTE_CPUFLAG_AVX512BW,               /**< AVX512 Byte and Word */
+	RTE_CPUFLAG_AVX512VL,               /**< AVX512 Vector Length */
+	RTE_CPUFLAG_AVX512VBMI,             /**< AVX512 Vector Bit Manipulation */
+	RTE_CPUFLAG_AVX512VBMI2,            /**< AVX512 Vector Bit Manipulation 2 */
+	RTE_CPUFLAG_GFNI,                   /**< Galois Field New Instructions */
+	RTE_CPUFLAG_VAES,                   /**< Vector AES */
+	RTE_CPUFLAG_VPCLMULQDQ,             /**< Vector Carry-less Multiply */
+	RTE_CPUFLAG_AVX512VNNI,             /**< AVX512 Vector Neural Network Instructions */
+	RTE_CPUFLAG_AVX512BITALG,           /**< AVX512 Bit Algorithms */
+	RTE_CPUFLAG_AVX512VPOPCNTDQ,        /**< AVX512 Vector Popcount */
+	RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
+	RTE_CPUFLAG_MOVDIRI,                /**< Direct Store Instructions */
+	RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store Instructions 64B */
+	RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register Intersection */
+
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,               /**< This should always be the last! */
 };
-- 
2.17.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, back to index

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24 11:49 [dpdk-dev] [PATCH 00/17] Add CPU flags Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 01/17] eal/cpuflags: add avx512 doubleword and quadword Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 02/17] eal/cpuflags: add avx512 integer fused multiply-add Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 03/17] eal/cpuflags: add avx512 conflict detection Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 04/17] eal/cpuflags: add avx512 byte and word Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 05/17] eal/cpuflags: add avx512 vector length Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 06/17] eal/cpuflags: add avx512 vector bit manipulation Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 07/17] eal/cpuflags: add avx512 vector bit manipulation 2 Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 08/17] eal/cpuflags: add galois field new instructions Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 09/17] eal/cpuflags: add vector AES Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 10/17] eal/cpuflags: add vector carry-less multiply Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 11/17] eal/cpuflags: add avx512 vector neural network instructions Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 12/17] eal/cpuflags: add avx512 bit algorithms Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 13/17] eal/cpuflags: add avx512 vector popcount Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 14/17] eal/cpuflags: add cache line demote Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 15/17] eal/cpuflags: add direct store instructions Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 16/17] eal/cpuflags: add direct store instructions 64B Kevin Laatz
2020-03-24 11:49 ` [dpdk-dev] [PATCH 17/17] eal/cpuflags: add avx512 two register intersection Kevin Laatz
2020-03-25  8:36 ` [dpdk-dev] [PATCH 00/17] Add CPU flags David Marchand
2020-03-25 11:10 ` [dpdk-dev] [PATCH v2] eal/cpuflags: add x86 based cpu flags Kevin Laatz
2020-03-27 12:24   ` David Marchand
2020-03-27 13:18     ` Van Haaren, Harry
2020-03-27 15:04       ` David Marchand
2020-03-27 13:44     ` Neil Horman
2020-03-27 14:15       ` Thomas Monjalon
2020-03-27 14:32         ` Van Haaren, Harry
2020-03-27 14:36           ` Ray Kinsella
2020-03-27 15:19             ` Thomas Monjalon
2020-03-30 12:15   ` [dpdk-dev] [PATCH v3] " Kevin Laatz

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox