1f8be1786SSlawomir Mrozowicz /*- 2f8be1786SSlawomir Mrozowicz * BSD LICENSE 3f8be1786SSlawomir Mrozowicz * 4f8be1786SSlawomir Mrozowicz * Copyright(c) 2016-2017 Intel Corporation. All rights reserved. 5f8be1786SSlawomir Mrozowicz * 6f8be1786SSlawomir Mrozowicz * Redistribution and use in source and binary forms, with or without 7f8be1786SSlawomir Mrozowicz * modification, are permitted provided that the following conditions 8f8be1786SSlawomir Mrozowicz * are met: 9f8be1786SSlawomir Mrozowicz * 10f8be1786SSlawomir Mrozowicz * * Redistributions of source code must retain the above copyright 11f8be1786SSlawomir Mrozowicz * notice, this list of conditions and the following disclaimer. 12f8be1786SSlawomir Mrozowicz * * Redistributions in binary form must reproduce the above copyright 13f8be1786SSlawomir Mrozowicz * notice, this list of conditions and the following disclaimer in 14f8be1786SSlawomir Mrozowicz * the documentation and/or other materials provided with the 15f8be1786SSlawomir Mrozowicz * distribution. 16f8be1786SSlawomir Mrozowicz * * Neither the name of Intel Corporation nor the names of its 17f8be1786SSlawomir Mrozowicz * contributors may be used to endorse or promote products derived 18f8be1786SSlawomir Mrozowicz * from this software without specific prior written permission. 19f8be1786SSlawomir Mrozowicz * 20f8be1786SSlawomir Mrozowicz * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21f8be1786SSlawomir Mrozowicz * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22f8be1786SSlawomir Mrozowicz * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23f8be1786SSlawomir Mrozowicz * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24f8be1786SSlawomir Mrozowicz * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25f8be1786SSlawomir Mrozowicz * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26f8be1786SSlawomir Mrozowicz * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27f8be1786SSlawomir Mrozowicz * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28f8be1786SSlawomir Mrozowicz * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29f8be1786SSlawomir Mrozowicz * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30f8be1786SSlawomir Mrozowicz * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31f8be1786SSlawomir Mrozowicz */ 32f8be1786SSlawomir Mrozowicz 33f8be1786SSlawomir Mrozowicz #ifndef _CPERF_OPS_ 34f8be1786SSlawomir Mrozowicz #define _CPERF_OPS_ 35f8be1786SSlawomir Mrozowicz 36f8be1786SSlawomir Mrozowicz #include <rte_crypto.h> 37f8be1786SSlawomir Mrozowicz 38f8be1786SSlawomir Mrozowicz #include "cperf.h" 39f8be1786SSlawomir Mrozowicz #include "cperf_options.h" 40f8be1786SSlawomir Mrozowicz #include "cperf_test_vectors.h" 41f8be1786SSlawomir Mrozowicz 42f8be1786SSlawomir Mrozowicz 43f8be1786SSlawomir Mrozowicz typedef struct rte_cryptodev_sym_session *(*cperf_sessions_create_t)( 44f8be1786SSlawomir Mrozowicz uint8_t dev_id, const struct cperf_options *options, 45*0fbd75a9SPablo de Lara const struct cperf_test_vector *test_vector, 46*0fbd75a9SPablo de Lara uint16_t iv_offset); 47f8be1786SSlawomir Mrozowicz 48f8be1786SSlawomir Mrozowicz typedef int (*cperf_populate_ops_t)(struct rte_crypto_op **ops, 49f8be1786SSlawomir Mrozowicz struct rte_mbuf **bufs_in, struct rte_mbuf **bufs_out, 50f8be1786SSlawomir Mrozowicz uint16_t nb_ops, struct rte_cryptodev_sym_session *sess, 51f8be1786SSlawomir Mrozowicz const struct cperf_options *options, 52f8b7fdd3SPablo de Lara const struct cperf_test_vector *test_vector, 53f8b7fdd3SPablo de Lara uint16_t iv_offset); 54f8be1786SSlawomir Mrozowicz 55f8be1786SSlawomir Mrozowicz struct cperf_op_fns { 56f8be1786SSlawomir Mrozowicz cperf_sessions_create_t sess_create; 57f8be1786SSlawomir Mrozowicz cperf_populate_ops_t populate_ops; 58f8be1786SSlawomir Mrozowicz }; 59f8be1786SSlawomir Mrozowicz 60f8be1786SSlawomir Mrozowicz int 61f8be1786SSlawomir Mrozowicz cperf_get_op_functions(const struct cperf_options *options, 62f8be1786SSlawomir Mrozowicz struct cperf_op_fns *op_fns); 63f8be1786SSlawomir Mrozowicz 64f8be1786SSlawomir Mrozowicz #endif /* _CPERF_OPS_ */ 65