crypto: inside-secure - move request dequeueing into a workqueue
This patch moves the request dequeueing into a workqueue to improve the coalescing of interrupts when sending requests to the engine; as the engine is capable of having one single interrupt for n requests sent. Using a workqueue allows to send more request at once. Suggested-by: Ofer Heifetz <oferh@marvell.com> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:

committed by
Herbert Xu

parent
5290ad6e9a
commit
8472e77810
@@ -358,8 +358,8 @@ static int safexcel_handle_inv_result(struct safexcel_crypto_priv *priv,
|
||||
if (enq_ret != -EINPROGRESS)
|
||||
*ret = enq_ret;
|
||||
|
||||
if (!priv->ring[ring].need_dequeue)
|
||||
safexcel_dequeue(priv, ring);
|
||||
queue_work(priv->ring[ring].workqueue,
|
||||
&priv->ring[ring].work_data.work);
|
||||
|
||||
*should_complete = false;
|
||||
|
||||
@@ -448,8 +448,8 @@ static int safexcel_cipher_exit_inv(struct crypto_tfm *tfm)
|
||||
crypto_enqueue_request(&priv->ring[ring].queue, &req->base);
|
||||
spin_unlock_bh(&priv->ring[ring].queue_lock);
|
||||
|
||||
if (!priv->ring[ring].need_dequeue)
|
||||
safexcel_dequeue(priv, ring);
|
||||
queue_work(priv->ring[ring].workqueue,
|
||||
&priv->ring[ring].work_data.work);
|
||||
|
||||
wait_for_completion_interruptible(&result.completion);
|
||||
|
||||
@@ -495,8 +495,8 @@ static int safexcel_aes(struct skcipher_request *req,
|
||||
ret = crypto_enqueue_request(&priv->ring[ring].queue, &req->base);
|
||||
spin_unlock_bh(&priv->ring[ring].queue_lock);
|
||||
|
||||
if (!priv->ring[ring].need_dequeue)
|
||||
safexcel_dequeue(priv, ring);
|
||||
queue_work(priv->ring[ring].workqueue,
|
||||
&priv->ring[ring].work_data.work);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user