1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2020 Broadcom 3 * All rights reserved. 4 */ 5 6 #ifndef _BCMFS_SYM_DEFS_H_ 7 #define _BCMFS_SYM_DEFS_H_ 8 9 /* 10 * Max block size of hash algorithm 11 * currently SHA3 supports max block size 12 * of 144 bytes 13 */ 14 #define BCMFS_MAX_KEY_SIZE 144 15 #define BCMFS_MAX_IV_SIZE 16 16 #define BCMFS_MAX_DIGEST_SIZE 64 17 18 struct bcmfs_sym_session; 19 struct bcmfs_sym_request; 20 21 /** Crypto Request processing successful. */ 22 #define BCMFS_SYM_RESPONSE_SUCCESS (0) 23 /** Crypto Request processing protocol failure. */ 24 #define BCMFS_SYM_RESPONSE_PROTO_FAILURE (1) 25 /** Crypto Request processing completion failure. */ 26 #define BCMFS_SYM_RESPONSE_COMPL_ERROR (2) 27 /** Crypto Request processing hash tag check error. */ 28 #define BCMFS_SYM_RESPONSE_HASH_TAG_ERROR (3) 29 30 /** Maximum threshold length to adjust AAD in continuation 31 * with source BD of (FMD + OMD) 32 */ 33 #define BCMFS_AAD_THRESH_LEN 64 34 35 int 36 bcmfs_process_sym_crypto_op(struct rte_crypto_op *op, 37 struct bcmfs_sym_session *sess, 38 struct bcmfs_sym_request *req); 39 #endif /* _BCMFS_SYM_DEFS_H_ */ 40