1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2020 Broadcom
6 #ifndef _BCMFS_SYM_REQ_H_
7 #define _BCMFS_SYM_REQ_H_
9 #include <rte_cryptodev.h>
11 #include "bcmfs_dev_msg.h"
12 #include "bcmfs_sym_defs.h"
14 /** Max variable length. Since we adjust AAD
15 * in same BD if it is less than BCMFS_AAD_THRESH_LEN
18 #define BCMFS_MAX_OMDMD_LEN ((2 * (BCMFS_MAX_KEY_SIZE)) + \
19 (2 * (BCMFS_MAX_IV_SIZE)) + \
20 (BCMFS_AAD_THRESH_LEN))
22 /* Fixed SPU2 Metadata */
31 * This structure hold the supportive data required to process a
34 struct bcmfs_sym_request {
36 * Only single BD for metadata so
37 * FMD + OMD must be in continuation
39 /* spu2 engine related data */
41 /* variable metadata in continuation with fmd */
42 uint8_t omd[BCMFS_MAX_OMDMD_LEN];
43 /* digest data output from crypto h/w */
44 uint8_t digest[BCMFS_MAX_DIGEST_SIZE];
45 /* 2-Bytes response from crypto h/w */
48 * Below are all iovas for above members
57 /* iova for response */
59 /* bcmfs qp message for h/w queues to process */
60 struct bcmfs_qp_message msgs;
62 struct rte_crypto_op *op;
65 #endif /* _BCMFS_SYM_REQ_H_ */