Hi Jay, No worries. Welcome to DPDK :-D
Regards, Fan > -----Original Message----- > From: Jay Zhou [mailto:[email protected]] > Sent: Tuesday, November 28, 2017 1:27 AM > To: Zhang, Roy Fan <[email protected]>; [email protected] > Cc: [email protected]; [email protected]; > [email protected]; Zeng, Xin <[email protected]>; > [email protected]; [email protected]; > [email protected] > Subject: Re: [PATCH] virtio: add new driver for crypto devices > > Hi Fan, > > 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 contribution > guide in http://dpdk.org/doc/guides/contributing/patches.html, section 5.4? > > 2. Please update doc/guides/cryptodevs for describing your virtio crypto > PMD. > > 3. Please update doc/guides/rel_notes/release_18.02. > > 4. One more comment inline > > > > For DPDK, I'm a newbie. Thanks for testing and pointing these steps out, will > fix them in V2. > > > > >> -----Original Message----- > >> From: Jay Zhou [mailto:[email protected]] > >> Sent: Friday, November 17, 2017 5:10 PM > >> To: [email protected] > >> Cc: [email protected]; [email protected]; > >> [email protected]; Zhang, Roy Fan <[email protected]>; > >> Zeng, Xin <[email protected]>; [email protected]; > >> [email protected]; [email protected]; > >> [email protected] > >> 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 = 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. > > I will have a try. > > Regards, > Jay > > > > >> + virt_addr_started = rte_malloc(NULL, > >> + desc_offset + > >> NUM_ENTRY_VIRTIO_CRYPTO_SYM_CREATE_SESSION > >> + * sizeof(struct vring_desc), RTE_CACHE_LINE_SIZE); > >> + if (virt_addr_started == NULL) { > >> + PMD_SESSION_LOG(ERR, "not enough heap memory"); > >> + return -ENOSPC; > >> + } > >> + phys_addr_started = rte_malloc_virt2phy(virt_addr_started); > > > > . > >

