From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 4448E1BF94; Thu, 5 Jul 2018 12:53:54 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jul 2018 03:53:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,311,1526367600"; d="scan'208";a="238013218" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by orsmga005.jf.intel.com with ESMTP; 05 Jul 2018 03:53:53 -0700 Received: from irsmsx112.ger.corp.intel.com (10.108.20.5) by IRSMSX152.ger.corp.intel.com (163.33.192.66) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 5 Jul 2018 11:53:52 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.139]) by irsmsx112.ger.corp.intel.com ([169.254.1.22]) with mapi id 14.03.0319.002; Thu, 5 Jul 2018 11:53:52 +0100 From: "De Lara Guarch, Pablo" To: "Zhoujian (jay)" , "Zhang, Roy Fan" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH v2] crypto/virtio: fix iv physical address Thread-Index: AQHUDPQtd1/eWmsIl0SAreESvAJPNaR9aEAAgAMaWzA= Date: Thu, 5 Jul 2018 10:53:51 +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: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWI3ZTA3OTktMjk5Ni00MzVjLTllNWEtZWI2YzkzZjgxZjBiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZG9CSTk0dm0yZzFlaklVbDN0aUlDVFdwR0ZRUzZWZlNxbDAzRk9ZdmRsclRsSUhLZzQ1d2VXVm9Wd1pHcjRFVSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] crypto/virtio: fix iv physical address X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2018 10:53:56 -0000 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 ; dev@dpdk.org > Cc: De Lara Guarch, Pablo ; stable@dpdk.o= rg > Subject: Re: [dpdk-dev] [PATCH v2] crypto/virtio: fix iv physical address >=20 > > -----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", >=20 > Hi Fan, >=20 > As I mentioned in V1, do you agree to use "cipher IV length" or "cipher I= V 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. Thanks, Pablo >=20 > Apart from that, >=20 > Reviewed-by: