DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhoujian (jay)" <jianjay.zhou@huawei.com>
To: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
	"Zhang, Roy Fan" <roy.fan.zhang@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	"wangxin (U)" <wangxinxin.wang@huawei.com>
Subject: Re: [dpdk-dev] [PATCH v2] crypto/virtio: fix iv physical address
Date: Fri, 6 Jul 2018 01:12:12 +0000	[thread overview]
Message-ID: <B2D15215269B544CADD246097EACE7473B6E041F@dggemm508-mbx.china.huawei.com> (raw)
In-Reply-To: <E115CCD9D858EF4F90C690B0DCB4D8977F8E5703@IRSMSX108.ger.corp.intel.com>



> -----Original Message-----
> From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com]
> Sent: Thursday, July 05, 2018 6:54 PM
> To: Zhoujian (jay) <jianjay.zhou@huawei.com>; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: RE: [PATCH v2] crypto/virtio: fix iv physical address
> 
> Hi Jianjay,
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhoujian (jay)
> > Sent: Tuesday, July 3, 2018 1:29 PM
> > To: Zhang, Roy Fan <roy.fan.zhang@intel.com>; dev@dpdk.org
> > Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>;
> > stable@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v2] crypto/virtio: fix iv physical
> > address
> >
> > > -----Original Message-----
> > > From: Fan Zhang [mailto:roy.fan.zhang@intel.com]
> > > Sent: Tuesday, June 26, 2018 10:11 AM
> > > To: dev@dpdk.org
> > > Cc: pablo.de.lara.guarch@intel.com; Zhoujian (jay)
> > > <jianjay.zhou@huawei.com>; stable@dpdk.org
> > > Subject: [PATCH v2] crypto/virtio: fix iv physical address
> > >
> > > The physical address of IV required by Virtio was computed using
> > > crypto operations' physical address plus the offset. However not all
> > > crypto ops will have physical address field initialized and compute
> > > it runtimely
> > is costly.
> > > This patch fixes this problem by adding iv field in
> > > virtio_crypto_op_cookie and does a memcpy of iv instead.
> > >
> > > Fixes: 82adb12a1fce ("crypto/virtio: support burst enqueue/dequeue")
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> > > ---
> > >
> > > v2:
> > > - change max iv size to 16
> > > - use branch to avoid unnecessary memcpy
> > >
> > >  drivers/crypto/virtio/virtio_cryptodev.c |  6 ++++++
> > > drivers/crypto/virtio/virtio_cryptodev.h |  3 +++
> > >  drivers/crypto/virtio/virtio_rxtx.c      | 14 +++++++++++++-
> > >  3 files changed, 22 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/crypto/virtio/virtio_cryptodev.c
> > > b/drivers/crypto/virtio/virtio_cryptodev.c
> > > index df88953f6..6ffa7619c 100644
> > > --- a/drivers/crypto/virtio/virtio_cryptodev.c
> > > +++ b/drivers/crypto/virtio/virtio_cryptodev.c
> > > @@ -1223,6 +1223,12 @@ virtio_crypto_sym_pad_op_ctrl_req(
> > >  	/* Get cipher xform from crypto xform chain */
> > >  	cipher_xform = virtio_crypto_get_cipher_xform(xform);
> > >  	if (cipher_xform) {
> > > +		if (cipher_xform->iv.length > VIRTIO_CRYPTO_MAX_IV_SIZE) {
> > > +			VIRTIO_CRYPTO_SESSION_LOG_ERR(
> > > +				"cipher IV cannot longer than %u",
> >
> > Hi Fan,
> >
> > As I mentioned in V1, do you agree to use "cipher IV length" or "cipher IV
> size"
> > instead of "cipher IV" here?
> 
> Fan is out of office this week. Since this is a minor change, I can apply it
> and make that change on the fly.

Hi Pablo,
Thanks for doing this, :)

Regards,
Jay

> 
> Thanks,
> Pablo
> 
> >
> > Apart from that,
> >
> > Reviewed-by: <jianjay.zhou@huawei.com>

      reply	other threads:[~2018-07-06  1:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-14 11:02 [dpdk-dev] [PATCH] " Fan Zhang
2018-06-14 12:38 ` Akhil Goyal
2018-06-15  4:45   ` Zhoujian (jay)
2018-06-15  4:41 ` Zhoujian (jay)
2018-06-26  2:10 ` [dpdk-dev] [PATCH v2] " Fan Zhang
2018-07-03 12:29   ` Zhoujian (jay)
2018-07-05 10:53     ` De Lara Guarch, Pablo
2018-07-06  1:12       ` Zhoujian (jay) [this message]

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=B2D15215269B544CADD246097EACE7473B6E041F@dggemm508-mbx.china.huawei.com \
    --to=jianjay.zhou@huawei.com \
    --cc=dev@dpdk.org \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=roy.fan.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=wangxinxin.wang@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).