From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id C98E74C93 for ; Fri, 30 Mar 2018 09:39:16 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Mar 2018 00:39:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,380,1517904000"; d="scan'208";a="187260513" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga004.jf.intel.com with ESMTP; 30 Mar 2018 00:39:13 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.155]) by IRSMSX154.ger.corp.intel.com ([169.254.12.249]) with mapi id 14.03.0319.002; Fri, 30 Mar 2018 08:39:12 +0100 From: "De Lara Guarch, Pablo" To: "Zhoujian (jay)" , "dev@dpdk.org" CC: "Zhang, Roy Fan" , "thomas@monjalon.net" , "Gonglei (Arei)" , "Zeng, Xin" , "Huangweidong (C)" , "wangxin (U)" , longpeng Thread-Topic: [PATCH v3 3/7] cryptodev/virtio: core code of crypto devices Thread-Index: AQHTxBRQEZygNuqw3k+ZTNUW106fB6PnzddggABAaoCAAF3hsA== Date: Fri, 30 Mar 2018 07:39:12 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2E3ZDUyOTQtMTYyNS00YTY1LTlhZTQtOWNkYWZiYWVkNWM4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkJNakk3UldrcHYyVzBzMFNoNThJUnhcL3hJUjBNYjdhTVM2alwvXC9ySThCa0E9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 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 v3 3/7] cryptodev/virtio: core code of crypto devices 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: Fri, 30 Mar 2018 07:39:18 -0000 > -----Original Message----- > From: Zhoujian (jay) [mailto:jianjay.zhou@huawei.com] > Sent: Friday, March 30, 2018 4:03 AM > To: De Lara Guarch, Pablo ; > dev@dpdk.org > Cc: Zhang, Roy Fan ; thomas@monjalon.net; > Gonglei (Arei) ; Zeng, Xin > ; Huangweidong (C) ; > wangxin (U) ; longpeng > > Subject: RE: [PATCH v3 3/7] cryptodev/virtio: core code of crypto devices >=20 >=20 >=20 > > -----Original Message----- > > From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] > > Sent: Friday, March 30, 2018 6:28 AM > > To: Zhoujian (jay) ; dev@dpdk.org > > Cc: Zhang, Roy Fan ; thomas@monjalon.net; > > Gonglei > > (Arei) ; Zeng, Xin ; > > Huangweidong (C) ; wangxin (U) > > ; longpeng > > Subject: RE: [PATCH v3 3/7] cryptodev/virtio: core code of crypto > > devices > > > > > > > > > -----Original Message----- > > > From: Jay Zhou [mailto:jianjay.zhou@huawei.com] > > > Sent: Sunday, March 25, 2018 9:34 AM > > > To: dev@dpdk.org > > > Cc: De Lara Guarch, Pablo ; Zhang, > > > Roy Fan ; thomas@monjalon.net; > > > arei.gonglei@huawei.com; Zeng, Xin ; > > > weidong.huang@huawei.com; wangxinxin.wang@huawei.com; > > > longpeng2@huawei.com; jianjay.zhou@huawei.com > > > Subject: [PATCH v3 3/7] cryptodev/virtio: core code of crypto > > > devices > > > > Use crypto/virtio: ... >=20 > Okay. >=20 > > > > > > > > > > The idea comes from QAT and virtio-net devices. > > > > Could you elaborate a bit more here? Which idea? > > Probably better to describe the patch and not compare with other > devices. >=20 > I'll describe the patch in more details, and it will help to review the c= ode I > think. >=20 > > > > > > > > Signed-off-by: Jay Zhou > > > --- > > > drivers/crypto/virtio/virtio_crypto_capabilities.h | 51 + > > > drivers/crypto/virtio/virtio_cryptodev.c | 1553 > > > ++++++++++++++++++++ > > > drivers/crypto/virtio/virtio_cryptodev.h | 66 + > > > drivers/crypto/virtio/virtio_rxtx.c | 540 +++++++ > > > 4 files changed, 2210 insertions(+) create mode 100644 > > > drivers/crypto/virtio/virtio_crypto_capabilities.h > > > create mode 100644 drivers/crypto/virtio/virtio_cryptodev.c > > > create mode 100644 drivers/crypto/virtio/virtio_cryptodev.h > > > create mode 100644 drivers/crypto/virtio/virtio_rxtx.c > > > > ... > > > > > index 0000000..8affbef > > > --- /dev/null > > > +++ b/drivers/crypto/virtio/virtio_cryptodev.c > > > > ... > > > > + > > > +static int virtio_crypto_sym_pad_cipher_param( > > > + struct virtio_crypto_cipher_session_para *para, > > > + struct rte_crypto_cipher_xform *cipher_xform) { > > > + switch (cipher_xform->algo) { > > > + case RTE_CRYPTO_CIPHER_NULL: > > > + para->algo =3D VIRTIO_CRYPTO_NO_CIPHER; > > > + break; > > > + case RTE_CRYPTO_CIPHER_3DES_CBC: > > > + para->algo =3D VIRTIO_CRYPTO_CIPHER_3DES_CBC; > > > + break; > > > > Do you support these algorithms? From capabilities, it looks like you > > only support AES-CBC and SHA1, but from the cover letter, you say that > > those are the ones that you have tested, which means that this PMD > > actually supports more? >=20 > Yes, this PMD actually supports more. But for now, it is limited by the > virtio-crypto vhost-crypto backend which only supports AES-CBC and SHA1, > so only AES-CBC and SHA1 can be tested, others are not guaranteed. > I think it's better to remove other cases and algorithms, we can add them > once the virtio-crypto vhost-user backend supports them. > What do you think? Sounds good. >=20 > > > > > > > + case RTE_CRYPTO_CIPHER_3DES_CTR: > > > + para->algo =3D VIRTIO_CRYPTO_CIPHER_3DES_CTR; > > > + break; > > > > ... > > > > > +RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_VIRTIO_PMD, > > > rte_virtio_crypto_driver); > > > +RTE_PMD_REGISTER_CRYPTO_DRIVER(virtio_crypto_drv, > > > rte_virtio_crypto_driver, > > > + cryptodev_virtio_driver_id); > > > > RTE_PMD_REGISTER_CRYPTO_DRIVER has changed. Could you rebase > against > > dpdk- next-crypto? > > You need to pass rte_virtio_crypto_driver.driver as a second parameter. > > >=20 > Will do. >=20 >=20 >=20 > Regards, > Jay