From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from huawei.com (szxga01-in.huawei.com [45.249.212.187]) by dpdk.org (Postfix) with ESMTP id 0BDF11BE6F; Fri, 6 Jul 2018 03:12:23 +0200 (CEST) Received: from DGGEMM404-HUB.china.huawei.com (unknown [172.30.72.54]) by Forcepoint Email with ESMTP id 88E7489583537; Fri, 6 Jul 2018 09:12:19 +0800 (CST) Received: from DGGEMM508-MBX.china.huawei.com ([169.254.2.165]) by DGGEMM404-HUB.china.huawei.com ([10.3.20.212]) with mapi id 14.03.0382.000; Fri, 6 Jul 2018 09:12:13 +0800 From: "Zhoujian (jay)" To: "De Lara Guarch, Pablo" , "Zhang, Roy Fan" , "dev@dpdk.org" CC: "stable@dpdk.org" , "wangxin (U)" Thread-Topic: [PATCH v2] crypto/virtio: fix iv physical address Thread-Index: AQHUDPQyRR8Vr8SiHEiKM9oF3+dZyqR9bqzQgAKOOoCAAXWI8A== Date: Fri, 6 Jul 2018 01:12:12 +0000 Message-ID: References: <20180614110257.10967-1-roy.fan.zhang@intel.com> <20180626021048.79280-1-roy.fan.zhang@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.177.19.14] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected Subject: Re: [dpdk-stable] [PATCH v2] crypto/virtio: fix iv physical address X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2018 01:12:23 -0000 > -----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) ; Zhang, Roy Fan > ; dev@dpdk.org > Cc: stable@dpdk.org > Subject: RE: [PATCH v2] crypto/virtio: fix iv physical address >=20 > Hi Jianjay, >=20 >=20 > > -----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 ; dev@dpdk.org > > Cc: De Lara Guarch, Pablo ; > > 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) > > > ; 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 > > > --- > > > > > > 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 =3D 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? >=20 > 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 >=20 > Thanks, > Pablo >=20 > > > > Apart from that, > > > > Reviewed-by: