drivers/crypto/marvell/octeontx/otx_cptvf_algs.h
Source file repositories/reference/linux-study-clean/drivers/crypto/marvell/octeontx/otx_cptvf_algs.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/marvell/octeontx/otx_cptvf_algs.h- Extension
.h- Size
- 3825 bytes
- Lines
- 190
- Domain
- Driver Families
- Bucket
- drivers/crypto
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
crypto/hash.hotx_cpt_common.h
Detected Declarations
struct otx_cpt_cipherstruct otx_cpt_enc_contextstruct otx_cpt_fc_ctxstruct otx_cpt_enc_ctxstruct otx_cpt_des3_ctxstruct otx_cpt_req_ctxstruct otx_cpt_sdescstruct otx_cpt_aead_ctxenum otx_cpt_request_typeenum otx_cpt_major_opcodesenum otx_cpt_req_typeenum otx_cpt_cipher_typeenum otx_cpt_mac_typeenum otx_cpt_aes_key_len
Annotated Snippet
struct otx_cpt_cipher {
const char *name;
u8 value;
};
struct otx_cpt_enc_context {
union otx_cpt_encr_ctrl enc_ctrl;
u8 encr_key[32];
u8 encr_iv[16];
};
union otx_cpt_fchmac_ctx {
struct {
u8 ipad[64];
u8 opad[64];
} e;
struct {
u8 hmac_calc[64]; /* HMAC calculated */
u8 hmac_recv[64]; /* HMAC received */
} s;
};
struct otx_cpt_fc_ctx {
struct otx_cpt_enc_context enc;
union otx_cpt_fchmac_ctx hmac;
};
struct otx_cpt_enc_ctx {
u32 key_len;
u8 enc_key[OTX_CPT_MAX_KEY_SIZE];
u8 cipher_type;
u8 key_type;
};
struct otx_cpt_des3_ctx {
u32 key_len;
u8 des3_key[OTX_CPT_MAX_KEY_SIZE];
};
union otx_cpt_offset_ctrl_word {
__be64 flags;
u64 cflags;
struct {
#if defined(__BIG_ENDIAN_BITFIELD)
u64 reserved:32;
u64 enc_data_offset:16;
u64 iv_offset:8;
u64 auth_offset:8;
#else
u64 auth_offset:8;
u64 iv_offset:8;
u64 enc_data_offset:16;
u64 reserved:32;
#endif
} e;
};
struct otx_cpt_req_ctx {
struct otx_cpt_req_info cpt_req;
union otx_cpt_offset_ctrl_word ctrl_word;
struct otx_cpt_fc_ctx fctx;
};
struct otx_cpt_sdesc {
struct shash_desc shash;
};
struct otx_cpt_aead_ctx {
u8 key[OTX_CPT_MAX_KEY_SIZE];
struct crypto_shash *hashalg;
struct otx_cpt_sdesc *sdesc;
u8 *ipad;
u8 *opad;
u32 enc_key_len;
u32 auth_key_len;
u8 cipher_type;
u8 mac_type;
u8 key_type;
u8 is_trunc_hmac;
};
int otx_cpt_crypto_init(struct pci_dev *pdev, struct module *mod,
enum otx_cptpf_type pf_type,
enum otx_cptvf_type engine_type,
int num_queues, int num_devices);
void otx_cpt_crypto_exit(struct pci_dev *pdev, struct module *mod,
enum otx_cptvf_type engine_type);
#endif /* __OTX_CPT_ALGS_H */
Annotation
- Immediate include surface: `crypto/hash.h`, `otx_cpt_common.h`.
- Detected declarations: `struct otx_cpt_cipher`, `struct otx_cpt_enc_context`, `struct otx_cpt_fc_ctx`, `struct otx_cpt_enc_ctx`, `struct otx_cpt_des3_ctx`, `struct otx_cpt_req_ctx`, `struct otx_cpt_sdesc`, `struct otx_cpt_aead_ctx`, `enum otx_cpt_request_type`, `enum otx_cpt_major_opcodes`.
- Atlas domain: Driver Families / drivers/crypto.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.