Skip to contentSkip to conversation

aesni_gcm: PMD to support AES_GCM crypto operations

PATCH In review Declan Doherty 5 participants 9 messages Jan 30, 2016 – Mar 10, 2016 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aesni_gcm: PMD to support AES_GCM crypto operations

This patch provides the implementation of an AES-NI accelerated crypto PMD which is dependent on Intel's multi-buffer library, see the white paper "Fast Multi-buffer IPsec Implementations on Intel® Architecture Processors"

This PMD supports AES_GCM authenticated encryption and authenticated decryption using 128-bit AES keys

The patch also contains the related unit tests functions for the implemented functionality

---
 MAINTAINERS                                        |   4 +
 app/test/test_cryptodev.c                          | 462 +++++++++++++++++++
 app/test/test_cryptodev_gcm_test_vectors.h         | 423 +++++++++++++++++
 config/common_linuxapp                             |  11 +-
 config/defconfig_i686-native-linuxapp-gcc          |  10 +
 drivers/crypto/Makefile                            |   1 +
 drivers/crypto/aesni_gcm/Makefile                  |  66 +++
 drivers/crypto/aesni_gcm/aesni_gcm_ops.h           | 127 ++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           | 498 +++++++++++++++++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       | 292 ++++++++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   | 120 +++++
 .../crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map |   3 +
 lib/librte_cryptodev/rte_cryptodev.h               |   5 +
 mk/rte.app.mk                                      |  11 +-
 14 files changed, 2028 insertions(+), 5 deletions(-)
 create mode 100644 app/test/test_cryptodev_gcm_test_vectors.h
 create mode 100644 drivers/crypto/aesni_gcm/Makefile
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
 create mode 100644 drivers/crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map
MAINTAINERS +4 -0
index b90aeea..f2b3657 100644
@@ -348,6 +348,10 @@ Null PMD
 M: Tetsuya Mukawa <[email protected]>
 F: drivers/net/null/
 
+Intel AES-NI GCM PMD
+M: Declan Doherty <[email protected]>
+F: drivers/crypto/aesni_gcm/
+
 Intel AES-NI Multi-Buffer
 M: Declan Doherty <[email protected]>
 F: drivers/crypto/aesni_mb/
app/test/test_cryptodev.c +462 -0

497 lines not on this page · raw message

app/test/test_cryptodev_gcm_test_vectors.h new file +423 -0

423 lines not on this page · raw message

config/common_linuxapp +9 -2
index 74bc515..980959a 100644
@@ -336,7 +336,7 @@ CONFIG_RTE_CRYPTODEV_NAME_LEN=64
 #
 # Compile PMD for QuickAssist based devices
 #
-CONFIG_RTE_LIBRTE_PMD_QAT=n
+CONFIG_RTE_LIBRTE_PMD_QAT=y
 CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_RX=n
@@ -350,11 +350,18 @@ CONFIG_RTE_QAT_PMD_MAX_NB_SESSIONS=2048
 #
 # Compile PMD for AESNI backed device
 #
-CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n
+CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y
 CONFIG_RTE_LIBRTE_PMD_AESNI_MB_DEBUG=n
 CONFIG_RTE_AESNI_MB_PMD_MAX_NB_QUEUE_PAIRS=8
 CONFIG_RTE_AESNI_MB_PMD_MAX_NB_SESSIONS=2048
 
+# Compile PMD for AESNI GCM  device
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=y
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM_DEBUG=n
+CONFIG_RTE_AESNI_GCM_PMD_MAX_NB_QUEUE_PAIRS=8
+CONFIG_RTE_AESNI_GCM_PMD_MAX_NB_SESSIONS=2048
+
 #
 # Compile librte_ring
 #
config/defconfig_i686-native-linuxapp-gcc +10 -0
index a90de9b..8563b30 100644
@@ -49,3 +49,13 @@ CONFIG_RTE_LIBRTE_KNI=n
 # Vectorized PMD is not supported on 32-bit
 #
 CONFIG_RTE_IXGBE_INC_VECTOR=n
+
+#
+# AES-NI multi-buffer PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n
+
+#
+# AES-NI GCM PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n
drivers/crypto/Makefile +1 -0
index d07ee96..9cd44a4 100644
@@ -32,6 +32,7 @@
 include $(RTE_SDK)/mk/rte.vars.mk
 
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += aesni_mb
+DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += aesni_gcm
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat
 
 include $(RTE_SDK)/mk/rte.sharelib.mk
drivers/crypto/aesni_gcm/Makefile new file +66 -0

66 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_ops.h new file +127 -0

127 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_pmd.c new file +498 -0

498 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c new file +292 -0

292 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h new file +120 -0

120 lines not on this page · raw message

drivers/crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map new file +3 -0
new file mode 100644
index 0000000..3871202
@@ -0,0 +1,3 @@
+DPDK_2.3 {
+	local: *;
+};
lib/librte_cryptodev/rte_cryptodev.h +5 -0
index 892375d..b21b632 100644
@@ -56,6 +56,8 @@ extern "C" {
 #define CRYPTODEV_NAME_NULL_PMD		("cryptodev_null_pmd")
 /**< Null crypto PMD device name */
 #define CRYPTODEV_NAME_AESNI_MB_PMD	("cryptodev_aesni_mb_pmd")
+/**< Null crypto PMD device name */
+#define CRYPTODEV_NAME_AESNI_GCM_PMD	("cryptodev_aesni_gcm_pmd")
 /**< AES-NI Multi buffer PMD device name */
 #define CRYPTODEV_NAME_QAT_PMD		("cryptodev_qat_pmd")
 /**< Intel QAT PMD device name */
@@ -64,9 +66,12 @@ extern "C" {
 enum rte_cryptodev_type {
 	RTE_CRYPTODEV_NULL_PMD = 1,	/**< Null crypto PMD */
 	RTE_CRYPTODEV_AESNI_MB_PMD,	/**< AES-NI multi buffer PMD */
+	RTE_CRYPTODEV_AESNI_GCM_PMD,	/**< AES-NI GCM PMD */
 	RTE_CRYPTODEV_QAT_PMD,		/**< QAT PMD */
 };
 
+extern const char **rte_cyptodev_names;
+
 /* Logging Macros */
 
 #define CDEV_LOG_ERR(fmt, args...)					\
mk/rte.app.mk +8 -3
index 8ecab41..0a0b137 100644
@@ -154,10 +154,15 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lrte_pmd_pcap
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET)  += -lrte_pmd_af_packet
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL)       += -lrte_pmd_null
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)        += -lrte_pmd_qat
-
-# AESNI MULTI BUFFER is dependent on the IPSec_MB library
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -lrte_pmd_aesni_mb
-_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) 	+= -lrte_pmd_aesni_gcm
+
+# AESNI MULTI BUFFER / GSM PMDs are dependent on the IPSec_MB library
+ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_MB),y)
+_LDLIBS-y 	+= -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+else ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM),y)
+_LDLIBS-y 	+= -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+endif
 
 endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB)
 
Signature · 1 line
2.5.0
#1 lore raw
Quoted 48 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Declan Doherty
Sent: Saturday, January 30, 2016 1:10 PM
To: [email protected]
Subject: [dpdk-dev] [PATCH] aesni_gcm: PMD to support AES_GCM crypto operations

This patch provides the implementation of an AES-NI accelerated crypto PMD
which is dependent on Intel's multi-buffer library, see the white paper "Fast Multi-buffer IPsec Implementations on Intel® Architecture Processors"

This PMD supports AES_GCM authenticated encryption and authenticated decryption using
128-bit AES keys

The patch also contains the related unit tests functions for the implemented functionality

---
 MAINTAINERS                                        |   4 +
 app/test/test_cryptodev.c                          | 462
+++++++++++++++++++
 app/test/test_cryptodev_gcm_test_vectors.h         | 423
+++++++++++++++++
 config/common_linuxapp                             |  11 +-
 config/defconfig_i686-native-linuxapp-gcc          |  10 +
 drivers/crypto/Makefile                            |   1 +
 drivers/crypto/aesni_gcm/Makefile                  |  66 +++
 drivers/crypto/aesni_gcm/aesni_gcm_ops.h           | 127 ++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           | 498
+++++++++++++++++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       | 292 ++++++++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   | 120 +++++
 .../crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map |   3 +
 lib/librte_cryptodev/rte_cryptodev.h               |   5 +
 mk/rte.app.mk                                      |  11 +-
 14 files changed, 2028 insertions(+), 5 deletions(-)
 create mode 100644 app/test/test_cryptodev_gcm_test_vectors.h
 create mode 100644 drivers/crypto/aesni_gcm/Makefile
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
 create mode 100644
Quoted 2 lines

drivers/crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map

There should be an update to the Crypto Device Drivers guide for the new PMD.

Tim

#2 lore raw

PATCH v2 1/1 aesni_gcm: PMD to support AES_GCM crypto operations

In reply to Declan Doherty

From: Declan Doherty <[email protected]>

This patch provides the implementation of an AES-NI accelerated crypto PMD which is dependent on Intel's multi-buffer library, see the white paper "Fast Multi-buffer IPsec Implementations on Intel® Architecture Processors"

This PMD supports AES_GCM authenticated encryption and authenticated decryption using 128-bit AES keys

The patch also contains the related unit tests functions for the implemented functionality

---

This patch depends on "pmd/snow3g: add new SNOW 3G SW PMD" patch
(http://dpdk.org/dev/patchwork/patch/11151/).

Changes in v2:

- Rebased against crypto API changes
- Removed static config options and allow user to provide them as virtual device parameters
- Changed DPDK version references from 2.3 to 16.04
- Added missing library dependency

 MAINTAINERS                                        |   4 +
 app/test/test_cryptodev.c                          | 466 +++++++++++++++++++
 app/test/test_cryptodev_gcm_test_vectors.h         | 423 +++++++++++++++++
 config/common_base                                 |   6 +
 config/defconfig_i686-native-linuxapp-gcc          |  10 +
 config/defconfig_i686-native-linuxapp-icc          |  10 +
 drivers/crypto/Makefile                            |   1 +
 drivers/crypto/aesni_gcm/Makefile                  |  67 +++
 drivers/crypto/aesni_gcm/aesni_gcm_ops.h           | 127 ++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           | 505 +++++++++++++++++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       | 292 ++++++++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   | 120 +++++
 .../crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map |   3 +
 lib/librte_cryptodev/rte_cryptodev.h               |   3 +
 mk/rte.app.mk                                      |  19 +-
 15 files changed, 2052 insertions(+), 4 deletions(-)
 create mode 100644 app/test/test_cryptodev_gcm_test_vectors.h
 create mode 100644 drivers/crypto/aesni_gcm/Makefile
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
 create mode 100644 drivers/crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map
MAINTAINERS +4 -0
index c028e67..076757d 100644
@@ -348,6 +348,10 @@ Null PMD
 M: Tetsuya Mukawa <[email protected]>
 F: drivers/net/null/
 
+Intel AES-NI GCM PMD
+M: Declan Doherty <[email protected]>
+F: drivers/crypto/aesni_gcm/
+
 Intel AES-NI Multi-Buffer
 M: Declan Doherty <[email protected]>
 F: drivers/crypto/aesni_mb/
app/test/test_cryptodev.c +466 -0

500 lines not on this page · raw message

app/test/test_cryptodev_gcm_test_vectors.h new file +423 -0

423 lines not on this page · raw message

config/common_base +6 -0
index 4202a89..8810809 100644
@@ -337,6 +337,12 @@ CONFIG_RTE_AESNI_MB_PMD_MAX_NB_QUEUE_PAIRS=8
 CONFIG_RTE_AESNI_MB_PMD_MAX_NB_SESSIONS=2048
 
 #
+# Compile PMD for AESNI GCM  device
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM_DEBUG=n
+
+#
 # Compile PMD for SNOW 3G device
 #
 CONFIG_RTE_LIBRTE_PMD_SNOW3G=n
config/defconfig_i686-native-linuxapp-gcc +10 -0
index 290183a..c32859f 100644
@@ -50,3 +50,13 @@ CONFIG_RTE_LIBRTE_KNI=n
 # Vectorized PMD is not supported on 32-bit
 #
 CONFIG_RTE_IXGBE_INC_VECTOR=n
+
+#
+# AES-NI multi-buffer PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n
+
+#
+# AES-NI GCM PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n
config/defconfig_i686-native-linuxapp-icc +10 -0
index 96725f3..cde9d96 100644
@@ -50,3 +50,13 @@ CONFIG_RTE_LIBRTE_KNI=n
 # Vectorized PMD is not supported on 32-bit
 #
 CONFIG_RTE_IXGBE_INC_VECTOR=n
+
+#
+# AES-NI multi-buffer PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n
+
+#
+# AES-NI GCM PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n
drivers/crypto/Makefile +1 -0
index bf586d9..021ac0d 100644
@@ -31,6 +31,7 @@
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
+DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += aesni_gcm
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += aesni_mb
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += snow3g
drivers/crypto/aesni_gcm/Makefile new file +67 -0

67 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_ops.h new file +127 -0

127 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_pmd.c new file +505 -0

505 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c new file +292 -0

292 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h new file +120 -0

120 lines not on this page · raw message

drivers/crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map new file +3 -0
new file mode 100644
index 0000000..dc4d417
@@ -0,0 +1,3 @@
+DPDK_16.04 {
+	local: *;
+};
lib/librte_cryptodev/rte_cryptodev.h +3 -0
index f279c92..c6c62e7 100644
@@ -56,6 +56,8 @@ extern "C" {
 /**< Null crypto PMD device name */
 #define CRYPTODEV_NAME_AESNI_MB_PMD	("cryptodev_aesni_mb_pmd")
 /**< AES-NI Multi buffer PMD device name */
+#define CRYPTODEV_NAME_AESNI_GCM_PMD	("cryptodev_aesni_gcm_pmd")
+/**< AES-NI GCM PMD device name */
 #define CRYPTODEV_NAME_QAT_SYM_PMD	("cryptodev_qat_sym_pmd")
 /**< Intel QAT Symmetric Crypto PMD device name */
 #define CRYPTODEV_NAME_SNOW3G_PMD	("cryptodev_snow3g_pmd")
@@ -64,6 +66,7 @@ extern "C" {
 /** Crypto device type */
 enum rte_cryptodev_type {
 	RTE_CRYPTODEV_NULL_PMD = 1,	/**< Null crypto PMD */
+	RTE_CRYPTODEV_AESNI_GCM_PMD,	/**< AES-NI GCM PMD */
 	RTE_CRYPTODEV_AESNI_MB_PMD,	/**< AES-NI multi buffer PMD */
 	RTE_CRYPTODEV_QAT_SYM_PMD,	/**< QAT PMD Symmetric Crypto */
 	RTE_CRYPTODEV_SNOW3G_PMD,	/**< SNOW 3G PMD */
mk/rte.app.mk +15 -4
index 7e46370..0725f12 100644
@@ -102,8 +102,13 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -libverbs
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2)   += -lsze2
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT)    += -lxenstore
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD)      += -lgxio
-# QAT PMD has a dependency on libcrypto (from openssl) for calculating HMAC precomputes
-_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)        += -lcrypto
+# QAT / AESNI GCM PMDs are dependent on libcrypto (from openssl)
+# for calculating HMAC precomputes
+ifeq ($(CONFIG_RTE_LIBRTE_PMD_QAT),y)
+_LDLIBS-y                                   += -lcrypto
+else ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM),y)
+_LDLIBS-y                                   += -lcrypto
+endif
 endif # !CONFIG_RTE_BUILD_SHARED_LIBS
 
 _LDLIBS-y += --start-group
@@ -146,9 +151,15 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET)  += -lrte_pmd_af_packet
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL)       += -lrte_pmd_null
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)        += -lrte_pmd_qat
 
-# AESNI MULTI BUFFER is dependent on the IPSec_MB library
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -lrte_pmd_aesni_mb
-_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM)   += -lrte_pmd_aesni_gcm
+
+# AESNI MULTI BUFFER / GCM PMDs are dependent on the IPSec_MB library
+ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_MB),y)
+_LDLIBS-y += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+else ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM),y)
+_LDLIBS-y += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+endif
 
 # SNOW3G PMD is dependent on the LIBSSO library
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G)     += -lrte_pmd_snow3g
Signature · 1 line
2.5.0
#3 lore raw
Quoted 60 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Pablo de Lara
Sent: Tuesday, March 08, 2016 10:09 AM
To: [email protected]
Subject: [dpdk-dev] [PATCH v2] aesni_gcm: PMD to support AES_GCM crypto operations

From: Declan Doherty <[email protected]>

This patch provides the implementation of an AES-NI accelerated crypto PMD which is dependent on Intel's multi-buffer library, see the white paper "Fast Multi-buffer IPsec Implementations on Intel® Architecture Processors"

This PMD supports AES_GCM authenticated encryption and authenticated decryption using
128-bit AES keys

The patch also contains the related unit tests functions for the implemented functionality

---

This patch depends on "pmd/snow3g: add new SNOW 3G SW PMD" patch
(http://dpdk.org/dev/patchwork/patch/11151/).

Changes in v2:

- Rebased against crypto API changes
- Removed static config options and allow user to provide them as virtual device parameters
- Changed DPDK version references from 2.3 to 16.04
- Added missing library dependency

 MAINTAINERS                                        |   4 +
 app/test/test_cryptodev.c                          | 466 +++++++++++++++++++
 app/test/test_cryptodev_gcm_test_vectors.h         | 423 +++++++++++++++++
 config/common_base                                 |   6 +
 config/defconfig_i686-native-linuxapp-gcc          |  10 +
 config/defconfig_i686-native-linuxapp-icc          |  10 +
 drivers/crypto/Makefile                            |   1 +
 drivers/crypto/aesni_gcm/Makefile                  |  67 +++
 drivers/crypto/aesni_gcm/aesni_gcm_ops.h           | 127 ++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           | 505
+++++++++++++++++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       | 292 ++++++++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   | 120 +++++
 .../crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map |   3 +
 lib/librte_cryptodev/rte_cryptodev.h               |   3 +
 mk/rte.app.mk                                      |  19 +-
 15 files changed, 2052 insertions(+), 4 deletions(-)
 create mode 100644 app/test/test_cryptodev_gcm_test_vectors.h
 create mode 100644 drivers/crypto/aesni_gcm/Makefile
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
 create mode 100644
Quoted 2 lines

drivers/crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map

NACK, some error messages are wrong.

#4 lore raw

PATCH v3 1/1 aesni_gcm: PMD to support AES_GCM crypto operations

In reply to Pablo de Lara

From: Declan Doherty <[email protected]>

This patch provides the implementation of an AES-NI accelerated crypto PMD which is dependent on Intel's multi-buffer library, see the white paper "Fast Multi-buffer IPsec Implementations on Intel® Architecture Processors"

This PMD supports AES_GCM authenticated encryption and authenticated decryption using 128-bit AES keys

The patch also contains the related unit tests functions for the implemented functionality

---

This patch depends on "pmd/snow3g: add new SNOW 3G SW PMD" patch
(http://dpdk.org/dev/patchwork/patch/11151/).

Changes in v3:
- Fixed incorrect error messages

Changes in v2:

- Rebased against crypto API changes
- Removed static config options and allow user to provide them as virtual device parameters
- Changed DPDK version references from 2.3 to 16.04
- Added missing library dependency

 MAINTAINERS                                        |   4 +
 app/test/test_cryptodev.c                          | 466 +++++++++++++++++++
 app/test/test_cryptodev_gcm_test_vectors.h         | 423 +++++++++++++++++
 config/common_base                                 |   6 +
 config/defconfig_i686-native-linuxapp-gcc          |  10 +
 config/defconfig_i686-native-linuxapp-icc          |  10 +
 drivers/crypto/Makefile                            |   1 +
 drivers/crypto/aesni_gcm/Makefile                  |  67 +++
 drivers/crypto/aesni_gcm/aesni_gcm_ops.h           | 127 ++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           | 505 +++++++++++++++++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       | 292 ++++++++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   | 120 +++++
 .../crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map |   3 +
 lib/librte_cryptodev/rte_cryptodev.h               |   3 +
 mk/rte.app.mk                                      |  19 +-
 15 files changed, 2052 insertions(+), 4 deletions(-)
 create mode 100644 app/test/test_cryptodev_gcm_test_vectors.h
 create mode 100644 drivers/crypto/aesni_gcm/Makefile
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
 create mode 100644 drivers/crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map
MAINTAINERS +4 -0
index c028e67..076757d 100644
@@ -348,6 +348,10 @@ Null PMD
 M: Tetsuya Mukawa <[email protected]>
 F: drivers/net/null/
 
+Intel AES-NI GCM PMD
+M: Declan Doherty <[email protected]>
+F: drivers/crypto/aesni_gcm/
+
 Intel AES-NI Multi-Buffer
 M: Declan Doherty <[email protected]>
 F: drivers/crypto/aesni_mb/
app/test/test_cryptodev.c +466 -0

500 lines not on this page · raw message

app/test/test_cryptodev_gcm_test_vectors.h new file +423 -0

423 lines not on this page · raw message

config/common_base +6 -0
index 4202a89..8810809 100644
@@ -337,6 +337,12 @@ CONFIG_RTE_AESNI_MB_PMD_MAX_NB_QUEUE_PAIRS=8
 CONFIG_RTE_AESNI_MB_PMD_MAX_NB_SESSIONS=2048
 
 #
+# Compile PMD for AESNI GCM  device
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM_DEBUG=n
+
+#
 # Compile PMD for SNOW 3G device
 #
 CONFIG_RTE_LIBRTE_PMD_SNOW3G=n
config/defconfig_i686-native-linuxapp-gcc +10 -0
index 290183a..c32859f 100644
@@ -50,3 +50,13 @@ CONFIG_RTE_LIBRTE_KNI=n
 # Vectorized PMD is not supported on 32-bit
 #
 CONFIG_RTE_IXGBE_INC_VECTOR=n
+
+#
+# AES-NI multi-buffer PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n
+
+#
+# AES-NI GCM PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n
config/defconfig_i686-native-linuxapp-icc +10 -0
index 96725f3..cde9d96 100644
@@ -50,3 +50,13 @@ CONFIG_RTE_LIBRTE_KNI=n
 # Vectorized PMD is not supported on 32-bit
 #
 CONFIG_RTE_IXGBE_INC_VECTOR=n
+
+#
+# AES-NI multi-buffer PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n
+
+#
+# AES-NI GCM PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n
drivers/crypto/Makefile +1 -0
index bf586d9..021ac0d 100644
@@ -31,6 +31,7 @@
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
+DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += aesni_gcm
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += aesni_mb
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += snow3g
drivers/crypto/aesni_gcm/Makefile new file +67 -0

67 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_ops.h new file +127 -0

127 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_pmd.c new file +505 -0

505 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c new file +292 -0

292 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h new file +120 -0

120 lines not on this page · raw message

drivers/crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map new file +3 -0
new file mode 100644
index 0000000..dc4d417
@@ -0,0 +1,3 @@
+DPDK_16.04 {
+	local: *;
+};
lib/librte_cryptodev/rte_cryptodev.h +3 -0
index f279c92..c6c62e7 100644
@@ -56,6 +56,8 @@ extern "C" {
 /**< Null crypto PMD device name */
 #define CRYPTODEV_NAME_AESNI_MB_PMD	("cryptodev_aesni_mb_pmd")
 /**< AES-NI Multi buffer PMD device name */
+#define CRYPTODEV_NAME_AESNI_GCM_PMD	("cryptodev_aesni_gcm_pmd")
+/**< AES-NI GCM PMD device name */
 #define CRYPTODEV_NAME_QAT_SYM_PMD	("cryptodev_qat_sym_pmd")
 /**< Intel QAT Symmetric Crypto PMD device name */
 #define CRYPTODEV_NAME_SNOW3G_PMD	("cryptodev_snow3g_pmd")
@@ -64,6 +66,7 @@ extern "C" {
 /** Crypto device type */
 enum rte_cryptodev_type {
 	RTE_CRYPTODEV_NULL_PMD = 1,	/**< Null crypto PMD */
+	RTE_CRYPTODEV_AESNI_GCM_PMD,	/**< AES-NI GCM PMD */
 	RTE_CRYPTODEV_AESNI_MB_PMD,	/**< AES-NI multi buffer PMD */
 	RTE_CRYPTODEV_QAT_SYM_PMD,	/**< QAT PMD Symmetric Crypto */
 	RTE_CRYPTODEV_SNOW3G_PMD,	/**< SNOW 3G PMD */
mk/rte.app.mk +15 -4
index 7e46370..0725f12 100644
@@ -102,8 +102,13 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -libverbs
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2)   += -lsze2
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT)    += -lxenstore
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD)      += -lgxio
-# QAT PMD has a dependency on libcrypto (from openssl) for calculating HMAC precomputes
-_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)        += -lcrypto
+# QAT / AESNI GCM PMDs are dependent on libcrypto (from openssl)
+# for calculating HMAC precomputes
+ifeq ($(CONFIG_RTE_LIBRTE_PMD_QAT),y)
+_LDLIBS-y                                   += -lcrypto
+else ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM),y)
+_LDLIBS-y                                   += -lcrypto
+endif
 endif # !CONFIG_RTE_BUILD_SHARED_LIBS
 
 _LDLIBS-y += --start-group
@@ -146,9 +151,15 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET)  += -lrte_pmd_af_packet
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL)       += -lrte_pmd_null
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)        += -lrte_pmd_qat
 
-# AESNI MULTI BUFFER is dependent on the IPSec_MB library
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -lrte_pmd_aesni_mb
-_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM)   += -lrte_pmd_aesni_gcm
+
+# AESNI MULTI BUFFER / GCM PMDs are dependent on the IPSec_MB library
+ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_MB),y)
+_LDLIBS-y += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+else ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM),y)
+_LDLIBS-y += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+endif
 
 # SNOW3G PMD is dependent on the LIBSSO library
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G)     += -lrte_pmd_snow3g
Signature · 1 line
2.5.0
#5 lore raw

PATCH v4 1/1 aesni_gcm: PMD to support AES_GCM crypto operations

From: Declan Doherty <[email protected]>

This patch provides the implementation of an AES-NI accelerated crypto PMD which is dependent on Intel's multi-buffer library, see the white paper "Fast Multi-buffer IPsec Implementations on Intel® Architecture Processors"

This PMD supports AES_GCM authenticated encryption and authenticated decryption using 128-bit AES keys

The patch also contains the related unit tests functions for the implemented functionality

--

This patch depends on "pmd/snow3g: add new SNOW 3G SW PMD" patch
(http://dpdk.org/dev/patchwork/patch/11424/).

Changes in v4:

- Fixed compilation error when debug flag is enabled
- Rebased to latest DPDK code
- Added missing document

Changes in v3:
- Fixed incorrect error messages

Changes in v2:

- Rebased against crypto API changes
- Removed static config options and allow user to provide them as virtual device parameters
- Changed DPDK version references from 2.3 to 16.04
- Added missing library dependency

 MAINTAINERS                                        |   4 +
 app/test/test_cryptodev.c                          | 466 +++++++++++++++++++
 app/test/test_cryptodev_gcm_test_vectors.h         | 423 +++++++++++++++++
 config/common_base                                 |   6 +
 config/defconfig_i686-native-linuxapp-gcc          |  10 +
 config/defconfig_i686-native-linuxapp-icc          |  10 +
 doc/guides/cryptodevs/aesni_gcm.rst                |  66 +++
 doc/guides/cryptodevs/index.rst                    |   1 +
 doc/guides/rel_notes/release_16_04.rst             |   5 +
 drivers/crypto/Makefile                            |   1 +
 drivers/crypto/aesni_gcm/Makefile                  |  67 +++
 drivers/crypto/aesni_gcm/aesni_gcm_ops.h           | 127 ++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           | 505 +++++++++++++++++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       | 292 ++++++++++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   | 120 +++++
 .../crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map |   3 +
 lib/librte_cryptodev/rte_cryptodev.h               |   3 +
 mk/rte.app.mk                                      |  19 +-
 18 files changed, 2124 insertions(+), 4 deletions(-)
 create mode 100644 app/test/test_cryptodev_gcm_test_vectors.h
 create mode 100644 doc/guides/cryptodevs/aesni_gcm.rst
 create mode 100644 drivers/crypto/aesni_gcm/Makefile
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
 create mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
 create mode 100644 drivers/crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map
MAINTAINERS +4 -0
index 52198b7..d4b2d98 100644
@@ -349,6 +349,10 @@ Null PMD
 M: Tetsuya Mukawa <[email protected]>
 F: drivers/net/null/
 
+Intel AES-NI GCM PMD
+M: Declan Doherty <[email protected]>
+F: drivers/crypto/aesni_gcm/
+
 Intel AES-NI Multi-Buffer
 M: Declan Doherty <[email protected]>
 F: drivers/crypto/aesni_mb/
app/test/test_cryptodev.c +466 -0

500 lines not on this page · raw message

app/test/test_cryptodev_gcm_test_vectors.h new file +423 -0

423 lines not on this page · raw message

config/common_base +6 -0
index 99f2d31..287fa34 100644
@@ -338,6 +338,12 @@ CONFIG_RTE_AESNI_MB_PMD_MAX_NB_QUEUE_PAIRS=8
 CONFIG_RTE_AESNI_MB_PMD_MAX_NB_SESSIONS=2048
 
 #
+# Compile PMD for AESNI GCM  device
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM_DEBUG=n
+
+#
 # Compile PMD for SNOW 3G device
 #
 CONFIG_RTE_LIBRTE_PMD_SNOW3G=n
config/defconfig_i686-native-linuxapp-gcc +10 -0
index 290183a..c32859f 100644
@@ -50,3 +50,13 @@ CONFIG_RTE_LIBRTE_KNI=n
 # Vectorized PMD is not supported on 32-bit
 #
 CONFIG_RTE_IXGBE_INC_VECTOR=n
+
+#
+# AES-NI multi-buffer PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n
+
+#
+# AES-NI GCM PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n
config/defconfig_i686-native-linuxapp-icc +10 -0
index 96725f3..cde9d96 100644
@@ -50,3 +50,13 @@ CONFIG_RTE_LIBRTE_KNI=n
 # Vectorized PMD is not supported on 32-bit
 #
 CONFIG_RTE_IXGBE_INC_VECTOR=n
+
+#
+# AES-NI multi-buffer PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n
+
+#
+# AES-NI GCM PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n
doc/guides/cryptodevs/aesni_gcm.rst new file +66 -0

66 lines not on this page · raw message

doc/guides/cryptodevs/index.rst +1 -0
index 071e7d2..3c5e04f 100644
@@ -36,5 +36,6 @@ Crypto Device Drivers
     :numbered:
 
     aesni_mb
+    aesni_gcm
     snow3g
     qat
doc/guides/rel_notes/release_16_04.rst +5 -0
index 4fb0738..b4ed25d 100644
@@ -85,6 +85,11 @@ This section should contain new features added in this release. Sample format:
   A new Crypto PMD has been added, which provides SNOW 3G UEA2 ciphering
   and SNOW3G UIA2 hashing.
 
+* **Added AES GCM PMD**
+
+  Added new Crypto PMD to support AES-GCM authenticated encryption and
+  authenticated decryption in SW
+
 Resolved Issues
 ---------------
 
drivers/crypto/Makefile +1 -0
index bf586d9..021ac0d 100644
@@ -31,6 +31,7 @@
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
+DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += aesni_gcm
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += aesni_mb
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += snow3g
drivers/crypto/aesni_gcm/Makefile new file +67 -0

67 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_ops.h new file +127 -0

127 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_pmd.c new file +505 -0

505 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c new file +292 -0

292 lines not on this page · raw message

drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h new file +120 -0

120 lines not on this page · raw message

drivers/crypto/aesni_gcm/rte_pmd_aesni_gcm_version.map new file +3 -0
new file mode 100644
index 0000000..dc4d417
@@ -0,0 +1,3 @@
+DPDK_16.04 {
+	local: *;
+};
lib/librte_cryptodev/rte_cryptodev.h +3 -0
index 53cca22..eb85c46 100644
@@ -56,6 +56,8 @@ extern "C" {
 /**< Null crypto PMD device name */
 #define CRYPTODEV_NAME_AESNI_MB_PMD	("cryptodev_aesni_mb_pmd")
 /**< AES-NI Multi buffer PMD device name */
+#define CRYPTODEV_NAME_AESNI_GCM_PMD	("cryptodev_aesni_gcm_pmd")
+/**< AES-NI GCM PMD device name */
 #define CRYPTODEV_NAME_QAT_SYM_PMD	("cryptodev_qat_sym_pmd")
 /**< Intel QAT Symmetric Crypto PMD device name */
 #define CRYPTODEV_NAME_SNOW3G_PMD	("cryptodev_snow3g_pmd")
@@ -64,6 +66,7 @@ extern "C" {
 /** Crypto device type */
 enum rte_cryptodev_type {
 	RTE_CRYPTODEV_NULL_PMD = 1,	/**< Null crypto PMD */
+	RTE_CRYPTODEV_AESNI_GCM_PMD,	/**< AES-NI GCM PMD */
 	RTE_CRYPTODEV_AESNI_MB_PMD,	/**< AES-NI multi buffer PMD */
 	RTE_CRYPTODEV_QAT_SYM_PMD,	/**< QAT PMD Symmetric Crypto */
 	RTE_CRYPTODEV_SNOW3G_PMD,	/**< SNOW 3G PMD */
mk/rte.app.mk +15 -4
index 7e46370..0725f12 100644
@@ -102,8 +102,13 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -libverbs
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2)   += -lsze2
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT)    += -lxenstore
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD)      += -lgxio
-# QAT PMD has a dependency on libcrypto (from openssl) for calculating HMAC precomputes
-_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)        += -lcrypto
+# QAT / AESNI GCM PMDs are dependent on libcrypto (from openssl)
+# for calculating HMAC precomputes
+ifeq ($(CONFIG_RTE_LIBRTE_PMD_QAT),y)
+_LDLIBS-y                                   += -lcrypto
+else ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM),y)
+_LDLIBS-y                                   += -lcrypto
+endif
 endif # !CONFIG_RTE_BUILD_SHARED_LIBS
 
 _LDLIBS-y += --start-group
@@ -146,9 +151,15 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET)  += -lrte_pmd_af_packet
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL)       += -lrte_pmd_null
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)        += -lrte_pmd_qat
 
-# AESNI MULTI BUFFER is dependent on the IPSec_MB library
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -lrte_pmd_aesni_mb
-_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM)   += -lrte_pmd_aesni_gcm
+
+# AESNI MULTI BUFFER / GCM PMDs are dependent on the IPSec_MB library
+ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_MB),y)
+_LDLIBS-y += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+else ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM),y)
+_LDLIBS-y += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+endif
 
 # SNOW3G PMD is dependent on the LIBSSO library
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G)     += -lrte_pmd_snow3g
Signature · 1 line
2.5.0
Acked-by on v4 1/1
#6 lore raw
Quoted 6 lines · Pablo de Lara

From: Declan Doherty <[email protected]>

This patch provides the implementation of an AES-NI accelerated crypto PMD which is dependent on Intel's multi-buffer library, see the white paper "Fast Multi-buffer IPsec Implementations on Intel® Architecture Processors"

Quoted 8 lines

This PMD supports AES_GCM authenticated encryption and authenticated decryption using 128-bit AES keys

The patch also contains the related unit tests functions for the implemented functionality

--

#8 lore raw
In reply to Pablo de Lara

2016-03-10 16:41, Pablo de Lara:

MAINTAINERS Null PMD · line 354

Quoted 3 lines
MAINTAINERS +3 -0
+Intel AES-NI GCM PMD
+M: Declan Doherty <[email protected]>
+F: drivers/crypto/aesni_gcm/

Missing doc reference:
F: doc/guides/cryptodevs/aesni_gcm.rst

mk/rte.app.mk _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += -lrte_pmd_af_packet · line 162

Quoted 6 lines
mk/rte.app.mk +6 -0
+# AESNI MULTI BUFFER / GCM PMDs are dependent on the IPSec_MB library
+ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_MB),y)
+_LDLIBS-y += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+else ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM),y)
+_LDLIBS-y += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+endif

This dependency should be set when building the PMD as a shared library also.

#7 lore raw
In reply to John Griffin

2016-03-10 18:53, John Griffin:

Quoted 10 lines · Pablo de Lara
Quoted 9 lines

From: Declan Doherty <[email protected]>

This patch provides the implementation of an AES-NI accelerated crypto PMD which is dependent on Intel's multi-buffer library, see the white paper "Fast Multi-buffer IPsec Implementations on Intel® Architecture Processors"

This PMD supports AES_GCM authenticated encryption and authenticated decryption using 128-bit AES keys

Quoted 6 lines
Quoted 4 lines

The patch also contains the related unit tests functions for the implemented functionality

Applied with trivial fixes, thanks.