From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 797C925E5 for ; Wed, 29 Nov 2017 11:14:23 +0100 (CET) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Nov 2017 02:14:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,472,1505804400"; d="scan'208";a="181499486" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by fmsmga005.fm.intel.com with ESMTP; 29 Nov 2017 02:14:20 -0800 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.22]) by irsmsx105.ger.corp.intel.com ([163.33.3.28]) with mapi id 14.03.0319.002; Wed, 29 Nov 2017 10:14:20 +0000 From: "Zhang, Roy Fan" To: Jay Zhou , "dev@dpdk.org" CC: "yliu@fridaylinux.org" , "maxime.coquelin@redhat.com" , "arei.gonglei@huawei.com" , "Zeng, Xin" , "weidong.huang@huawei.com" , "wangxinxin.wang@huawei.com" , "longpeng2@huawei.com" Thread-Topic: [PATCH] virtio: add new driver for crypto devices Thread-Index: AQHTX8dFV/HgsE430UOJJXSBBIVIC6Mobg7AgACibQCAAiVAUA== Date: Wed, 29 Nov 2017 10:14:19 +0000 Message-ID: <9F7182E3F746AB4EA17801C148F3C6043305B8AA@IRSMSX101.ger.corp.intel.com> References: <1510938620-15268-1-git-send-email-jianjay.zhou@huawei.com> <9F7182E3F746AB4EA17801C148F3C6043305A340@IRSMSX101.ger.corp.intel.com> <5A1CBB72.4050104@huawei.com> In-Reply-To: <5A1CBB72.4050104@huawei.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWEyN2Y3MzUtNjM5Ni00MDRmLTg4MTktZmZlZWFmODFmN2UzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IndmdGVFdSs3TEQ0cFNic3VWT1ByT1VOMk1iVXhYQ3lCTkoyeGNtVUNqQ1k9In0= dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] virtio: add new driver for 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: Wed, 29 Nov 2017 10:14:24 -0000 Hi Jay, No worries. Welcome to DPDK :-D Regards, Fan > -----Original Message----- > From: Jay Zhou [mailto:jianjay.zhou@huawei.com] > Sent: Tuesday, November 28, 2017 1:27 AM > To: Zhang, Roy Fan ; dev@dpdk.org > Cc: yliu@fridaylinux.org; maxime.coquelin@redhat.com; > arei.gonglei@huawei.com; Zeng, Xin ; > weidong.huang@huawei.com; wangxinxin.wang@huawei.com; > longpeng2@huawei.com > Subject: Re: [PATCH] virtio: add new driver for crypto devices >=20 > Hi Fan, >=20 > On 2017/11/28 0:47, Zhang, Roy Fan wrote: > > Hi Jay, > > > > Thanks for contributing to DPDK. > > > > The code has been tested and works fine. > > > > A few comments: > > > > 1. Could you split the patch into a patchset, as suggested in contribut= ion > guide in http://dpdk.org/doc/guides/contributing/patches.html, section 5.= 4? > > 2. Please update doc/guides/cryptodevs for describing your virtio crypt= o > PMD. > > 3. Please update doc/guides/rel_notes/release_18.02. > > 4. One more comment inline > > >=20 > For DPDK, I'm a newbie. Thanks for testing and pointing these steps out, = will > fix them in V2. >=20 > > > >> -----Original Message----- > >> From: Jay Zhou [mailto:jianjay.zhou@huawei.com] > >> Sent: Friday, November 17, 2017 5:10 PM > >> To: dev@dpdk.org > >> Cc: yliu@fridaylinux.org; maxime.coquelin@redhat.com; > >> arei.gonglei@huawei.com; Zhang, Roy Fan ; > >> Zeng, Xin ; weidong.huang@huawei.com; > >> wangxinxin.wang@huawei.com; longpeng2@huawei.com; > >> jianjay.zhou@huawei.com > >> Subject: [PATCH] virtio: add new driver for crypto devices > >> + /* > >> + * malloc memory to store indirect vring_desc entries, including > >> + * ctrl request, cipher key, auth key, session input and desc vring > >> + */ > >> + desc_offset =3D ctrl_req_length + cipher_keylen + auth_keylen > >> + + input_length; > > > > Instead of using rte_malloc() as below, you could pre-allocate a > > mempool and use > > rte_mempool_get() or rte_mempool_get_bulk() to get these memory to > store descriptors. > > You can use rte_mempool_virt2iova() to obtain the physical address of > > this memory. This shall have better performance. >=20 > I will have a try. >=20 > Regards, > Jay >=20 > > > >> + virt_addr_started =3D rte_malloc(NULL, > >> + desc_offset + > >> NUM_ENTRY_VIRTIO_CRYPTO_SYM_CREATE_SESSION > >> + * sizeof(struct vring_desc), RTE_CACHE_LINE_SIZE); > >> + if (virt_addr_started =3D=3D NULL) { > >> + PMD_SESSION_LOG(ERR, "not enough heap memory"); > >> + return -ENOSPC; > >> + } > >> + phys_addr_started =3D rte_malloc_virt2phy(virt_addr_started); > > > > . > >