15129044dSC.J. Collier/*-
25129044dSC.J. Collier *   BSD LICENSE
35129044dSC.J. Collier *
45129044dSC.J. Collier *   Copyright(c) 2015-2016 Intel Corporation. All rights reserved.
55129044dSC.J. Collier *
65129044dSC.J. Collier *   Redistribution and use in source and binary forms, with or without
75129044dSC.J. Collier *   modification, are permitted provided that the following conditions
85129044dSC.J. Collier *   are met:
95129044dSC.J. Collier *
105129044dSC.J. Collier *	 * Redistributions of source code must retain the above copyright
115129044dSC.J. Collier *	   notice, this list of conditions and the following disclaimer.
125129044dSC.J. Collier *	 * Redistributions in binary form must reproduce the above copyright
135129044dSC.J. Collier *	   notice, this list of conditions and the following disclaimer in
145129044dSC.J. Collier *	   the documentation and/or other materials provided with the
155129044dSC.J. Collier *	   distribution.
165129044dSC.J. Collier *	 * Neither the name of Intel Corporation nor the names of its
175129044dSC.J. Collier *	   contributors may be used to endorse or promote products derived
185129044dSC.J. Collier *	   from this software without specific prior written permission.
195129044dSC.J. Collier *
205129044dSC.J. Collier *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
215129044dSC.J. Collier *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
225129044dSC.J. Collier *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
235129044dSC.J. Collier *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
245129044dSC.J. Collier *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
255129044dSC.J. Collier *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
265129044dSC.J. Collier *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
275129044dSC.J. Collier *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
285129044dSC.J. Collier *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
295129044dSC.J. Collier *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
305129044dSC.J. Collier *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
315129044dSC.J. Collier */
325129044dSC.J. Collier#ifndef TEST_CRYPTODEV_H_
335129044dSC.J. Collier#define TEST_CRYPTODEV_H_
345129044dSC.J. Collier
355129044dSC.J. Collier#define HEX_DUMP 0
365129044dSC.J. Collier
375129044dSC.J. Collier#define FALSE                           0
385129044dSC.J. Collier#define TRUE                            1
395129044dSC.J. Collier
405129044dSC.J. Collier#define MAX_NUM_OPS_INFLIGHT            (4096)
415129044dSC.J. Collier#define MIN_NUM_OPS_INFLIGHT            (128)
425129044dSC.J. Collier#define DEFAULT_NUM_OPS_INFLIGHT        (128)
435129044dSC.J. Collier
445129044dSC.J. Collier#define MAX_NUM_QPS_PER_QAT_DEVICE      (2)
455129044dSC.J. Collier#define DEFAULT_NUM_QPS_PER_QAT_DEVICE  (2)
465129044dSC.J. Collier#define DEFAULT_BURST_SIZE              (64)
475129044dSC.J. Collier#define DEFAULT_NUM_XFORMS              (2)
485129044dSC.J. Collier#define NUM_MBUFS                       (8191)
49809f0800SChristian Ehrhardt#define MBUF_CACHE_SIZE                 (256)
505129044dSC.J. Collier#define MBUF_DATAPAYLOAD_SIZE		(2048 + DIGEST_BYTE_LENGTH_SHA512)
515129044dSC.J. Collier#define MBUF_SIZE			(sizeof(struct rte_mbuf) + \
525129044dSC.J. Collier		RTE_PKTMBUF_HEADROOM + MBUF_DATAPAYLOAD_SIZE)
535129044dSC.J. Collier
545129044dSC.J. Collier#define BYTE_LENGTH(x)				(x/8)
555129044dSC.J. Collier/* HASH DIGEST LENGTHS */
565129044dSC.J. Collier#define DIGEST_BYTE_LENGTH_MD5			(BYTE_LENGTH(128))
575129044dSC.J. Collier#define DIGEST_BYTE_LENGTH_SHA1			(BYTE_LENGTH(160))
585129044dSC.J. Collier#define DIGEST_BYTE_LENGTH_SHA224		(BYTE_LENGTH(224))
595129044dSC.J. Collier#define DIGEST_BYTE_LENGTH_SHA256		(BYTE_LENGTH(256))
605129044dSC.J. Collier#define DIGEST_BYTE_LENGTH_SHA384		(BYTE_LENGTH(384))
615129044dSC.J. Collier#define DIGEST_BYTE_LENGTH_SHA512		(BYTE_LENGTH(512))
625129044dSC.J. Collier#define DIGEST_BYTE_LENGTH_AES_XCBC		(BYTE_LENGTH(96))
635129044dSC.J. Collier#define DIGEST_BYTE_LENGTH_SNOW3G_UIA2		(BYTE_LENGTH(32))
64809f0800SChristian Ehrhardt#define DIGEST_BYTE_LENGTH_KASUMI_F9		(BYTE_LENGTH(32))
655129044dSC.J. Collier#define AES_XCBC_MAC_KEY_SZ			(16)
663d9b7210SChristian Ehrhardt#define DIGEST_BYTE_LENGTH_AES_GCM		(BYTE_LENGTH(128))
675129044dSC.J. Collier
685129044dSC.J. Collier#define TRUNCATED_DIGEST_BYTE_LENGTH_SHA1		(12)
69809f0800SChristian Ehrhardt#define TRUNCATED_DIGEST_BYTE_LENGTH_SHA224		(16)
705129044dSC.J. Collier#define TRUNCATED_DIGEST_BYTE_LENGTH_SHA256		(16)
71809f0800SChristian Ehrhardt#define TRUNCATED_DIGEST_BYTE_LENGTH_SHA384		(24)
725129044dSC.J. Collier#define TRUNCATED_DIGEST_BYTE_LENGTH_SHA512		(32)
735129044dSC.J. Collier
745129044dSC.J. Collier#endif /* TEST_CRYPTODEV_H_ */
75