drivers/crypto/cavium/nitrox/nitrox_req.h
Source file repositories/reference/linux-study-clean/drivers/crypto/cavium/nitrox/nitrox_req.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/cavium/nitrox/nitrox_req.h- Extension
.h- Size
- 16215 bytes
- Lines
- 729
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/dma-mapping.hcrypto/aes.hnitrox_dev.h
Detected Declarations
struct gphdrstruct se_crypto_requeststruct crypto_keysstruct auth_keysstruct flexi_crypto_contextstruct crypto_ctx_hdrstruct nitrox_crypto_ctxstruct nitrox_kcrypt_requeststruct nitrox_aead_rctxstruct nitrox_rfc4106_rctxstruct nps_pkt_instrstruct aqmq_command_sstruct ctx_hdrstruct nitrox_sgcompstruct nitrox_sgtablestruct resp_hdrstruct nitrox_softreqenum flexi_cipherenum flexi_authfunction flexi_aes_keylenfunction set_orh_valuefunction set_comp_valuefunction alloc_src_req_buffunction nitrox_creq_copy_ivfunction nitrox_creq_set_src_sgfunction alloc_dst_req_buffunction nitrox_creq_set_orhfunction nitrox_creq_set_compfunction nitrox_creq_set_dst_sg
Annotated Snippet
struct gphdr {
__be16 param0;
__be16 param1;
__be16 param2;
__be16 param3;
};
/**
* struct se_req_ctrl - SE request information.
* @arg: Minor number of the opcode
* @ctxc: Context control.
* @unca: Uncertainity enabled.
* @info: Additional information for SE cores.
* @ctxl: Context length in bytes.
* @uddl: User defined data length
*/
union se_req_ctrl {
u64 value;
struct {
u64 raz : 22;
u64 arg : 8;
u64 ctxc : 2;
u64 unca : 1;
u64 info : 3;
u64 unc : 8;
u64 ctxl : 12;
u64 uddl : 8;
} s;
};
#define MAX_IV_LEN 16
/**
* struct se_crypto_request - SE crypto request structure.
* @opcode: Request opcode (enc/dec)
* @flags: flags from crypto subsystem
* @ctx_handle: Crypto context handle.
* @gph: GP Header
* @ctrl: Request Information.
* @orh: ORH address
* @comp: completion address
* @src: Input sglist
* @dst: Output sglist
*/
struct se_crypto_request {
u8 opcode;
gfp_t gfp;
u32 flags;
u64 ctx_handle;
struct gphdr gph;
union se_req_ctrl ctrl;
u64 *orh;
u64 *comp;
struct scatterlist *src;
struct scatterlist *dst;
};
/* Crypto opcodes */
#define FLEXI_CRYPTO_ENCRYPT_HMAC 0x33
#define ENCRYPT 0
#define DECRYPT 1
/* IV from context */
#define IV_FROM_CTX 0
/* IV from Input data */
#define IV_FROM_DPTR 1
/**
* cipher opcodes for firmware
*/
enum flexi_cipher {
CIPHER_NULL = 0,
CIPHER_3DES_CBC,
CIPHER_3DES_ECB,
CIPHER_AES_CBC,
CIPHER_AES_ECB,
CIPHER_AES_CFB,
CIPHER_AES_CTR,
CIPHER_AES_GCM,
CIPHER_AES_XTS,
CIPHER_AES_CCM,
CIPHER_AES_CBC_CTS,
CIPHER_AES_ECB_CTS,
CIPHER_INVALID
};
enum flexi_auth {
AUTH_NULL = 0,
Annotation
- Immediate include surface: `linux/dma-mapping.h`, `crypto/aes.h`, `nitrox_dev.h`.
- Detected declarations: `struct gphdr`, `struct se_crypto_request`, `struct crypto_keys`, `struct auth_keys`, `struct flexi_crypto_context`, `struct crypto_ctx_hdr`, `struct nitrox_crypto_ctx`, `struct nitrox_kcrypt_request`, `struct nitrox_aead_rctx`, `struct nitrox_rfc4106_rctx`.
- Atlas domain: Driver Families / drivers/crypto.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.