Imported Upstream version 17.05
[deb_dpdk.git] / app / test-crypto-perf / cperf_test_vectors.h
similarity index 60%
rename from app/test/test_table_combined.h
rename to app/test-crypto-perf/cperf_test_vectors.h
index e1619f9..e64f116 100644 (file)
@@ -1,8 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2016 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.
  */
 
-/* Test prototypes */
-int test_table_stub_combined(void);
-int test_table_lpm_combined(void);
-int test_table_lpm_ipv6_combined(void);
-#ifdef RTE_LIBRTE_ACL
-int test_table_acl(void);
+#ifndef _CPERF_TEST_VECTRORS_
+#define _CPERF_TEST_VECTRORS_
+
+#include "cperf_options.h"
+
+struct cperf_test_vector {
+       struct {
+               uint8_t *data;
+               uint32_t length;
+       } plaintext;
+
+       struct {
+               uint8_t *data;
+               uint16_t length;
+       } cipher_key;
+
+       struct {
+               uint8_t *data;
+               uint16_t length;
+       } auth_key;
+
+       struct {
+               uint8_t *data;
+               phys_addr_t phys_addr;
+               uint16_t length;
+       } iv;
+
+       struct {
+               uint8_t *data;
+               uint32_t length;
+       } ciphertext;
+
+       struct {
+               uint8_t *data;
+               phys_addr_t phys_addr;
+               uint16_t length;
+       } aad;
+
+       struct {
+               uint8_t *data;
+               phys_addr_t phys_addr;
+               uint16_t length;
+       } digest;
+
+       struct {
+               uint32_t auth_offset;
+               uint32_t auth_length;
+               uint32_t cipher_offset;
+               uint32_t cipher_length;
+       } data;
+};
+
+struct cperf_test_vector*
+cperf_test_vector_get_dummy(struct cperf_options *options);
+
+extern uint8_t ciphertext[2048];
+
+extern uint8_t cipher_key[];
+extern uint8_t auth_key[];
+
+extern uint8_t iv[];
+extern uint8_t aad[];
+
+extern uint8_t digest[2048];
+
 #endif
-int test_table_hash8unoptimized(void);
-int test_table_hash8lru(void);
-int test_table_hash8ext(void);
-int test_table_hash16unoptimized(void);
-int test_table_hash16lru(void);
-int test_table_hash16ext(void);
-int test_table_hash32unoptimized(void);
-int test_table_hash32lru(void);
-int test_table_hash32ext(void);
-int test_table_hash_cuckoo_combined(void);
-
-/* Extern variables */
-typedef int (*combined_table_test)(void);
-
-extern combined_table_test table_tests_combined[];
-extern unsigned n_table_tests_combined;