/*-
* BSD LICENSE
*
- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- * All rights reserved.
+ * Copyright(c) 2016-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
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <string.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <termios.h>
-#include <ctype.h>
-#include <sys/queue.h>
+#ifndef _CPERF_OPS_
+#define _CPERF_OPS_
-#include <cmdline_rdline.h>
-#include <cmdline_parse.h>
-#include <cmdline_socket.h>
-#include <cmdline.h>
+#include <rte_crypto.h>
-#include "cmdline_test.h"
+#include "cperf.h"
+#include "cperf_options.h"
+#include "cperf_test_vectors.h"
-int
-main(int __attribute__((unused)) argc, char __attribute__((unused)) ** argv)
-{
- struct cmdline *cl;
- cl = cmdline_stdin_new(main_ctx, "CMDLINE_TEST>>");
- if (cl == NULL) {
- return -1;
- }
- cmdline_interact(cl);
- cmdline_stdin_exit(cl);
+typedef struct rte_cryptodev_sym_session *(*cperf_sessions_create_t)(
+ uint8_t dev_id, const struct cperf_options *options,
+ const struct cperf_test_vector *test_vector);
+
+typedef int (*cperf_populate_ops_t)(struct rte_crypto_op **ops,
+ struct rte_mbuf **bufs_in, struct rte_mbuf **bufs_out,
+ uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
+ const struct cperf_options *options,
+ const struct cperf_test_vector *test_vector);
+
+struct cperf_op_fns {
+ cperf_sessions_create_t sess_create;
+ cperf_populate_ops_t populate_ops;
+};
+
+int
+cperf_get_op_functions(const struct cperf_options *options,
+ struct cperf_op_fns *op_fns);
- return 0;
-}
+#endif /* _CPERF_OPS_ */