X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=test%2Ftest%2Ftest_cryptodev_blockcipher.c;h=ed066180acd72a1bb61ec0d1f866d0c0bff12781;hb=5e80364a0389f76e4c8c20cdbe40a4db36b49f58;hp=89b02e5979db06e811b13957608b2f477f7a75a1;hpb=1633ead54f33c4bc4931b0a06d20a732eb53c5f0;p=dpdk.git diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c index 89b02e5979..ed066180ac 100644 --- a/test/test/test_cryptodev_blockcipher.c +++ b/test/test/test_cryptodev_blockcipher.c @@ -1,33 +1,5 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2015-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2015-2017 Intel Corporation */ #include @@ -92,6 +64,10 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)); int dpaa2_sec_pmd = rte_cryptodev_driver_id_get( RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD)); + int dpaa_sec_pmd = rte_cryptodev_driver_id_get( + RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD)); + int mrvl_pmd = rte_cryptodev_driver_id_get( + RTE_STR(CRYPTODEV_NAME_MRVL_PMD)); int nb_segs = 1; @@ -114,9 +90,11 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, tdata->auth_key.len); if (driver_id == dpaa2_sec_pmd || + driver_id == dpaa_sec_pmd || driver_id == qat_pmd || driver_id == openssl_pmd || - driver_id == armv8_pmd) { /* Fall through */ + driver_id == armv8_pmd || + driver_id == mrvl_pmd) { /* Fall through */ digest_len = tdata->digest.len; } else if (driver_id == aesni_mb_pmd || driver_id == scheduler_pmd) { @@ -323,14 +301,14 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, sym_op->auth.digest.data = pktmbuf_mtod_offset (iobuf, digest_offset); sym_op->auth.digest.phys_addr = - pktmbuf_mtophys_offset(iobuf, + pktmbuf_iova_offset(iobuf, digest_offset); } else { auth_xform->auth.op = RTE_CRYPTO_AUTH_OP_VERIFY; sym_op->auth.digest.data = pktmbuf_mtod_offset (sym_op->m_src, digest_offset); sym_op->auth.digest.phys_addr = - pktmbuf_mtophys_offset(sym_op->m_src, + pktmbuf_iova_offset(sym_op->m_src, digest_offset); } @@ -356,12 +334,12 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, rte_crypto_op_attach_sym_session(op, sess); } - TEST_HEXDUMP(stdout, "m_src(before):", + debug_hexdump(stdout, "m_src(before):", sym_op->m_src->buf_addr, sym_op->m_src->buf_len); rte_memcpy(tmp_src_buf, sym_op->m_src->buf_addr, sym_op->m_src->buf_len); if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_OOP) { - TEST_HEXDUMP(stdout, "m_dst(before):", + debug_hexdump(stdout, "m_dst(before):", sym_op->m_dst->buf_addr, sym_op->m_dst->buf_len); rte_memcpy(tmp_dst_buf, sym_op->m_dst->buf_addr, sym_op->m_dst->buf_len); @@ -389,10 +367,10 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, goto error_exit; } - TEST_HEXDUMP(stdout, "m_src(after):", + debug_hexdump(stdout, "m_src(after):", sym_op->m_src->buf_addr, sym_op->m_src->buf_len); if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_OOP) - TEST_HEXDUMP(stdout, "m_dst(after):", + debug_hexdump(stdout, "m_dst(after):", sym_op->m_dst->buf_addr, sym_op->m_dst->buf_len); /* Verify results */ @@ -579,6 +557,8 @@ test_blockcipher_all_tests(struct rte_mempool *mbuf_pool, RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD)); int dpaa2_sec_pmd = rte_cryptodev_driver_id_get( RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD)); + int dpaa_sec_pmd = rte_cryptodev_driver_id_get( + RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD)); int scheduler_pmd = rte_cryptodev_driver_id_get( RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD)); int armv8_pmd = rte_cryptodev_driver_id_get( @@ -587,6 +567,8 @@ test_blockcipher_all_tests(struct rte_mempool *mbuf_pool, RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)); int qat_pmd = rte_cryptodev_driver_id_get( RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)); + int mrvl_pmd = rte_cryptodev_driver_id_get( + RTE_STR(CRYPTODEV_NAME_MRVL_PMD)); switch (test_type) { case BLKCIPHER_AES_CHAIN_TYPE: @@ -645,6 +627,10 @@ test_blockcipher_all_tests(struct rte_mempool *mbuf_pool, target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER; else if (driver_id == dpaa2_sec_pmd) target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC; + else if (driver_id == dpaa_sec_pmd) + target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC; + else if (driver_id == mrvl_pmd) + target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_MRVL; else TEST_ASSERT(0, "Unrecognized cryptodev type");