sec_req
static int sec_send_request(struct sec_request *sec_req, struct sec_queue *queue)
mutex_lock(&sec_req->lock);
list_for_each_entry_safe(el, temp, &sec_req->elements, head) {
ret = sec_queue_send(queue, &el->req, sec_req);
mutex_unlock(&sec_req->lock);
struct sec_request *sec_req = skcipher_request_ctx(skreq);
struct sec_alg_tfm_ctx *ctx = sec_req->tfm_ctx;
sec_req_el = list_first_entry(&sec_req->elements, struct sec_request_el,
sec_req->err = -EINVAL;
nextrequest->sec_req);
mutex_lock(&sec_req->lock);
mutex_unlock(&sec_req->lock);
mutex_lock(&sec_req->lock);
done = list_empty(&sec_req->elements);
mutex_unlock(&sec_req->lock);
dma_unmap_single(dev, sec_req->dma_iv,
dma_unmap_sg(dev, skreq->src, sec_req->len_in,
dma_unmap_sg(dev, skreq->dst, sec_req->len_out,
skcipher_request_complete(skreq, sec_req->err);
struct sec_request *sec_req = shadow;
sec_req->cb(resp, sec_req->req_base);
struct sec_request *sec_req = skcipher_request_ctx(skreq);
mutex_init(&sec_req->lock);
sec_req->req_base = &skreq->base;
sec_req->err = 0;
sec_req->len_in = sg_nents(skreq->src);
sec_req->num_elements = steps;
&splits_in_nents, sec_req->len_in,
sec_req->len_out = sg_nents(skreq->dst);
sec_req->len_out, info->dev, gfp);
sec_req->tfm_ctx = ctx;
sec_req->cb = sec_skcipher_alg_callback;
INIT_LIST_HEAD(&sec_req->elements);
sec_req->dma_iv = dma_map_single(info->dev, skreq->iv,
if (dma_mapping_error(info->dev, sec_req->dma_iv)) {
el->req.cipher_iv_addr_lo = lower_32_bits(sec_req->dma_iv);
el->req.cipher_iv_addr_hi = upper_32_bits(sec_req->dma_iv);
el->sec_req = sec_req;
list_add_tail(&el->head, &sec_req->elements);
list_add_tail(&sec_req->backlog_head, &ctx->backlog);
ret = sec_send_request(sec_req, queue);
list_for_each_entry_safe(el, temp, &sec_req->elements, head) {
dma_unmap_single(info->dev, sec_req->dma_iv,
splits_out_nents, sec_req->len_out,
sec_req->len_in, info->dev);
struct sec_request *sec_req;
int (*buf_map)(struct sec_ctx *ctx, struct sec_req *req);
void (*buf_unmap)(struct sec_ctx *ctx, struct sec_req *req);
void (*do_transfer)(struct sec_ctx *ctx, struct sec_req *req);
int (*bd_fill)(struct sec_ctx *ctx, struct sec_req *req);
int (*bd_send)(struct sec_ctx *ctx, struct sec_req *req);
void (*callback)(struct sec_ctx *ctx, struct sec_req *req, int err);
int (*process)(struct sec_ctx *ctx, struct sec_req *req);
struct sec_req **req_list;
static void sec_cipher_pbuf_unmap(struct sec_ctx *ctx, struct sec_req *req,
static int sec_cipher_map_sgl(struct device *dev, struct sec_req *req,
static int sec_cipher_map_inner(struct sec_ctx *ctx, struct sec_req *req,
static int sec_cipher_map(struct sec_ctx *ctx, struct sec_req *req,
static int sec_alloc_req_id(struct sec_req *req, struct sec_qp_ctx *qp_ctx)
static void sec_cipher_unmap(struct sec_ctx *ctx, struct sec_req *req,
static int sec_skcipher_sgl_map(struct sec_ctx *ctx, struct sec_req *req)
static void sec_skcipher_sgl_unmap(struct sec_ctx *ctx, struct sec_req *req)
static void sec_free_req_id(struct sec_req *req)
static int sec_aead_sgl_map(struct sec_ctx *ctx, struct sec_req *req)
static void sec_aead_sgl_unmap(struct sec_ctx *ctx, struct sec_req *req)
static int sec_request_transfer(struct sec_ctx *ctx, struct sec_req *req)
static void sec_request_untransfer(struct sec_ctx *ctx, struct sec_req *req)
static void sec_skcipher_copy_iv(struct sec_ctx *ctx, struct sec_req *req)
static int sec_skcipher_bd_fill(struct sec_ctx *ctx, struct sec_req *req)
static int sec_skcipher_bd_fill_v3(struct sec_ctx *ctx, struct sec_req *req)
static void sec_update_iv(struct sec_req *req, enum sec_alg_type alg_type)
static void sec_skcipher_callback(struct sec_ctx *ctx, struct sec_req *req,
static void set_aead_auth_iv(struct sec_ctx *ctx, struct sec_req *req)
static void sec_aead_set_iv(struct sec_ctx *ctx, struct sec_req *req)
static int sec_cb_status_check(struct sec_req *req,
struct sec_req *req, struct sec_sqe *sec_sqe)
struct sec_req *req, struct sec_sqe3 *sqe3)
struct sec_req *req, struct sec_sqe *sec_sqe)
static int sec_aead_bd_fill(struct sec_ctx *ctx, struct sec_req *req)
struct sec_req *req, struct sec_sqe3 *sqe3)
static int sec_aead_bd_fill_v3(struct sec_ctx *ctx, struct sec_req *req)
static void sec_aead_callback(struct sec_ctx *c, struct sec_req *req, int err)
static void sec_request_uninit(struct sec_req *req)
static int sec_request_init(struct sec_ctx *ctx, struct sec_req *req)
static int sec_process(struct sec_ctx *ctx, struct sec_req *req)
static int qp_send_message(struct sec_req *req)
crypto_aead_set_reqsize_dma(tfm, sizeof(struct sec_req));
static int sec_skcipher_cryptlen_check(struct sec_ctx *ctx, struct sec_req *sreq)
struct sec_req *sreq, bool *need_fallback)
struct sec_req *req = skcipher_request_ctx_dma(sk_req);
struct sec_req *req, *tmp;
static int sec_aead_spec_check(struct sec_ctx *ctx, struct sec_req *sreq)
static int sec_aead_param_check(struct sec_ctx *ctx, struct sec_req *sreq, bool *need_fallback)
struct sec_req *req = aead_request_ctx_dma(a_req);
struct sec_req *req, *tmp;
struct sec_req *req = container_of(sqe, struct sec_req, sec_sqe);
struct sec_req *req;
static int sec_alg_send_message_retry(struct sec_req *req)
static int sec_alg_try_enqueue(struct sec_req *req)
static int sec_alg_send_message_maybacklog(struct sec_req *req)
static int sec_bd_send(struct sec_ctx *ctx, struct sec_req *req)
qp_ctx->req_list = kzalloc_objs(struct sec_req *, q_depth);
crypto_skcipher_set_reqsize_dma(tfm, sizeof(struct sec_req));
static int sec_cipher_pbuf_map(struct sec_ctx *ctx, struct sec_req *req,