All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jay Zhou <jianjay.zhou@huawei.com>
To: "Zhang, Roy Fan" <roy.fan.zhang@intel.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: [PATCH] virtio: add new driver for crypto devices
Date: Tue, 28 Nov 2017 09:27:14 +0800	[thread overview]
Message-ID: <5A1CBB72.4050104@huawei.com> (raw)
In-Reply-To: <9F7182E3F746AB4EA17801C148F3C6043305A340@IRSMSX101.ger.corp.intel.com>

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: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.

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);
>
> .
>

  reply	other threads:[~2017-11-28  1:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17 17:10 [PATCH] virtio: add new driver for crypto devices Jay Zhou
2017-11-27 16:47 ` Zhang, Roy Fan
2017-11-28  1:27   ` Jay Zhou [this message]
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=5A1CBB72.4050104@huawei.com \
    --to=jianjay.zhou@huawei.com \
    --cc=arei.gonglei@huawei.com \
    --cc=dev@dpdk.org \
    --cc=longpeng2@huawei.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=roy.fan.zhang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.