DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
	Fan Zhang <roy.fan.zhang@intel.com>,
	dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] examples/vhost_crypto: fix zero copy
Date: Fri, 16 Nov 2018 15:23:53 +0000	[thread overview]
Message-ID: <87a8b3eb-eb39-1026-42a0-c903d0d229f3@intel.com> (raw)
In-Reply-To: <de6b6a91-5483-692f-b8db-06adaeb4c34d@redhat.com>

On 11/16/2018 10:48 AM, Maxime Coquelin wrote:
> 
> 
> On 11/14/18 12:16 PM, Fan Zhang wrote:
>> This patch fixes the zero copy enable problem for vhost crypto
>> sample application.
>>
>> For some Crypto PMDs such as AESNI-MB and AESNI-GCM the data to
>> be processed will be made a copy in the same buffer but next to the
>> data. For example, to encrypt 64 bytes data the PMD will copy this
>> data from offset 64 to offset 123. This requires the application
>> provides the buffer with at least double of the data size.
>>
>> However there is no way for VMs to know this limitation. When
>> zero-copy is enabled in Vhost the PMD may overwrite the buffer
>> next to the VM data to be processed, and further cause problems
>> such as Segmentation Fault or even worse, crashes the VM.
>>
>> To fix the problem the user should avoid enabling the zero copy
>> for these Crypto PMDs. This patch adds the checking of the PMD
>> names to see if zero copy can be applied.
>>
>> Fixes: 709521f4c2cd ("examples/vhost_crypto: support multi-core")
>>
>> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
>> ---
>> v2:
>> - removed unecessary checks
>> - Changed log message when zero-copy is not applicable.
>>
>>   examples/vhost_crypto/main.c | 17 +++++++++++++++++
>>   1 file changed, 17 insertions(+)
>>
> 
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Applied to dpdk-next-net/master, thanks.

      reply	other threads:[~2018-11-16 15:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-30 14:48 [dpdk-dev] [PATCH] " Fan Zhang
2018-10-30 19:38 ` Mattias Rönnblom
2018-11-09 11:40   ` Maxime Coquelin
2018-11-14  8:46   ` Zhang, Roy Fan
2018-11-14 11:16 ` [dpdk-dev] [PATCH v2] " Fan Zhang
2018-11-16 10:48   ` Maxime Coquelin
2018-11-16 15:23     ` Ferruh Yigit [this message]

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=87a8b3eb-eb39-1026-42a0-c903d0d229f3@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=roy.fan.zhang@intel.com \
    /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).