virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Gonglei (Arei)" <arei.gonglei@huawei.com>
Cc: "virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>,
	"Huangweidong (C)" <weidong.huang@huawei.com>,
	"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
	"Hanweidong (Randy)" <hanweidong@huawei.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Claudio Fontana <Claudio.Fontana@huawei.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Wanzongshun (Vincent)" <wanzongshun@huawei.com>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	"Xuquan (Quan Xu)" <xuquan8@huawei.com>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"stefanha@redhat.com" <stefanha@redhat.com>,
	"Zhoujian (jay, Euler)" <jianjay.zhou@huawei.com>,
	Luonengjun <luonengjun@huawei.com>,
	longpeng <longpeng2@huawei.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"Wubin (H)" <wu.wubin@huawei.com>
Subject: Re: [Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver
Date: Thu, 15 Dec 2016 18:42:31 +0200	[thread overview]
Message-ID: <20161215184153-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <33183CC9F5247A488A2544077AF19020DA16320F@DGGEMA505-MBX.china.huawei.com>

On Thu, Dec 15, 2016 at 01:08:51AM +0000, Gonglei (Arei) wrote:
> 
> 
> 
> 
> Regards,
> -Gonglei
> 
> 
> > -----Original Message-----
> > From: Zeng, Xin [mailto:xin.zeng@intel.com]
> > Sent: Thursday, December 15, 2016 8:59 AM
> > To: Gonglei (Arei); Halil Pasic; linux-kernel@vger.kernel.org;
> > qemu-devel@nongnu.org; virtio-dev@lists.oasis-open.org;
> > virtualization@lists.linux-foundation.org; linux-crypto@vger.kernel.org
> > Cc: Huangweidong (C); Claudio Fontana; mst@redhat.com; Luonengjun;
> > Hanweidong (Randy); Xuquan (Quan Xu); Wanzongshun (Vincent);
> > stefanha@redhat.com; Zhoujian (jay, Euler); cornelia.huck@de.ibm.com;
> > longpeng; arei.gonglei@hotmail.com; davem@davemloft.net; Wubin (H);
> > herbert@gondor.apana.org.au
> > Subject: RE: [Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver
> > 
> > On Thursday, December 15, 2016 8:45 AM, Gonglei (Arei) Wrote:
> > < > > diff --git a/drivers/crypto/virtio/virtio_crypto_core.c
> > < > b/drivers/crypto/virtio/virtio_crypto_core.c
> > < > > new file mode 100644
> > < > > index 0000000..c0854a1
> > < > > --- /dev/null
> > < > > +++ b/drivers/crypto/virtio/virtio_crypto_core.c
> > < > > @@ -0,0 +1,474 @@
> > < > [..]
> > < > > +
> > < > > +static void virtcrypto_dataq_callback(struct virtqueue *vq)
> > < > > +{
> > < > > +	struct virtio_crypto *vcrypto = vq->vdev->priv;
> > < > > +	struct virtio_crypto_request *vc_req;
> > < > > +	unsigned long flags;
> > < > > +	unsigned int len;
> > < > > +	struct ablkcipher_request *ablk_req;
> > < > > +	int error;
> > < > > +
> > < > > +	spin_lock_irqsave(&vcrypto->lock, flags);
> > < >
> > < > Would it make sense to use a per virtqueue lock
> > < > like in virtio_blk for example instead of locking on the whole
> > < > device? OK, it seems you use only one dataqueue, so it
> > < > may not be that relevant.
> > < >
> > < Currently yes, both the backend device (cryptodev-backend-builtin)
> > < and the frontend driver use one dataqueue.
> > <
> > 
> > I think it makes sense to use per virtqueue lock here though it only uses one
> > queue so far,
> > but in the spec we already have multi queues support.
> > 
> Yes, I agree. Will do that in V8 soon. 
> Hope to catch up with Michael's pull request for 4.10.
> 
> Regards,
> -Gonglei

I merged v7, this change will have to wait. Sorry.

  parent reply	other threads:[~2016-12-15 16:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1481716249-185392-1-git-send-email-arei.gonglei@huawei.com>
2016-12-14 11:50 ` [PATCH v7 1/1] crypto: add virtio-crypto driver Gonglei
2016-12-14 15:38   ` [Qemu-devel] " Halil Pasic
     [not found]   ` <bcf62fa0-8fc9-daaf-ea7b-e09eb83b593a@linux.vnet.ibm.com>
2016-12-15  0:45     ` Gonglei (Arei)
2016-12-15  0:59       ` Zeng, Xin
2016-12-15  1:08         ` Gonglei (Arei)
     [not found]         ` <33183CC9F5247A488A2544077AF19020DA16320F@DGGEMA505-MBX.china.huawei.com>
2016-12-15 16:42           ` Michael S. Tsirkin [this message]
2016-12-16  0:40             ` [virtio-dev] " Gonglei (Arei)

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=20161215184153-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=Claudio.Fontana@huawei.com \
    --cc=arei.gonglei@huawei.com \
    --cc=davem@davemloft.net \
    --cc=hanweidong@huawei.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jianjay.zhou@huawei.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longpeng2@huawei.com \
    --cc=luonengjun@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wanzongshun@huawei.com \
    --cc=weidong.huang@huawei.com \
    --cc=wu.wubin@huawei.com \
    --cc=xuquan8@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).