From: "Zhang, Roy Fan" <roy.fan.zhang@intel.com>
To: Jay Zhou <jianjay.zhou@huawei.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "yliu@fridaylinux.org" <yliu@fridaylinux.org>,
"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
"arei.gonglei@huawei.com" <arei.gonglei@huawei.com>,
"Zeng, Xin" <xin.zeng@intel.com>,
"weidong.huang@huawei.com" <weidong.huang@huawei.com>,
"wangxinxin.wang@huawei.com" <wangxinxin.wang@huawei.com>,
"longpeng2@huawei.com" <longpeng2@huawei.com>
Subject: Re: [dpdk-dev] [PATCH] virtio: add new driver for crypto devices
Date: Mon, 27 Nov 2017 16:47:19 +0000 [thread overview]
Message-ID: <9F7182E3F746AB4EA17801C148F3C6043305A340@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <1510938620-15268-1-git-send-email-jianjay.zhou@huawei.com>
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
Regards,
Fan
> -----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 <roy.fan.zhang@intel.com>; Zeng,
> Xin <xin.zeng@intel.com>; 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 = 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.
> + 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);
next prev parent reply other threads:[~2017-11-27 16:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 17:10 Jay Zhou
2017-11-27 16:47 ` Zhang, Roy Fan [this message]
2017-11-28 1:27 ` Jay Zhou
2017-11-29 10:14 ` Zhang, Roy Fan
2018-01-20 15:50 ` Thomas Monjalon
2018-01-20 15:54 ` Thomas Monjalon
2018-01-22 17:25 ` Zhang, Roy Fan
2018-01-22 21:01 ` Thomas Monjalon
2018-01-22 7:37 ` Zhoujian (jay)
2018-01-29 17:19 ` Zhang, Roy Fan
2018-01-29 17:21 ` Zhang, Roy Fan
2018-01-30 1:56 ` Jay Zhou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9F7182E3F746AB4EA17801C148F3C6043305A340@IRSMSX101.ger.corp.intel.com \
--to=roy.fan.zhang@intel.com \
--cc=arei.gonglei@huawei.com \
--cc=dev@dpdk.org \
--cc=jianjay.zhou@huawei.com \
--cc=longpeng2@huawei.com \
--cc=maxime.coquelin@redhat.com \
--cc=wangxinxin.wang@huawei.com \
--cc=weidong.huang@huawei.com \
--cc=xin.zeng@intel.com \
--cc=yliu@fridaylinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).