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 CC9F75B12 for ; Fri, 30 Mar 2018 05:03:02 +0200 (CEST) Received: from DGGEMM401-HUB.china.huawei.com (unknown [172.30.72.54]) by Forcepoint Email with ESMTP id 2434DD6F6F31B; Fri, 30 Mar 2018 11:02:59 +0800 (CST) Received: from DGGEMM421-HUB.china.huawei.com (10.1.198.38) by DGGEMM401-HUB.china.huawei.com (10.3.20.209) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 30 Mar 2018 11:02:59 +0800 Received: from DGGEMM505-MBS.china.huawei.com ([169.254.2.114]) by dggemm421-hub.china.huawei.com ([10.1.198.38]) with mapi id 14.03.0361.001; Fri, 30 Mar 2018 11:02:51 +0800 From: "Zhoujian (jay)" To: "De Lara Guarch, Pablo" , "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: AQHTxBRJcUt67iQPZ0Gfni+OVBCqpKPnTD6AgADNZ1A= Date: Fri, 30 Mar 2018 03:02:51 +0000 Message-ID: References: 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-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 03:03:03 -0000 > -----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; Gongle= i > (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: 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 >=20 > Use crypto/virtio: ... Okay. >=20 >=20 > > > > The idea comes from QAT and virtio-net devices. >=20 > Could you elaborate a bit more here? Which idea? > Probably better to describe the patch and not compare with other devices. I'll describe the patch in more details, and it will help to review the cod= e 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 >=20 > ... >=20 > > index 0000000..8affbef > > --- /dev/null > > +++ b/drivers/crypto/virtio/virtio_cryptodev.c >=20 > ... >=20 > + > > +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; >=20 > Do you support these algorithms? From capabilities, it looks like you onl= y > support AES-CBC and SHA1, but from the cover letter, you say that those a= re > the ones that you have tested, which means that this PMD actually support= s > more? 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? >=20 >=20 > > + case RTE_CRYPTO_CIPHER_3DES_CTR: > > + para->algo =3D VIRTIO_CRYPTO_CIPHER_3DES_CTR; > > + break; >=20 > ... >=20 > > +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); >=20 > 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. Regards, Jay