linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "shenyang (M)" <shenyang39@huawei.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: <davem@davemloft.net>, <linux-crypto@vger.kernel.org>,
	<xuzaibo@huawei.com>, <wangzhou1@hisilicon.com>
Subject: Re: [PATCH v3 08/10] crypto: hisilicon/qm - fix the process of register algorithms to crypto
Date: Fri, 31 Jul 2020 16:15:41 +0800	[thread overview]
Message-ID: <79b37e17-8eb6-b89b-d49f-46a3faf2783a@huawei.com> (raw)
In-Reply-To: <20200731075722.GA20350@gondor.apana.org.au>



On 2020/7/31 15:57, Herbert Xu wrote:
> On Thu, Jul 23, 2020 at 03:19:38PM +0800, Yang Shen wrote:
>> When the devices are removed or not existing, the corresponding algorithms
>> which are registered by 'hisi-zip' driver can't be used.
>>
>> Move 'hisi_zip_register_to_crypto' from 'hisi_zip_init' to
>> 'hisi_zip_probe'. The algorithms will be registered to crypto only when
>> there is device bind on the driver. And when the devices are removed,
>> the algorithms will be unregistered.
>>
>> In the previous process, the function 'xxx_register_to_crypto' need a lock
>> and a static variable to judge if the registration is the first time.
>> Move this action into the function 'hisi_qm_alg_register'. Each device
>> will call 'hisi_qm_alg_register' to add itself to qm list in probe process
>> and registering algs when the qm list is empty.
>>
>> Signed-off-by: Yang Shen <shenyang39@huawei.com>
>> Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com>
>
> You still haven't resolved the issue of unregistering crypto
> algorithms that may be allocated.
>

Here if the user alloc a tfm of the algorithm the driver registers,
the function 'hisi_qm_wait_task_finish' which be added in patch 10 will
stop to remove the driver until the tfm is freed.

Thanks,

> Cheers,
>


  reply	other threads:[~2020-07-31  8:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23  7:19 [PATCH v3 00/10] crypto: hisilicon/qm - misc fixes Yang Shen
2020-07-23  7:19 ` [PATCH v3 01/10] crypto: hisilicon/qm - fix wrong release after using strsep Yang Shen
2020-07-23  7:19 ` [PATCH v3 02/10] crypto: hisilicon/qm - clear used reference count when start qp Yang Shen
2020-07-23  7:19 ` [PATCH v3 03/10] crypto: hisilicon/qm - fix print frequence in hisi_qp_send Yang Shen
2020-07-23  7:19 ` [PATCH v3 04/10] crypto: hisilicon/qm - fix judgement of queue is full Yang Shen
2020-07-23  7:19 ` [PATCH v3 05/10] crypto: hisilicon/qm - fix event queue depth to 2048 Yang Shen
2020-07-23  7:19 ` [PATCH v3 06/10] crypto: hisilicon/qm - fix no stop reason when use 'hisi_qm_stop' Yang Shen
2020-07-23  7:19 ` [PATCH v3 07/10] crypto: hisilicon/qm - fix VF not available after PF FLR Yang Shen
2020-07-23  7:19 ` [PATCH v3 08/10] crypto: hisilicon/qm - fix the process of register algorithms to crypto Yang Shen
2020-07-31  7:57   ` Herbert Xu
2020-07-31  8:15     ` shenyang (M) [this message]
2020-07-31  8:20       ` Herbert Xu
2020-07-31  8:44         ` shenyang (M)
2020-07-23  7:19 ` [PATCH v3 09/10] crypto: hisilicon/qm - register callback function to 'pci_driver.shutdown' Yang Shen
2020-07-23  7:19 ` [PATCH v3 10/10] crypto: hisilicon - fix the call trace when unbind device Yang Shen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=79b37e17-8eb6-b89b-d49f-46a3faf2783a@huawei.com \
    --to=shenyang39@huawei.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=wangzhou1@hisilicon.com \
    --cc=xuzaibo@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).