From: Fiona Trahe <fiona.trahe@intel.com (fiona.trahe@intel.com)>
To: dev@dpdk.org
Cc: pablo.de.lara.guarch@intel.com, john.griffin@intel.com,
deepak.k.jain@intel.com, arkadiuszx.kusztal@intel.com,
fiona.trahe@intel.com
Subject: [dpdk-dev] [PATCH] app/test: add 3DES tests into QuickAssist PMD testsuite
Date: Fri, 26 Aug 2016 18:40:54 +0100 [thread overview]
Message-ID: <1472233254-25712-1-git-send-email-fiona.trahe@intel.com> (raw)
From: Fiona Trahe <fiona.trahe@intel.com>
This patch depends on
* 3DES QuickAssist driver patch:
http://dpdk.org/dev/patchwork/patch/15413/
* libcrypto test patch:
http://dpdk.org/dev/patchwork/patch/15344/
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
app/test/test_cryptodev.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index b7559b7..2c1d93a 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -3901,6 +3901,73 @@ authenticated_decryption_3DES192CTR_HMAC_SHA1(void)
&triple_des192ctr_hmac_sha1_test_vector);
}
+static int
+test_3DES_qat_all(void)
+{
+ int status;
+ int i = 0;
+
+ status = encryption_3DES128CBC();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES128CBC PASS\n", ++i);
+ status = decryption_3DES128CBC();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES128CBC PASS\n", ++i);
+ status = encryption_3DES192CBC();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES192CBC PASS\n", ++i);
+ status = decryption_3DES192CBC();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES192CBC PASS\n", ++i);
+ status = encryption_3DES128CTR();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES128CTR PASS\n", ++i);
+ status = decryption_3DES128CTR();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES128CTR PASS\n", ++i);
+ status = encryption_3DES192CTR();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES192CTR PASS\n", ++i);
+ status = decryption_3DES192CTR();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES192CTR PASS\n", ++i);
+ status = authenticated_encryption_3DES128CBC_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES128CBC_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_decryption_3DES128CBC_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES128CBC_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_encryption_3DES192CBC_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES192CBC_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_decryption_3DES192CBC_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES192CBC_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_encryption_3DES128CTR_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES128CTR_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_decryption_3DES128CTR_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES128CTR_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_encryption_3DES192CTR_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES192CTR_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_decryption_3DES192CTR_HMAC_SHA1();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES192CTR_HMAC_SHA1 PASS\n", ++i);
+ status = authenticated_encryption_3DES128CBC_HMAC_SHA1_out_of_place();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase encryption_3DES128CBC_HMAC_SHA1_oop PASS\n",
+ ++i);
+ status = authenticated_decryption_3DES128CBC_HMAC_SHA1_out_of_place();
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+ printf(" %2d) TestCase decryption_3DES128CBC_HMAC_SHA1_oop PASS\n",
+ ++i);
+
+ return TEST_SUCCESS;
+}
+
+
/* ***** AES-GCM Tests ***** */
static int
@@ -4902,6 +4969,7 @@ static struct unit_test_suite cryptodev_qat_testsuite = {
test_multi_session),
TEST_CASE_ST(ut_setup, ut_teardown, test_AES_qat_all),
+ TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_qat_all),
TEST_CASE_ST(ut_setup, ut_teardown, test_stats),
/** AES GCM Authenticated Encryption */
--
2.5.0
reply other threads:[~2016-08-26 17:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472233254-25712-1-git-send-email-fiona.trahe@intel.com \
--to=fiona.trahe@intel.com \
--cc=arkadiuszx.kusztal@intel.com \
--cc=deepak.k.jain@intel.com \
--cc=dev@dpdk.org \
--cc=john.griffin@intel.com \
--cc=pablo.de.lara.guarch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).