Commit 567be3a5 authored by Ayush Sawal's avatar Ayush Sawal Committed by Herbert Xu

crypto: chelsio - Use multiple txq/rxq per tfm to process the requests

This patch enables chcr to use multiple txq/rxq per tfm
to process the crypto requests. The txq/rxq are selected based
on  cpu core-id.
Signed-off-by: default avatarAyush Sawal <ayush.sawal@chelsio.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent bed44d0c
This diff is collapsed.
...@@ -148,7 +148,6 @@ struct chcr_dev { ...@@ -148,7 +148,6 @@ struct chcr_dev {
int wqretry; int wqretry;
struct delayed_work detach_work; struct delayed_work detach_work;
struct completion detach_comp; struct completion detach_comp;
unsigned char tx_channel_id;
}; };
struct uld_ctx { struct uld_ctx {
......
...@@ -187,6 +187,8 @@ struct chcr_aead_reqctx { ...@@ -187,6 +187,8 @@ struct chcr_aead_reqctx {
unsigned int op; unsigned int op;
u16 imm; u16 imm;
u16 verify; u16 verify;
u16 txqidx;
u16 rxqidx;
u8 iv[CHCR_MAX_CRYPTO_IV_LEN + MAX_SCRATCH_PAD_SIZE]; u8 iv[CHCR_MAX_CRYPTO_IV_LEN + MAX_SCRATCH_PAD_SIZE];
u8 *scratch_pad; u8 *scratch_pad;
}; };
...@@ -250,10 +252,10 @@ struct __crypto_ctx { ...@@ -250,10 +252,10 @@ struct __crypto_ctx {
struct chcr_context { struct chcr_context {
struct chcr_dev *dev; struct chcr_dev *dev;
unsigned char tx_qidx; unsigned char rxq_perchan;
unsigned char rx_qidx; unsigned char txq_perchan;
unsigned char tx_chan_id; unsigned int ntxq;
unsigned char pci_chan_id; unsigned int nrxq;
struct completion cbc_aes_aio_done; struct completion cbc_aes_aio_done;
struct __crypto_ctx crypto_ctx[0]; struct __crypto_ctx crypto_ctx[0];
}; };
...@@ -280,6 +282,8 @@ struct chcr_ahash_req_ctx { ...@@ -280,6 +282,8 @@ struct chcr_ahash_req_ctx {
u8 *skbfr; u8 *skbfr;
/* SKB which is being sent to the hardware for processing */ /* SKB which is being sent to the hardware for processing */
u64 data_len; /* Data len till time */ u64 data_len; /* Data len till time */
u16 txqidx;
u16 rxqidx;
u8 reqlen; u8 reqlen;
u8 partial_hash[CHCR_HASH_MAX_DIGEST_SIZE]; u8 partial_hash[CHCR_HASH_MAX_DIGEST_SIZE];
u8 bfr1[CHCR_HASH_MAX_BLOCK_SIZE_128]; u8 bfr1[CHCR_HASH_MAX_BLOCK_SIZE_128];
...@@ -298,6 +302,8 @@ struct chcr_skcipher_req_ctx { ...@@ -298,6 +302,8 @@ struct chcr_skcipher_req_ctx {
unsigned int op; unsigned int op;
u16 imm; u16 imm;
u8 iv[CHCR_MAX_CRYPTO_IV_LEN]; u8 iv[CHCR_MAX_CRYPTO_IV_LEN];
u16 txqidx;
u16 rxqidx;
}; };
struct chcr_alg_template { struct chcr_alg_template {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment