1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2016 Cavium, Inc.
9 #include "request_manager.h"
11 #define MAX_DEVICES 16
12 #define MAJOR_OP_FC 0x33
13 #define MAX_ENC_KEY_SIZE 32
14 #define MAX_HASH_KEY_SIZE 64
15 #define MAX_KEY_SIZE (MAX_ENC_KEY_SIZE + MAX_HASH_KEY_SIZE)
16 #define CONTROL_WORD_LEN 8
17 #define KEY2_OFFSET 48
19 #define DMA_MODE_FLAG(dma_mode) \
20 (((dma_mode) == DMA_GATHER_SCATTER) ? (1 << 7) : 0)
47 #if defined(__BIG_ENDIAN_BITFIELD)
54 u64 auth_input_type
:1;
66 u64 auth_input_type
:1;
83 union encr_ctrl enc_ctrl
;
88 struct fchmac_context
{
90 u8 opad
[64]; /* or OPAD */
94 struct enc_context enc
;
95 struct fchmac_context hmac
;
100 u8 enc_key
[MAX_KEY_SIZE
];
105 struct cvm_des3_ctx
{
107 u8 des3_key
[MAX_KEY_SIZE
];
111 struct cpt_request_info cpt_req
;
113 struct fc_context fctx
;
116 int cptvf_do_request(void *cptvf
, struct cpt_request_info
*req
);
117 #endif /*_CPTVF_ALGS_H_*/