drivers/crypto/intel/qat/qat_common/qat_comp_req.h
Source file repositories/reference/linux-study-clean/drivers/crypto/intel/qat/qat_common/qat_comp_req.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/intel/qat/qat_common/qat_comp_req.h- Extension
.h- Size
- 3193 bytes
- Lines
- 123
- 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
icp_qat_fw_comp.h
Detected Declarations
function qat_comp_create_reqfunction qat_comp_create_compression_reqfunction qat_comp_create_decompression_reqfunction qat_comp_get_consumed_ctrfunction qat_comp_get_produced_ctrfunction qat_comp_get_produced_adler32function qat_comp_get_opaquefunction qat_comp_get_cmp_errfunction qat_comp_get_xlt_errfunction qat_comp_get_cmp_statusfunction qat_comp_get_xlt_statusfunction qat_comp_get_cmp_cnv_flagfunction qat_comp_get_cmp_uncomp_flag
Annotated Snippet
#ifndef _QAT_COMP_REQ_H_
#define _QAT_COMP_REQ_H_
#include "icp_qat_fw_comp.h"
#define QAT_COMP_REQ_SIZE (sizeof(struct icp_qat_fw_comp_req))
#define QAT_COMP_CTX_SIZE (QAT_COMP_REQ_SIZE * 2)
static inline void qat_comp_create_req(void *ctx, void *req, u64 src, u32 slen,
u64 dst, u32 dlen, u64 opaque)
{
struct icp_qat_fw_comp_req *fw_tmpl = ctx;
struct icp_qat_fw_comp_req *fw_req = req;
struct icp_qat_fw_comp_req_params *req_pars = &fw_req->comp_pars;
memcpy(fw_req, fw_tmpl, sizeof(*fw_req));
fw_req->comn_mid.src_data_addr = src;
fw_req->comn_mid.src_length = slen;
fw_req->comn_mid.dest_data_addr = dst;
fw_req->comn_mid.dst_length = dlen;
fw_req->comn_mid.opaque_data = opaque;
req_pars->comp_len = slen;
req_pars->out_buffer_sz = dlen;
fw_req->u3.asb_threshold.asb_value *= slen >> 4;
}
static inline void qat_comp_create_compression_req(void *ctx, void *req,
u64 src, u32 slen,
u64 dst, u32 dlen,
u64 opaque)
{
qat_comp_create_req(ctx, req, src, slen, dst, dlen, opaque);
}
static inline void qat_comp_create_decompression_req(void *ctx, void *req,
u64 src, u32 slen,
u64 dst, u32 dlen,
u64 opaque)
{
struct icp_qat_fw_comp_req *fw_tmpl = ctx;
fw_tmpl++;
qat_comp_create_req(fw_tmpl, req, src, slen, dst, dlen, opaque);
}
static inline u32 qat_comp_get_consumed_ctr(void *resp)
{
struct icp_qat_fw_comp_resp *qat_resp = resp;
return qat_resp->comp_resp_pars.input_byte_counter;
}
static inline u32 qat_comp_get_produced_ctr(void *resp)
{
struct icp_qat_fw_comp_resp *qat_resp = resp;
return qat_resp->comp_resp_pars.output_byte_counter;
}
static inline u32 qat_comp_get_produced_adler32(void *resp)
{
struct icp_qat_fw_comp_resp *qat_resp = resp;
return qat_resp->comp_resp_pars.crc.legacy.curr_adler_32;
}
static inline u64 qat_comp_get_opaque(void *resp)
{
struct icp_qat_fw_comp_resp *qat_resp = resp;
return qat_resp->opaque_data;
}
static inline s8 qat_comp_get_cmp_err(void *resp)
{
struct icp_qat_fw_comp_resp *qat_resp = resp;
return qat_resp->comn_resp.comn_error.cmp_err_code;
}
static inline s8 qat_comp_get_xlt_err(void *resp)
{
struct icp_qat_fw_comp_resp *qat_resp = resp;
return qat_resp->comn_resp.comn_error.xlat_err_code;
}
static inline s8 qat_comp_get_cmp_status(void *resp)
{
struct icp_qat_fw_comp_resp *qat_resp = resp;
Annotation
- Immediate include surface: `icp_qat_fw_comp.h`.
- Detected declarations: `function qat_comp_create_req`, `function qat_comp_create_compression_req`, `function qat_comp_create_decompression_req`, `function qat_comp_get_consumed_ctr`, `function qat_comp_get_produced_ctr`, `function qat_comp_get_produced_adler32`, `function qat_comp_get_opaque`, `function qat_comp_get_cmp_err`, `function qat_comp_get_xlt_err`, `function qat_comp_get_cmp_status`.
- 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.