Lines Matching refs:ctx
98 static inline struct chcr_aead_ctx *AEAD_CTX(struct chcr_context *ctx)
100 return ctx->crypto_ctx->aeadctx;
103 static inline struct ablk_ctx *ABLK_CTX(struct chcr_context *ctx)
105 return ctx->crypto_ctx->ablkctx;
108 static inline struct hmac_ctx *HMAC_CTX(struct chcr_context *ctx)
110 return ctx->crypto_ctx->hmacctx;
115 return gctx->ctx->gcm;
120 return gctx->ctx->authenc;
123 static inline struct uld_ctx *ULD_CTX(struct chcr_context *ctx)
125 return container_of(ctx->dev, struct uld_ctx, dev);
759 static inline void create_wreq(struct chcr_context *ctx,
768 struct uld_ctx *u_ctx = ULD_CTX(ctx);
776 portno = rxqidx / ctx->rxq_perchan;
777 tx_channel_id = txqidx / ctx->txq_perchan;
801 * @ctx: crypto driver context of the request.
808 struct chcr_context *ctx = c_ctx(tfm);
809 struct uld_ctx *u_ctx = ULD_CTX(ctx);
810 struct ablk_ctx *ablkctx = ABLK_CTX(ctx);
823 struct adapter *adap = padap(ctx->dev);
824 unsigned int rx_channel_id = reqctx->rxqidx / ctx->rxq_perchan;
1172 struct chcr_context *ctx = c_ctx(tfm);
1173 struct adapter *adap = padap(ctx->dev);
1233 complete(&ctx->cbc_aes_aio_done);
1242 complete(&ctx->cbc_aes_aio_done);
1377 struct chcr_context *ctx = c_ctx(tfm);
1381 reqctx->txqidx = cpu % ctx->ntxq;
1382 reqctx->rxqidx = cpu % ctx->nrxq;
1406 wait_for_completion(&ctx->cbc_aes_aio_done);
1422 struct chcr_context *ctx = c_ctx(tfm);
1426 reqctx->txqidx = cpu % ctx->ntxq;
1427 reqctx->rxqidx = cpu % ctx->nrxq;
1447 static int chcr_device_init(struct chcr_context *ctx)
1453 if (!ctx->dev) {
1460 ctx->dev = &u_ctx->dev;
1464 ctx->ntxq = ntxq;
1465 ctx->nrxq = u_ctx->lldi.nrxq;
1466 ctx->rxq_perchan = rxq_perchan;
1467 ctx->txq_perchan = txq_perchan;
1476 struct chcr_context *ctx = crypto_skcipher_ctx(tfm);
1477 struct ablk_ctx *ablkctx = ABLK_CTX(ctx);
1485 init_completion(&ctx->cbc_aes_aio_done);
1489 return chcr_device_init(ctx);
1495 struct chcr_context *ctx = crypto_skcipher_ctx(tfm);
1496 struct ablk_ctx *ablkctx = ABLK_CTX(ctx);
1509 return chcr_device_init(ctx);
1515 struct chcr_context *ctx = crypto_skcipher_ctx(tfm);
1516 struct ablk_ctx *ablkctx = ABLK_CTX(ctx);
1571 struct chcr_context *ctx = h_ctx(tfm);
1572 struct hmac_ctx *hmacctx = HMAC_CTX(ctx);
1574 struct uld_ctx *u_ctx = ULD_CTX(ctx);
1583 unsigned int rx_channel_id = req_ctx->rxqidx / ctx->rxq_perchan;
1667 struct chcr_context *ctx = h_ctx(rtfm);
1677 req_ctx->txqidx = cpu % ctx->ntxq;
1678 req_ctx->rxqidx = cpu % ctx->nrxq;
1772 struct chcr_context *ctx = h_ctx(rtfm);
1778 req_ctx->txqidx = cpu % ctx->ntxq;
1779 req_ctx->rxqidx = cpu % ctx->nrxq;
1840 struct chcr_context *ctx = h_ctx(rtfm);
1848 req_ctx->txqidx = cpu % ctx->ntxq;
1849 req_ctx->rxqidx = cpu % ctx->nrxq;
1935 struct chcr_context *ctx = h_ctx(rtfm);
1943 req_ctx->txqidx = cpu % ctx->ntxq;
1944 req_ctx->rxqidx = cpu % ctx->nrxq;
2028 struct chcr_context *ctx = h_ctx(rtfm);
2029 struct uld_ctx *u_ctx = ULD_CTX(ctx);
2037 reqctx->txqidx = cpu % ctx->ntxq;
2038 reqctx->rxqidx = cpu % ctx->nrxq;
2152 struct chcr_context *ctx = crypto_tfm_ctx(tfm);
2153 struct adapter *adap = padap(ctx->dev);
2345 struct chcr_context *ctx = crypto_tfm_ctx(tfm);
2346 struct hmac_ctx *hmacctx = HMAC_CTX(ctx);
2360 struct chcr_context *ctx = crypto_tfm_ctx(tfm);
2361 struct hmac_ctx *hmacctx = HMAC_CTX(ctx);
2443 struct chcr_context *ctx = a_ctx(tfm);
2444 struct uld_ctx *u_ctx = ULD_CTX(ctx);
2445 struct chcr_aead_ctx *aeadctx = AEAD_CTX(ctx);
2461 struct adapter *adap = padap(ctx->dev);
2462 unsigned int rx_channel_id = reqctx->rxqidx / ctx->rxq_perchan;
2717 struct chcr_context *ctx = a_ctx(tfm);
2718 struct uld_ctx *u_ctx = ULD_CTX(ctx);
2720 unsigned int rx_channel_id = reqctx->rxqidx / ctx->rxq_perchan;
2761 struct chcr_context *ctx = c_ctx(tfm);
2762 struct uld_ctx *u_ctx = ULD_CTX(ctx);
2764 unsigned int rx_channel_id = reqctx->rxqidx / ctx->rxq_perchan;
2969 struct chcr_context *ctx = a_ctx(tfm);
2970 struct uld_ctx *u_ctx = ULD_CTX(ctx);
2971 struct chcr_aead_ctx *aeadctx = AEAD_CTX(ctx);
2975 unsigned int rx_channel_id = reqctx->rxqidx / ctx->rxq_perchan;
3141 struct chcr_context *ctx = a_ctx(tfm);
3142 struct uld_ctx *u_ctx = ULD_CTX(ctx);
3143 struct chcr_aead_ctx *aeadctx = AEAD_CTX(ctx);
3156 struct adapter *adap = padap(ctx->dev);
3157 unsigned int rx_channel_id = reqctx->rxqidx / ctx->rxq_perchan;
3745 struct chcr_context *ctx = a_ctx(tfm);
3746 struct uld_ctx *u_ctx = ULD_CTX(ctx);
3795 struct chcr_context *ctx = a_ctx(tfm);
3799 reqctx->txqidx = cpu % ctx->ntxq;
3800 reqctx->rxqidx = cpu % ctx->nrxq;
3823 struct chcr_context *ctx = a_ctx(tfm);
3824 struct chcr_aead_ctx *aeadctx = AEAD_CTX(ctx);
3830 reqctx->txqidx = cpu % ctx->ntxq;
3831 reqctx->rxqidx = cpu % ctx->nrxq;