drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.h
Source file repositories/reference/linux-study-clean/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.h- Extension
.h- Size
- 3752 bytes
- Lines
- 184
- 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.hcrypto/skcipher.hcrypto/aead.hotx2_cpt_common.hcn10k_cpt.h
Detected Declarations
struct otx2_cpt_cipherstruct otx2_cpt_fc_enc_ctxstruct otx2_cpt_fc_ctxstruct otx2_cpt_enc_ctxstruct otx2_cpt_req_ctxstruct otx2_cpt_sdescstruct otx2_cpt_aead_ctxenum otx2_cpt_request_typeenum otx2_cpt_major_opcodesenum otx2_cpt_cipher_typeenum otx2_cpt_mac_typeenum otx2_cpt_aes_key_len
Annotated Snippet
struct otx2_cpt_cipher {
const char *name;
u8 value;
};
struct otx2_cpt_fc_enc_ctx {
union otx2_cpt_encr_ctrl enc_ctrl;
u8 encr_key[32];
u8 encr_iv[16];
};
union otx2_cpt_fc_hmac_ctx {
struct {
u8 ipad[64];
u8 opad[64];
} e;
struct {
u8 hmac_calc[64]; /* HMAC calculated */
u8 hmac_recv[64]; /* HMAC received */
} s;
};
struct otx2_cpt_fc_ctx {
struct otx2_cpt_fc_enc_ctx enc;
union otx2_cpt_fc_hmac_ctx hmac;
};
struct otx2_cpt_enc_ctx {
u32 key_len;
u8 enc_key[OTX2_CPT_MAX_KEY_SIZE];
u8 cipher_type;
u8 key_type;
u8 enc_align_len;
struct crypto_skcipher *fbk_cipher;
struct pci_dev *pdev;
struct cn10k_cpt_errata_ctx er_ctx;
};
union otx2_cpt_offset_ctrl {
u64 flags;
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 otx2_cpt_req_ctx {
struct otx2_cpt_req_info cpt_req;
union otx2_cpt_offset_ctrl ctrl_word;
struct otx2_cpt_fc_ctx fctx;
union {
struct skcipher_request sk_fbk_req;
struct aead_request fbk_req;
};
};
struct otx2_cpt_sdesc {
struct shash_desc shash;
};
struct otx2_cpt_aead_ctx {
u8 key[OTX2_CPT_MAX_KEY_SIZE];
struct crypto_shash *hashalg;
struct otx2_cpt_sdesc *sdesc;
struct crypto_aead *fbk_cipher;
struct cn10k_cpt_errata_ctx er_ctx;
struct pci_dev *pdev;
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;
u8 enc_align_len;
};
int otx2_cpt_crypto_init(struct pci_dev *pdev, struct module *mod,
int num_queues, int num_devices);
void otx2_cpt_crypto_exit(struct pci_dev *pdev, struct module *mod);
Annotation
- Immediate include surface: `crypto/hash.h`, `crypto/skcipher.h`, `crypto/aead.h`, `otx2_cpt_common.h`, `cn10k_cpt.h`.
- Detected declarations: `struct otx2_cpt_cipher`, `struct otx2_cpt_fc_enc_ctx`, `struct otx2_cpt_fc_ctx`, `struct otx2_cpt_enc_ctx`, `struct otx2_cpt_req_ctx`, `struct otx2_cpt_sdesc`, `struct otx2_cpt_aead_ctx`, `enum otx2_cpt_request_type`, `enum otx2_cpt_major_opcodes`, `enum otx2_cpt_cipher_type`.
- 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.