From: Declan Doherty <declan.dohe...@intel.com>

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.

Signed-off-by: Declan Doherty <declan.doherty at intel.com>
Acked-by: Deepak Kumar JAIN<deepak.k.jain at intel.com>
---

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(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 5ab8385..6bb80a3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -366,6 +366,10 @@ M: Pablo de Lara <pablo.de.lara.guarch at intel.com>
 F: drivers/crypto/snow3g/
 F: doc/guides/cryptodevs/snow3g.rst

+Null Crypto PMD
+M: Declan Doherty <declan.doherty at intel.com>
+F: drivers/crypto/null/
+F: doc/guides/cryptodevs/snow3g.rst

 Packet processing
 -----------------
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 5777d60..2494bae 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -226,6 +226,23 @@ testsuite_setup(void)
                }
        }

+       /* Create 2 NULL devices if required */
+       if (gbl_cryptodev_type == RTE_CRYPTODEV_NULL_PMD) {
+               nb_devs = rte_cryptodev_count_devtype(
+                               RTE_CRYPTODEV_NULL_PMD);
+               if (nb_devs < 2) {
+                       for (i = nb_devs; i < 2; i++) {
+                               int dev_id = rte_eal_vdev_init(
+                                       CRYPTODEV_NAME_NULL_PMD, NULL);
+
+                               TEST_ASSERT(dev_id >= 0,
+                                       "Failed to create instance %u of"
+                                       " pmd : %s",
+                                       i, CRYPTODEV_NAME_NULL_PMD);
+                       }
+               }
+       }
+
        nb_devs = rte_cryptodev_count();
        if (nb_devs < 1) {
                RTE_LOG(ERR, USER1, "No crypto devices found?");
@@ -3396,15 +3413,362 @@ test_not_in_place_crypto(void)
                        QUOTE_512_BYTES,
                        "Plaintext data not as expected");

+       return TEST_SUCCESS;
+}
+
+static int
+test_null_cipher_only_operation(void)
+{
+       struct crypto_testsuite_params *ts_params = &testsuite_params;
+       struct crypto_unittest_params *ut_params = &unittest_params;
+
+       /* Generate test mbuf data and space for digest */
+       ut_params->ibuf = setup_test_string(ts_params->mbuf_pool,
+                       catch_22_quote, QUOTE_512_BYTES, 0);
+
+       /* Setup Cipher Parameters */
+       ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+       ut_params->cipher_xform.next = NULL;
+
+       ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+       ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+
+       /* Create Crypto session*/
+       ut_params->sess = rte_cryptodev_sym_session_create(
+                       ts_params->valid_devs[0], &ut_params->cipher_xform);
+       TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
+
+       /* Generate Crypto op data structure */
+       ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
+                       RTE_CRYPTO_OP_TYPE_SYMMETRIC);
+       TEST_ASSERT_NOT_NULL(ut_params->op,
+                       "Failed to allocate symmetric crypto operation struct");
+
+       /* Set crypto operation data parameters */
+       rte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);
+
+       struct rte_crypto_sym_op *sym_op = ut_params->op->sym;
+
+       /* set crypto operation source mbuf */
+       sym_op->m_src = ut_params->ibuf;
+
+       sym_op->cipher.data.offset = 0;
+       sym_op->cipher.data.length = QUOTE_512_BYTES;
+
+       /* Process crypto operation */
+       ut_params->op = process_crypto_request(ts_params->valid_devs[0],
+                       ut_params->op);
+       TEST_ASSERT_NOT_NULL(ut_params->op, "no crypto operation returned");
+
+       TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,
+                       "crypto operation processing failed");
+
        /* Validate obuf */
+       TEST_ASSERT_BUFFERS_ARE_EQUAL(
+                       rte_pktmbuf_mtod(ut_params->op->sym->m_src, uint8_t *),
+                       catch_22_quote,
+                       QUOTE_512_BYTES,
+                       "Ciphertext data not as expected");
+
+       return TEST_SUCCESS;
+}
+
+static int
+test_null_auth_only_operation(void)
+{
+       struct crypto_testsuite_params *ts_params = &testsuite_params;
+       struct crypto_unittest_params *ut_params = &unittest_params;
+
+       /* Generate test mbuf data and space for digest */
+       ut_params->ibuf = setup_test_string(ts_params->mbuf_pool,
+                       catch_22_quote, QUOTE_512_BYTES, 0);
+
+       /* Setup HMAC Parameters */
+       ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+       ut_params->auth_xform.next = NULL;
+
+       ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_NULL;
+       ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
+
+       /* Create Crypto session*/
+       ut_params->sess = rte_cryptodev_sym_session_create(
+                       ts_params->valid_devs[0], &ut_params->auth_xform);
+       TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
+
+       /* Generate Crypto op data structure */
+       ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
+                       RTE_CRYPTO_OP_TYPE_SYMMETRIC);
+       TEST_ASSERT_NOT_NULL(ut_params->op,
+                       "Failed to allocate symmetric crypto operation struct");
+
+       /* Set crypto operation data parameters */
+       rte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);
+
+       struct rte_crypto_sym_op *sym_op = ut_params->op->sym;
+
+       sym_op->m_src = ut_params->ibuf;
+
+       sym_op->auth.data.offset = 0;
+       sym_op->auth.data.length = QUOTE_512_BYTES;
+
+       /* Process crypto operation */
+       ut_params->op = process_crypto_request(ts_params->valid_devs[0],
+                       ut_params->op);
+       TEST_ASSERT_NOT_NULL(ut_params->op, "no crypto operation returned");

        TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,
-                       "Digest verification failed");
+                       "crypto operation processing failed");
+
+       return TEST_SUCCESS;
+}
+
+static int
+test_null_cipher_auth_operation(void)
+{
+       struct crypto_testsuite_params *ts_params = &testsuite_params;
+       struct crypto_unittest_params *ut_params = &unittest_params;
+
+       /* Generate test mbuf data and space for digest */
+       ut_params->ibuf = setup_test_string(ts_params->mbuf_pool,
+                       catch_22_quote, QUOTE_512_BYTES, 0);
+
+       /* Setup Cipher Parameters */
+       ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+       ut_params->cipher_xform.next = &ut_params->auth_xform;
+
+       ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+       ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+
+       /* Setup HMAC Parameters */
+       ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+       ut_params->auth_xform.next = NULL;
+
+       ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_NULL;
+       ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
+
+       /* Create Crypto session*/
+       ut_params->sess = rte_cryptodev_sym_session_create(
+                       ts_params->valid_devs[0], &ut_params->cipher_xform);
+       TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
+
+       /* Generate Crypto op data structure */
+       ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
+                       RTE_CRYPTO_OP_TYPE_SYMMETRIC);
+       TEST_ASSERT_NOT_NULL(ut_params->op,
+                       "Failed to allocate symmetric crypto operation struct");
+
+       /* Set crypto operation data parameters */
+       rte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);
+
+       struct rte_crypto_sym_op *sym_op = ut_params->op->sym;
+
+       sym_op->m_src = ut_params->ibuf;
+
+       sym_op->cipher.data.offset = 0;
+       sym_op->cipher.data.length = QUOTE_512_BYTES;
+
+       sym_op->auth.data.offset = 0;
+       sym_op->auth.data.length = QUOTE_512_BYTES;
+
+       /* Process crypto operation */
+       ut_params->op = process_crypto_request(ts_params->valid_devs[0],
+                       ut_params->op);
+       TEST_ASSERT_NOT_NULL(ut_params->op, "no crypto operation returned");
+
+       TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,
+                       "crypto operation processing failed");
+
+       /* Validate obuf */
+       TEST_ASSERT_BUFFERS_ARE_EQUAL(
+                       rte_pktmbuf_mtod(ut_params->op->sym->m_src, uint8_t *),
+                       catch_22_quote,
+                       QUOTE_512_BYTES,
+                       "Ciphertext data not as expected");
+
+       return TEST_SUCCESS;
+}
+
+static int
+test_null_auth_cipher_operation(void)
+{
+       struct crypto_testsuite_params *ts_params = &testsuite_params;
+       struct crypto_unittest_params *ut_params = &unittest_params;
+
+       /* Generate test mbuf data and space for digest */
+       ut_params->ibuf = setup_test_string(ts_params->mbuf_pool,
+                       catch_22_quote, QUOTE_512_BYTES, 0);
+
+       /* Setup Cipher Parameters */
+       ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+       ut_params->cipher_xform.next = NULL;
+
+       ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+       ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+
+       /* Setup HMAC Parameters */
+       ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+       ut_params->auth_xform.next = &ut_params->cipher_xform;
+
+       ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_NULL;
+       ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
+
+       /* Create Crypto session*/
+       ut_params->sess = rte_cryptodev_sym_session_create(
+                       ts_params->valid_devs[0], &ut_params->cipher_xform);
+       TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
+
+       /* Generate Crypto op data structure */
+       ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
+                       RTE_CRYPTO_OP_TYPE_SYMMETRIC);
+       TEST_ASSERT_NOT_NULL(ut_params->op,
+                       "Failed to allocate symmetric crypto operation struct");
+
+       /* Set crypto operation data parameters */
+       rte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);
+
+       struct rte_crypto_sym_op *sym_op = ut_params->op->sym;
+
+       sym_op->m_src = ut_params->ibuf;
+
+       sym_op->cipher.data.offset = 0;
+       sym_op->cipher.data.length = QUOTE_512_BYTES;
+
+       sym_op->auth.data.offset = 0;
+       sym_op->auth.data.length = QUOTE_512_BYTES;
+
+       /* Process crypto operation */
+       ut_params->op = process_crypto_request(ts_params->valid_devs[0],
+                       ut_params->op);
+       TEST_ASSERT_NOT_NULL(ut_params->op, "no crypto operation returned");
+
+       TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,
+                       "crypto operation processing failed");
+
+       /* Validate obuf */
+       TEST_ASSERT_BUFFERS_ARE_EQUAL(
+                       rte_pktmbuf_mtod(ut_params->op->sym->m_src, uint8_t *),
+                       catch_22_quote,
+                       QUOTE_512_BYTES,
+                       "Ciphertext data not as expected");
+
+       return TEST_SUCCESS;
+}
+
+
+static int
+test_null_invalid_operation(void)
+{
+       struct crypto_testsuite_params *ts_params = &testsuite_params;
+       struct crypto_unittest_params *ut_params = &unittest_params;
+
+       /* Setup Cipher Parameters */
+       ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+       ut_params->cipher_xform.next = NULL;
+
+       ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
+       ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+
+       /* Create Crypto session*/
+       ut_params->sess = rte_cryptodev_sym_session_create(
+                       ts_params->valid_devs[0], &ut_params->cipher_xform);
+       TEST_ASSERT_NULL(ut_params->sess,
+                       "Session creation succeeded unexpectedly");
+
+
+       /* Setup HMAC Parameters */
+       ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+       ut_params->auth_xform.next = NULL;
+
+       ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_SHA1_HMAC;
+       ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
+
+       /* Create Crypto session*/
+       ut_params->sess = rte_cryptodev_sym_session_create(
+                       ts_params->valid_devs[0], &ut_params->auth_xform);
+       TEST_ASSERT_NULL(ut_params->sess,
+                       "Session creation succeeded unexpectedly");

        return TEST_SUCCESS;
 }


+#define NULL_BURST_LENGTH (32)
+
+static int
+test_null_burst_operation(void)
+{
+       struct crypto_testsuite_params *ts_params = &testsuite_params;
+       struct crypto_unittest_params *ut_params = &unittest_params;
+
+       unsigned i, burst_len = NULL_BURST_LENGTH;
+
+       struct rte_crypto_op *burst[NULL_BURST_LENGTH] = { NULL };
+       struct rte_crypto_op *burst_dequeued[NULL_BURST_LENGTH] = { NULL };
+
+       /* Setup Cipher Parameters */
+       ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+       ut_params->cipher_xform.next = &ut_params->auth_xform;
+
+       ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+       ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+
+       /* Setup HMAC Parameters */
+       ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+       ut_params->auth_xform.next = NULL;
+
+       ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_NULL;
+       ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
+
+       /* Create Crypto session*/
+       ut_params->sess = rte_cryptodev_sym_session_create(
+                       ts_params->valid_devs[0], &ut_params->cipher_xform);
+       TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
+
+       TEST_ASSERT_EQUAL(rte_crypto_op_bulk_alloc(ts_params->op_mpool,
+                       RTE_CRYPTO_OP_TYPE_SYMMETRIC, burst, burst_len),
+                       burst_len, "failed to generate burst of crypto ops");
+
+       /* Generate an operation for each mbuf in burst */
+       for (i = 0; i < burst_len; i++) {
+               struct rte_mbuf *m = rte_pktmbuf_alloc(ts_params->mbuf_pool);
+
+               TEST_ASSERT_NOT_NULL(m, "Failed to allocate mbuf");
+
+               unsigned *data = (unsigned *)rte_pktmbuf_append(m,
+                               sizeof(unsigned));
+               *data = i;
+
+               rte_crypto_op_attach_sym_session(burst[i], ut_params->sess);
+
+               burst[i]->sym->m_src = m;
+       }
+
+       /* Process crypto operation */
+       TEST_ASSERT_EQUAL(rte_cryptodev_enqueue_burst(ts_params->valid_devs[0],
+                       0, burst, burst_len),
+                       burst_len,
+                       "Error enqueuing burst");
+
+       TEST_ASSERT_EQUAL(rte_cryptodev_dequeue_burst(ts_params->valid_devs[0],
+                       0, burst_dequeued, burst_len),
+                       burst_len,
+                       "Error dequeuing burst");
+
+
+       for (i = 0; i < burst_len; i++) {
+               TEST_ASSERT_EQUAL(
+                       *rte_pktmbuf_mtod(burst[i]->sym->m_src, uint32_t *),
+                       *rte_pktmbuf_mtod(burst_dequeued[i]->sym->m_src,
+                                       uint32_t *),
+                       "data not as expected");
+
+               rte_pktmbuf_free(burst[i]->sym->m_src);
+               rte_crypto_op_free(burst[i]);
+       }
+
+       return TEST_SUCCESS;
+}
+
 static struct unit_test_suite cryptodev_qat_testsuite  = {
        .suite_name = "Crypto QAT Unit Test Suite",
        .setup = testsuite_setup,
@@ -3641,6 +4005,28 @@ static struct unit_test_suite 
cryptodev_sw_snow3g_testsuite  = {
        }
 };

+static struct unit_test_suite cryptodev_null_testsuite  = {
+       .suite_name = "Crypto Device NULL Unit Test Suite",
+       .setup = testsuite_setup,
+       .teardown = testsuite_teardown,
+       .unit_test_cases = {
+               TEST_CASE_ST(ut_setup, ut_teardown,
+                       test_null_auth_only_operation),
+               TEST_CASE_ST(ut_setup, ut_teardown,
+                       test_null_cipher_only_operation),
+               TEST_CASE_ST(ut_setup, ut_teardown,
+                       test_null_cipher_auth_operation),
+               TEST_CASE_ST(ut_setup, ut_teardown,
+                       test_null_auth_cipher_operation),
+               TEST_CASE_ST(ut_setup, ut_teardown,
+                       test_null_invalid_operation),
+               TEST_CASE_ST(ut_setup, ut_teardown,
+                       test_null_burst_operation),
+
+               TEST_CASES_END() /**< NULL terminate unit test array */
+       }
+};
+
 static int
 test_cryptodev_qat(void /*argv __rte_unused, int argc __rte_unused*/)
 {
@@ -3679,6 +4065,19 @@ static struct test_command cryptodev_aesni_gcm_cmd = {
 };

 static int
+test_cryptodev_null(void)
+{
+       gbl_cryptodev_type = RTE_CRYPTODEV_NULL_PMD;
+
+       return unit_test_suite_runner(&cryptodev_null_testsuite);
+}
+
+static struct test_command cryptodev_null_cmd = {
+       .command = "cryptodev_null_autotest",
+       .callback = test_cryptodev_null,
+};
+
+static int
 test_cryptodev_sw_snow3g(void /*argv __rte_unused, int argc __rte_unused*/)
 {
        gbl_cryptodev_type = RTE_CRYPTODEV_SNOW3G_PMD;
@@ -3694,4 +4093,5 @@ static struct test_command cryptodev_sw_snow3g_cmd = {
 REGISTER_TEST_COMMAND(cryptodev_qat_cmd);
 REGISTER_TEST_COMMAND(cryptodev_aesni_mb_cmd);
 REGISTER_TEST_COMMAND(cryptodev_aesni_gcm_cmd);
+REGISTER_TEST_COMMAND(cryptodev_null_cmd);
 REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_cmd);
diff --git a/config/common_base b/config/common_base
index 1bf2d1e..4a678b3 100644
--- a/config/common_base
+++ b/config/common_base
@@ -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
diff --git a/doc/guides/cryptodevs/index.rst b/doc/guides/cryptodevs/index.rst
index 3c5e04f..85193da 100644
--- a/doc/guides/cryptodevs/index.rst
+++ b/doc/guides/cryptodevs/index.rst
@@ -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
diff --git a/doc/guides/rel_notes/release_16_04.rst 
b/doc/guides/rel_notes/release_16_04.rst
index e978efe..f69feac 100644
--- a/doc/guides/rel_notes/release_16_04.rst
+++ b/doc/guides/rel_notes/release_16_04.rst
@@ -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
 ---------------
diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
index 021ac0d..b420538 100644
--- a/drivers/crypto/Makefile
+++ b/drivers/crypto/Makefile
@@ -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
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 1ab2ee1..165caa6 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -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)
-- 
2.5.0

Reply via email to