build: detect micro-arch on ARM
[dpdk.git] / lib / librte_cryptodev / rte_cryptodev.c
index 8063211..8745b6b 100644 (file)
@@ -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 <sys/types.h>
@@ -362,6 +334,8 @@ rte_cryptodev_get_feature_name(uint64_t flag)
                return "CPU_AVX";
        case RTE_CRYPTODEV_FF_CPU_AVX2:
                return "CPU_AVX2";
+       case RTE_CRYPTODEV_FF_CPU_AVX512:
+               return "CPU_AVX512";
        case RTE_CRYPTODEV_FF_CPU_AESNI:
                return "CPU_AESNI";
        case RTE_CRYPTODEV_FF_HW_ACCELERATED:
@@ -377,12 +351,6 @@ rte_cryptodev_get_feature_name(uint64_t flag)
        }
 }
 
-int
-rte_cryptodev_create_vdev(const char *name, const char *args)
-{
-       return rte_vdev_init(name, args);
-}
-
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_dev(uint8_t dev_id)
 {
@@ -1126,7 +1094,7 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
        struct rte_cryptodev_sym_session *sess;
 
        /* Allocate a session structure from the session pool */
-       if (rte_mempool_get(mp, (void *)&sess)) {
+       if (rte_mempool_get(mp, (void **)&sess)) {
                CDEV_LOG_ERR("couldn't get object from session mempool");
                return NULL;
        }
@@ -1284,7 +1252,7 @@ rte_crypto_op_init(struct rte_mempool *mempool,
 
        __rte_crypto_op_reset(op, type);
 
-       op->phys_addr = rte_mem_virt2phy(_op_data);
+       op->phys_addr = rte_mem_virt2iova(_op_data);
        op->mempool = mempool;
 }