Skip to contentSkip to conversation

null_crypto_pmd: PMD to support null crypto operations

PATCH New Declan Doherty 4 participants 11 messages Jan 31, 2016 – Mar 11, 2016 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 null_crypto_pmd: PMD to support null crypto operations

This patch provides the implementation of a NULL crypto PMD, which supports NULL cipher and NULL authentication operations, which can be chained together as follows:

- Authentication Only
- Cipher Only
- Authentication then Cipher
- Cipher then Authentication

As this is a NULL operation device the rte_mbuf's which are submitted for processing are not actually modified and are stored in a queue pairs processed packets ring ready for collection when rte_cryptodev_burst_dequeue() is called.

The patch also contains the related unit tests function to test the PMDs supported operations.

---
 MAINTAINERS                                   |   3 +
 app/test/test_cryptodev.c                     | 399 +++++++++++++++++++++++++-
 config/common_bsdapp                          |   9 +-
 config/common_linuxapp                        |   9 +-
 doc/guides/cryptodevs/index.rst               |   3 +-
 doc/guides/cryptodevs/null.rst                |  72 +++++
 drivers/crypto/Makefile                       |   3 +-
 drivers/crypto/null/Makefile                  |  60 ++++
 drivers/crypto/null/null_crypto_pmd.c         | 269 +++++++++++++++++
 drivers/crypto/null/null_crypto_pmd_ops.c     | 309 ++++++++++++++++++++
 drivers/crypto/null/null_crypto_pmd_private.h |  93 ++++++
 mk/rte.app.mk                                 |   1 +
 12 files changed, 1225 insertions(+), 5 deletions(-)
 create mode 100644 doc/guides/cryptodevs/null.rst
 create mode 100644 drivers/crypto/null/Makefile
 create mode 100644 drivers/crypto/null/null_crypto_pmd.c
 create mode 100644 drivers/crypto/null/null_crypto_pmd_ops.c
 create mode 100644 drivers/crypto/null/null_crypto_pmd_private.h
MAINTAINERS +3 -0
index b90aeea..f1a4393 100644
@@ -355,6 +355,9 @@ F: drivers/crypto/aesni_mb/
 Intel QuickAssist
 F: drivers/crypto/qat/
 
+Null Crypto PMD
+M: Declan Doherty <[email protected]>
+F: drivers/crypto/null/
 
 Packet processing
 -----------------
app/test/test_cryptodev.c +398 -1

433 lines not on this page · raw message

config/common_bsdapp +8 -1
index ed7c31c..6cda34c 100644
@@ -1,6 +1,6 @@
 #   BSD LICENSE
 #
-#   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+#   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
 #   All rights reserved.
 #
 #   Redistribution and use in source and binary forms, with or without
@@ -319,6 +319,13 @@ CONFIG_RTE_CRYPTO_MAX_DEVS=64
 CONFIG_RTE_CRYPTODEV_NAME_LEN=64
 
 #
+# Compile PMD for NULL Crypto device
+#
+CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO=y
+CONFIG_RTE_NULL_CRYPTO_PMD_MAX_NB_QUEUE_PAIRS=8
+CONFIG_RTE_NULL_CRYPTO_PMD_MAX_NB_SESSIONS=2048
+
+#
 # Compile PMD for QuickAssist based devices
 #
 CONFIG_RTE_LIBRTE_PMD_QAT=n
config/common_linuxapp +8 -1
index 74bc515..d428cb6 100644
@@ -1,6 +1,6 @@
 #   BSD LICENSE
 #
-#   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+#   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
 #   All rights reserved.
 #
 #   Redistribution and use in source and binary forms, with or without
@@ -333,6 +333,13 @@ CONFIG_RTE_LIBRTE_CRYPTODEV_DEBUG=n
 CONFIG_RTE_CRYPTO_MAX_DEVS=64
 CONFIG_RTE_CRYPTODEV_NAME_LEN=64
 
+
+# Compile PMD for NULL Crypto device
+#
+CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO=y
+CONFIG_RTE_NULL_CRYPTO_PMD_MAX_NB_QUEUE_PAIRS=8
+CONFIG_RTE_NULL_CRYPTO_PMD_MAX_NB_SESSIONS=2048
+
 #
 # Compile PMD for QuickAssist based devices
 #
doc/guides/cryptodevs/index.rst +2 -1
index 16a5f4a..af0b3c8 100644
@@ -1,5 +1,5 @@
 ..  BSD LICENSE
-    Copyright(c) 2015 Intel Corporation. All rights reserved.
+    Copyright(c) 2015 - 2016 Intel Corporation. All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions
@@ -37,3 +37,4 @@ Crypto Device Drivers
 
     aesni_mb
     qat
+    null
doc/guides/cryptodevs/null.rst new file +72 -0

73 lines not on this page · raw message

drivers/crypto/Makefile +2 -1
index d07ee96..67296aa 100644
@@ -1,6 +1,6 @@
 #   BSD LICENSE
 #
-#   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+#   Copyright(c) 2015-2016 Intel Corporation. All rights reserved.
 #   All rights reserved.
 #
 #   Redistribution and use in source and binary forms, with or without
@@ -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_NULL_CRYPTO) += null
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat
 
 include $(RTE_SDK)/mk/rte.sharelib.mk
drivers/crypto/null/Makefile new file +60 -0

60 lines not on this page · raw message

drivers/crypto/null/null_crypto_pmd.c new file +269 -0

269 lines not on this page · raw message

drivers/crypto/null/null_crypto_pmd_ops.c new file +309 -0

309 lines not on this page · raw message

drivers/crypto/null/null_crypto_pmd_private.h new file +93 -0

93 lines not on this page · raw message

mk/rte.app.mk +1 -0
index 8ecab41..5e9d511 100644
@@ -154,6 +154,7 @@ _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
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO)+= -lrte_pmd_null_crypto
 
 # AESNI MULTI BUFFER is dependent on the IPSec_MB library
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -lrte_pmd_aesni_mb
Signature · 1 line
2.5.0
#1 lore raw

PATCH v2 1/1 null_crypto_pmd: PMD to support null crypto operations

From: Declan Doherty <[email protected]>

This patch provides the implementation of a NULL crypto PMD, which supports NULL cipher and NULL authentication operations, which can be chained together as follows:

- Authentication Only
- Cipher Only
- Authentication then Cipher
- Cipher then Authentication

As this is a NULL operation device the crypto operations which are submitted for processing are not actually modified and are stored in a queue pairs processed packets ring ready for collection when rte_cryptodev_burst_dequeue() is called.

The patch also contains the related unit tests function to test the PMDs supported operations.

---

This patch depends on "AES GCM, AES CMAC fixes and addition of GCM tests for QAT" patchset
(http://dpdk.org/ml/archives/dev/2016-March/034974.html)

Changes in v2:
- Rebased to include Cryptodev API changes

 MAINTAINERS                                        |   4 +
 app/test/test_cryptodev.c                          | 402 ++++++++++++++++++++-
 config/common_base                                 |   5 +
 doc/api/doxy-api.conf                              |   1 -
 doc/guides/cryptodevs/index.rst                    |   3 +-
 doc/guides/cryptodevs/null.rst                     |  72 ++++
 doc/guides/rel_notes/release_16_04.rst             |   4 +
 drivers/crypto/Makefile                            |   1 +
 drivers/crypto/null/Makefile                       |  59 +++
 drivers/crypto/null/null_crypto_pmd.c              | 275 ++++++++++++++
 drivers/crypto/null/null_crypto_pmd_ops.c          | 308 ++++++++++++++++
 drivers/crypto/null/null_crypto_pmd_private.h      |  93 +++++
 .../crypto/null/rte_pmd_null_crypto_version.map    |   3 +
 mk/rte.app.mk                                      |   1 +
 14 files changed, 1228 insertions(+), 3 deletions(-)
 create mode 100644 doc/guides/cryptodevs/null.rst
 create mode 100644 drivers/crypto/null/Makefile
 create mode 100644 drivers/crypto/null/null_crypto_pmd.c
 create mode 100644 drivers/crypto/null/null_crypto_pmd_ops.c
 create mode 100644 drivers/crypto/null/null_crypto_pmd_private.h
 create mode 100644 drivers/crypto/null/rte_pmd_null_crypto_version.map
MAINTAINERS +4 -0
index d4b2d98..0bf8a77 100644
@@ -364,6 +364,10 @@ SNOW 3G PMD
 M: Pablo de Lara <[email protected]>
 F: drivers/crypto/snow3g
 
+Null Crypto PMD
+M: Declan Doherty <[email protected]>
+F: drivers/crypto/null/
+
 
 Packet processing
 -----------------
app/test/test_cryptodev.c +401 -1

438 lines not on this page · raw message

config/common_base +5 -0
index 287fa34..73ca7bb 100644
@@ -350,6 +350,11 @@ CONFIG_RTE_LIBRTE_PMD_SNOW3G=n
 CONFIG_RTE_LIBRTE_PMD_SNOW3G_DEBUG=n
 
 #
+# Compile PMD for NULL Crypto device
+#
+CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO=y
+
+#
 # Compile librte_ring
 #
 CONFIG_RTE_LIBRTE_RING=y
doc/api/doxy-api.conf +0 -1
index 57e8b5d..af5d6dd 100644
@@ -49,7 +49,6 @@ INPUT                   = doc/api/doxy-api-index.md \
                           lib/librte_kvargs \
                           lib/librte_lpm \
                           lib/librte_mbuf \
-                          lib/librte_mbuf_offload \
                           lib/librte_mempool \
                           lib/librte_meter \
                           lib/librte_net \
doc/guides/cryptodevs/index.rst +2 -1
index 3c5e04f..85193da 100644
@@ -1,5 +1,5 @@
 ..  BSD LICENSE
-    Copyright(c) 2015 Intel Corporation. All rights reserved.
+    Copyright(c) 2015 - 2016 Intel Corporation. All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions
@@ -37,5 +37,6 @@ Crypto Device Drivers
 
     aesni_mb
     aesni_gcm
+    null
     snow3g
     qat
doc/guides/cryptodevs/null.rst new file +72 -0

72 lines not on this page · raw message

doc/guides/rel_notes/release_16_04.rst +4 -0
index d224cfb..3345805 100644
@@ -90,6 +90,10 @@ This section should contain new features added in this release. Sample format:
   Added new Crypto PMD to support AES-GCM authenticated encryption and
   authenticated decryption in SW
 
+* **Added NULL Crypto PMD**
+
+  Added new Crypto PMD to support null crypto operations in SW.
+
 Resolved Issues
 ---------------
 
drivers/crypto/Makefile +1 -0
index 021ac0d..b420538 100644
@@ -35,5 +35,6 @@ 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
+DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += null
 
 include $(RTE_SDK)/mk/rte.subdir.mk
drivers/crypto/null/Makefile new file +59 -0

59 lines not on this page · raw message

drivers/crypto/null/null_crypto_pmd.c new file +275 -0

275 lines not on this page · raw message

drivers/crypto/null/null_crypto_pmd_ops.c new file +308 -0

308 lines not on this page · raw message

drivers/crypto/null/null_crypto_pmd_private.h new file +93 -0

93 lines not on this page · raw message

drivers/crypto/null/rte_pmd_null_crypto_version.map new file +3 -0
new file mode 100644
index 0000000..dc4d417
@@ -0,0 +1,3 @@
+DPDK_16.04 {
+	local: *;
+};
mk/rte.app.mk +1 -0
index 0725f12..2f9e036 100644
@@ -153,6 +153,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)        += -lrte_pmd_qat
 
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -lrte_pmd_aesni_mb
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM)   += -lrte_pmd_aesni_gcm
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += -lrte_pmd_null_crypto
 
 # AESNI MULTI BUFFER / GCM PMDs are dependent on the IPSec_MB library
 ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_MB),y)
Signature · 1 line
2.5.0
Acked-by on v2 1/1
#2 lore raw

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Pablo de Lara
Sent: Thursday, March 10, 2016 4:47 PM
To: [email protected]
Subject: [dpdk-dev] [PATCH v2] null_crypto_pmd: PMD to support null crypto operations

From: Declan Doherty <[email protected]>

This patch provides the implementation of a NULL crypto PMD, which supports NULL cipher and NULL authentication operations, which can be chained together as follows:

- Authentication Only
- Cipher Only
- Authentication then Cipher
- Cipher then Authentication

As this is a NULL operation device the crypto operations which are submitted for processing are not actually modified and are stored in a queue pairs processed packets ring ready for collection when rte_cryptodev_burst_dequeue() is called.

The patch also contains the related unit tests function to test the PMDs supported operations.

---

This patch depends on "AES GCM, AES CMAC fixes and addition of GCM tests for QAT" patchset
(http://dpdk.org/ml/archives/dev/2016-March/034974.html)

Changes in v2:
- Rebased to include Cryptodev API changes
--
2.5.0

#3 lore raw
In reply to Pablo de Lara
Quoted 27 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Pablo de Lara
Sent: Thursday, March 10, 2016 4:47 PM
To: [email protected]
Subject: [dpdk-dev] [PATCH v2] null_crypto_pmd: PMD to support null crypto operations

From: Declan Doherty <[email protected]>

This patch provides the implementation of a NULL crypto PMD, which supports
NULL cipher and NULL authentication operations, which can be chained together
as follows:

- Authentication Only
- Cipher Only
- Authentication then Cipher
- Cipher then Authentication

As this is a NULL operation device the crypto operations which are submitted for
processing are not actually modified and are stored in a queue pairs processed
packets ring ready for collection when rte_cryptodev_burst_dequeue() is called.

Quoted 4 lines

The patch also contains the related unit tests function to test the PMDs supported operations.

Nack. It was trying to remove an already removed reference to a deleted library

#4 lore raw

PATCH v3 1/1 null_crypto_pmd: PMD to support null crypto operations

In reply to Pablo de Lara

From: Declan Doherty <[email protected]>

This patch provides the implementation of a NULL crypto PMD, which supports NULL cipher and NULL authentication operations, which can be chained together as follows:

- Authentication Only
- Cipher Only
- Authentication then Cipher
- Cipher then Authentication

As this is a NULL operation device the crypto operations which are submitted for processing are not actually modified and are stored in a queue pairs processed packets ring ready for collection when rte_cryptodev_burst_dequeue() is called.

The patch also contains the related unit tests function to test the PMDs supported operations.

---

This patch depends on "AES GCM, AES CMAC fixes and addition of GCM tests for QAT" patchset
(http://dpdk.org/ml/archives/dev/2016-March/034974.html)

Changes in v2:
- Rebased to include Cryptodev API changes

Changes in v3:

- Added missing doc reference in MAINTAINERS
- Removed attempt to remove a reference already delated

 MAINTAINERS                            |   4 +
 app/test/test_cryptodev.c              | 402 ++++++++++++++++++++++++++++++++-
 config/common_base                     |   5 +
 doc/guides/cryptodevs/index.rst        |   3 +-
 doc/guides/rel_notes/release_16_04.rst |   3 +
 drivers/crypto/Makefile                |   1 +
 mk/rte.app.mk                          |   1 +
 7 files changed, 417 insertions(+), 2 deletions(-)
MAINTAINERS +4 -0
index 5ab8385..6bb80a3 100644
@@ -366,6 +366,10 @@ M: Pablo de Lara <[email protected]>
 F: drivers/crypto/snow3g/
 F: doc/guides/cryptodevs/snow3g.rst
 
+Null Crypto PMD
+M: Declan Doherty <[email protected]>
+F: drivers/crypto/null/
+F: doc/guides/cryptodevs/snow3g.rst
 
 Packet processing
 -----------------
app/test/test_cryptodev.c +401 -1

438 lines not on this page · raw message

config/common_base +5 -0
index 1bf2d1e..4a678b3 100644
@@ -350,6 +350,11 @@ CONFIG_RTE_LIBRTE_PMD_SNOW3G=n
 CONFIG_RTE_LIBRTE_PMD_SNOW3G_DEBUG=n
 
 #
+# Compile PMD for NULL Crypto device
+#
+CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO=y
+
+#
 # Compile librte_ring
 #
 CONFIG_RTE_LIBRTE_RING=y
doc/guides/cryptodevs/index.rst +2 -1
index 3c5e04f..85193da 100644
@@ -1,5 +1,5 @@
 ..  BSD LICENSE
-    Copyright(c) 2015 Intel Corporation. All rights reserved.
+    Copyright(c) 2015 - 2016 Intel Corporation. All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions
@@ -37,5 +37,6 @@ Crypto Device Drivers
 
     aesni_mb
     aesni_gcm
+    null
     snow3g
     qat
doc/guides/rel_notes/release_16_04.rst +3 -0
index e978efe..f69feac 100644
@@ -90,6 +90,9 @@ This section should contain new features added in this release. Sample format:
   Added new Crypto PMD to support AES-GCM authenticated encryption and
   authenticated decryption in SW.
 
+* **Added NULL Crypto PMD**
+
+  Added new Crypto PMD to support null crypto operations in SW.
 
 Resolved Issues
 ---------------
drivers/crypto/Makefile +1 -0
index 021ac0d..b420538 100644
@@ -35,5 +35,6 @@ 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
+DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += null
 
 include $(RTE_SDK)/mk/rte.subdir.mk
mk/rte.app.mk +1 -0
index 1ab2ee1..165caa6 100644
@@ -152,6 +152,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)        += -lrte_pmd_qat
 
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -lrte_pmd_aesni_mb
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM)   += -lrte_pmd_aesni_gcm
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += -lrte_pmd_null_crypto
 
 # AESNI MULTI BUFFER / GCM PMDs are dependent on the IPSec_MB library
 ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_MB),y)
Signature · 1 line
2.5.0
#5 lore raw
Quoted 49 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Pablo de Lara
Sent: Friday, March 11, 2016 12:43 AM
To: [email protected]
Subject: [dpdk-dev] [PATCH v3] null_crypto_pmd: PMD to support null crypto operations

From: Declan Doherty <[email protected]>

This patch provides the implementation of a NULL crypto PMD, which supports
NULL cipher and NULL authentication operations, which can be chained together
as follows:

- Authentication Only
- Cipher Only
- Authentication then Cipher
- Cipher then Authentication

As this is a NULL operation device the crypto operations which are submitted for
processing are not actually modified and are stored in a queue pairs processed
packets ring ready for collection when rte_cryptodev_burst_dequeue() is called.

The patch also contains the related unit tests function to test the PMDs supported operations.

---

This patch depends on "AES GCM, AES CMAC fixes and addition of GCM
tests for QAT" patchset
(http://dpdk.org/ml/archives/dev/2016-March/034974.html)

Changes in v2:
- Rebased to include Cryptodev API changes

Changes in v3:

- Added missing doc reference in MAINTAINERS
- Removed attempt to remove a reference already delated

Quoted 9 lines
 MAINTAINERS                            |   4 +
 app/test/test_cryptodev.c              | 402
++++++++++++++++++++++++++++++++-
 config/common_base                     |   5 +
 doc/guides/cryptodevs/index.rst        |   3 +-
 doc/guides/rel_notes/release_16_04.rst |   3 +
 drivers/crypto/Makefile                |   1 +
 mk/rte.app.mk                          |   1 +
 7 files changed, 417 insertions(+), 2 deletions(-)

Self-NACK again, actual driver was not included...

#6 lore raw

PATCH v4 1/1 null_crypto_pmd: PMD to support null crypto operations

In reply to Pablo de Lara

From: Declan Doherty <[email protected]>

This patch provides the implementation of a NULL crypto PMD, which supports NULL cipher and NULL authentication operations, which can be chained together as follows:

- Authentication Only
- Cipher Only
- Authentication then Cipher
- Cipher then Authentication

As this is a NULL operation device the crypto operations which are submitted for processing are not actually modified and are stored in a queue pairs processed packets ring ready for collection when rte_cryptodev_burst_dequeue() is called.

The patch also contains the related unit tests function to test the PMDs supported operations.

---

This patch depends on "AES GCM, AES CMAC fixes and addition of GCM tests for QAT" patchset
(http://dpdk.org/ml/archives/dev/2016-March/034974.html)

Changes in v4:

- Added missing driver files in v3

Changes in v3:

- Added missing doc reference in MAINTAINERS
- Removed attempt to remove a reference already delated

Changes in v2:
- Rebased to include Cryptodev API changes

 MAINTAINERS                                        |   4 +
 app/test/test_cryptodev.c                          | 402 ++++++++++++++++++++-
 config/common_base                                 |   5 +
 doc/guides/cryptodevs/index.rst                    |   3 +-
 doc/guides/rel_notes/release_16_04.rst             |   3 +
 drivers/crypto/Makefile                            |   1 +
 drivers/crypto/null/Makefile                       |  59 +++
 drivers/crypto/null/null_crypto_pmd.c              | 275 ++++++++++++++
 drivers/crypto/null/null_crypto_pmd_ops.c          | 308 ++++++++++++++++
 drivers/crypto/null/null_crypto_pmd_private.h      |  93 +++++
 .../crypto/null/rte_pmd_null_crypto_version.map    |   3 +
 mk/rte.app.mk                                      |   1 +
 12 files changed, 1155 insertions(+), 2 deletions(-)
 create mode 100644 drivers/crypto/null/Makefile
 create mode 100644 drivers/crypto/null/null_crypto_pmd.c
 create mode 100644 drivers/crypto/null/null_crypto_pmd_ops.c
 create mode 100644 drivers/crypto/null/null_crypto_pmd_private.h
 create mode 100644 drivers/crypto/null/rte_pmd_null_crypto_version.map
MAINTAINERS +4 -0
index 5ab8385..6bb80a3 100644
@@ -366,6 +366,10 @@ M: Pablo de Lara <[email protected]>
 F: drivers/crypto/snow3g/
 F: doc/guides/cryptodevs/snow3g.rst
 
+Null Crypto PMD
+M: Declan Doherty <[email protected]>
+F: drivers/crypto/null/
+F: doc/guides/cryptodevs/snow3g.rst
 
 Packet processing
 -----------------
app/test/test_cryptodev.c +401 -1

438 lines not on this page · raw message

config/common_base +5 -0
index 1bf2d1e..4a678b3 100644
@@ -350,6 +350,11 @@ CONFIG_RTE_LIBRTE_PMD_SNOW3G=n
 CONFIG_RTE_LIBRTE_PMD_SNOW3G_DEBUG=n
 
 #
+# Compile PMD for NULL Crypto device
+#
+CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO=y
+
+#
 # Compile librte_ring
 #
 CONFIG_RTE_LIBRTE_RING=y
doc/guides/cryptodevs/index.rst +2 -1
index 3c5e04f..85193da 100644
@@ -1,5 +1,5 @@
 ..  BSD LICENSE
-    Copyright(c) 2015 Intel Corporation. All rights reserved.
+    Copyright(c) 2015 - 2016 Intel Corporation. All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions
@@ -37,5 +37,6 @@ Crypto Device Drivers
 
     aesni_mb
     aesni_gcm
+    null
     snow3g
     qat
doc/guides/rel_notes/release_16_04.rst +3 -0
index e978efe..f69feac 100644
@@ -90,6 +90,9 @@ This section should contain new features added in this release. Sample format:
   Added new Crypto PMD to support AES-GCM authenticated encryption and
   authenticated decryption in SW.
 
+* **Added NULL Crypto PMD**
+
+  Added new Crypto PMD to support null crypto operations in SW.
 
 Resolved Issues
 ---------------
drivers/crypto/Makefile +1 -0
index 021ac0d..b420538 100644
@@ -35,5 +35,6 @@ 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
+DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += null
 
 include $(RTE_SDK)/mk/rte.subdir.mk
drivers/crypto/null/Makefile new file +59 -0

59 lines not on this page · raw message

drivers/crypto/null/null_crypto_pmd.c new file +275 -0

275 lines not on this page · raw message

drivers/crypto/null/null_crypto_pmd_ops.c new file +308 -0

308 lines not on this page · raw message

drivers/crypto/null/null_crypto_pmd_private.h new file +93 -0

93 lines not on this page · raw message

drivers/crypto/null/rte_pmd_null_crypto_version.map new file +3 -0
new file mode 100644
index 0000000..dc4d417
@@ -0,0 +1,3 @@
+DPDK_16.04 {
+	local: *;
+};
mk/rte.app.mk +1 -0
index 1ab2ee1..165caa6 100644
@@ -152,6 +152,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)        += -lrte_pmd_qat
 
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -lrte_pmd_aesni_mb
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM)   += -lrte_pmd_aesni_gcm
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += -lrte_pmd_null_crypto
 
 # AESNI MULTI BUFFER / GCM PMDs are dependent on the IPSec_MB library
 ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_MB),y)
Signature · 1 line
2.5.0
#7 lore raw

Sorry, we need a v5

2016-03-11 00:50, Pablo de Lara:

MAINTAINERS M: Pablo de Lara <[email protected]> · line 372

Quoted 4 lines
MAINTAINERS +4 -0
+Null Crypto PMD
+M: Declan Doherty <[email protected]>
+F: drivers/crypto/null/
+F: doc/guides/cryptodevs/snow3g.rst

Not the right doc.
The null doc is not in this patch BTW.

Missing blank line (2 before next section).

Quoted 3 lines

Packet processing
-----------------

#8 lore raw
Quoted 21 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Friday, March 11, 2016 12:56 AM
To: De Lara Guarch, Pablo
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH v4] null_crypto_pmd: PMD to support null crypto operations

Sorry, we need a v5

2016-03-11 00:50, Pablo de Lara:

MAINTAINERS M: Pablo de Lara <[email protected]> · line 372

Quoted 4 lines
MAINTAINERS +4 -0
+Null Crypto PMD
+M: Declan Doherty <[email protected]>
+F: drivers/crypto/null/
+F: doc/guides/cryptodevs/snow3g.rst

Not the right doc.
The null doc is not in this patch BTW.

Quoted 5 lines

Missing blank line (2 before next section).

Quoted 3 lines

Packet processing
-----------------

Done. Sorry for the extra versions.

#9 lore raw

PATCH v5 1/1 null_crypto_pmd: PMD to support null crypto operations

In reply to Pablo de Lara

From: Declan Doherty <[email protected]>

This patch provides the implementation of a NULL crypto PMD, which supports NULL cipher and NULL authentication operations, which can be chained together as follows:

- Authentication Only
- Cipher Only
- Authentication then Cipher
- Cipher then Authentication

As this is a NULL operation device the crypto operations which are submitted for processing are not actually modified and are stored in a queue pairs processed packets ring ready for collection when rte_cryptodev_burst_dequeue() is called.

The patch also contains the related unit tests function to test the PMDs supported operations.

---

This patch depends on "AES GCM, AES CMAC fixes and addition of GCM tests for QAT" patchset
(http://dpdk.org/ml/archives/dev/2016-March/034974.html)

Changes in v5:

- Added missing document in v3/v4
- Fixed wrong reference to documentation

Changes in v4:

- Added missing driver files in v3

Changes in v3:

- Added missing doc reference in MAINTAINERS
- Removed attempt to remove a reference already delated

Changes in v2:
- Rebased to include Cryptodev API changes

 MAINTAINERS                                        |   5 +
 app/test/test_cryptodev.c                          | 402 ++++++++++++++++++++-
 config/common_base                                 |   5 +
 doc/guides/cryptodevs/index.rst                    |   3 +-
 doc/guides/cryptodevs/null.rst                     |  72 ++++
 doc/guides/rel_notes/release_16_04.rst             |   3 +
 drivers/crypto/Makefile                            |   1 +
 drivers/crypto/null/Makefile                       |  59 +++
 drivers/crypto/null/null_crypto_pmd.c              | 275 ++++++++++++++
 drivers/crypto/null/null_crypto_pmd_ops.c          | 308 ++++++++++++++++
 drivers/crypto/null/null_crypto_pmd_private.h      |  93 +++++
 .../crypto/null/rte_pmd_null_crypto_version.map    |   3 +
 mk/rte.app.mk                                      |   1 +
 13 files changed, 1228 insertions(+), 2 deletions(-)
 create mode 100644 doc/guides/cryptodevs/null.rst
 create mode 100644 drivers/crypto/null/Makefile
 create mode 100644 drivers/crypto/null/null_crypto_pmd.c
 create mode 100644 drivers/crypto/null/null_crypto_pmd_ops.c
 create mode 100644 drivers/crypto/null/null_crypto_pmd_private.h
 create mode 100644 drivers/crypto/null/rte_pmd_null_crypto_version.map
MAINTAINERS +5 -0
index 5ab8385..eec307a 100644
@@ -366,6 +366,11 @@ M: Pablo de Lara <[email protected]>
 F: drivers/crypto/snow3g/
 F: doc/guides/cryptodevs/snow3g.rst
 
+Null Crypto PMD
+M: Declan Doherty <[email protected]>
+F: drivers/crypto/null/
+F: doc/guides/cryptodevs/null.rst
+
 
 Packet processing
 -----------------
app/test/test_cryptodev.c +401 -1

438 lines not on this page · raw message

config/common_base +5 -0
index 1bf2d1e..4a678b3 100644
@@ -350,6 +350,11 @@ CONFIG_RTE_LIBRTE_PMD_SNOW3G=n
 CONFIG_RTE_LIBRTE_PMD_SNOW3G_DEBUG=n
 
 #
+# Compile PMD for NULL Crypto device
+#
+CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO=y
+
+#
 # Compile librte_ring
 #
 CONFIG_RTE_LIBRTE_RING=y
doc/guides/cryptodevs/index.rst +2 -1
index 3c5e04f..85193da 100644
@@ -1,5 +1,5 @@
 ..  BSD LICENSE
-    Copyright(c) 2015 Intel Corporation. All rights reserved.
+    Copyright(c) 2015 - 2016 Intel Corporation. All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions
@@ -37,5 +37,6 @@ Crypto Device Drivers
 
     aesni_mb
     aesni_gcm
+    null
     snow3g
     qat
doc/guides/cryptodevs/null.rst new file +72 -0

72 lines not on this page · raw message

doc/guides/rel_notes/release_16_04.rst +3 -0
index e978efe..f69feac 100644
@@ -90,6 +90,9 @@ This section should contain new features added in this release. Sample format:
   Added new Crypto PMD to support AES-GCM authenticated encryption and
   authenticated decryption in SW.
 
+* **Added NULL Crypto PMD**
+
+  Added new Crypto PMD to support null crypto operations in SW.
 
 Resolved Issues
 ---------------
drivers/crypto/Makefile +1 -0
index 021ac0d..b420538 100644
@@ -35,5 +35,6 @@ 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
+DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += null
 
 include $(RTE_SDK)/mk/rte.subdir.mk
drivers/crypto/null/Makefile new file +59 -0

59 lines not on this page · raw message

drivers/crypto/null/null_crypto_pmd.c new file +275 -0

275 lines not on this page · raw message

drivers/crypto/null/null_crypto_pmd_ops.c new file +308 -0

308 lines not on this page · raw message

drivers/crypto/null/null_crypto_pmd_private.h new file +93 -0

93 lines not on this page · raw message

drivers/crypto/null/rte_pmd_null_crypto_version.map new file +3 -0
new file mode 100644
index 0000000..dc4d417
@@ -0,0 +1,3 @@
+DPDK_16.04 {
+	local: *;
+};
mk/rte.app.mk +1 -0
index 1ab2ee1..165caa6 100644
@@ -152,6 +152,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)        += -lrte_pmd_qat
 
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -lrte_pmd_aesni_mb
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM)   += -lrte_pmd_aesni_gcm
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += -lrte_pmd_null_crypto
 
 # AESNI MULTI BUFFER / GCM PMDs are dependent on the IPSec_MB library
 ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_MB),y)
Signature · 1 line
2.5.0
#10 lore raw

2016-03-11 01:04, Pablo de Lara:

Quoted 15 lines

From: Declan Doherty <[email protected]>

This patch provides the implementation of a NULL crypto PMD, which supports NULL cipher and NULL authentication operations, which can be chained together as follows:

- Authentication Only
- Cipher Only
- Authentication then Cipher
- Cipher then Authentication

As this is a NULL operation device the crypto operations which are submitted for processing are not actually modified and are stored in a queue pairs processed packets ring ready for collection when rte_cryptodev_burst_dequeue() is called.

Quoted 5 lines

The patch also contains the related unit tests function to test the PMDs supported operations.

Applied with a small doc indent fix, thanks