DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Roy Fan" <roy.fan.zhang@intel.com>
To: "Mattias Rönnblom" <mattias.ronnblom@ericsson.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>
Subject: Re: [dpdk-dev] [PATCH] examples/vhost_crypto: fix zero copy
Date: Wed, 14 Nov 2018 08:46:27 +0000	[thread overview]
Message-ID: <9F7182E3F746AB4EA17801C148F3C604334E0739@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <4c3cdfb6-7b79-5b89-286d-8e8cae56f755@ericsson.com>

Hi Mattias,

Sorry for the late reply. Comments inline.

> -----Original Message-----
> From: Mattias Rönnblom [mailto:mattias.ronnblom@ericsson.com]
> Sent: Tuesday, October 30, 2018 7:38 PM
> To: Zhang, Roy Fan <roy.fan.zhang@intel.com>; dev@dpdk.org
> Cc: maxime.coquelin@redhat.com
> Subject: Re: [dpdk-dev] [PATCH] examples/vhost_crypto: fix zero copy
> 
> On 2018-10-30 15:48, Fan Zhang wrote:
> > This patch fixes the zero copy enable problem for vhost crypto sample
> > application.
> rte_mempool_free() already does a NULL-check (as per libc free()
> convention), and if you are to do a NULL-check it should be an explicit one
> ("!= NULL").
No problem, I can change that. 
> 
> >   		for (j = 0; j < lo->nb_sockets; j++) {
> >   			rte_vhost_driver_unregister(lo->socket_files[i]);
> > @@ -493,6 +499,19 @@ main(int argc, char *argv[])
> >   		info->nb_vids = lo->nb_sockets;
> >
> >   		rte_cryptodev_info_get(info->cid, &dev_info);
> > +		if (options.zero_copy ==
> RTE_VHOST_CRYPTO_ZERO_COPY_ENABLE) {
> > +#define VHOST_CRYPTO_CDEV_NAME_AESNI_MB_PMD
> 	crypto_aesni_mb
> > +#define VHOST_CRYPTO_CDEV_NAME_AESNI_GCM_PMD
> 	crypto_aesni_gcm
> 
> What's the purpose of these defines?
These two PMD names are defined inside the PMDs and are not exposed to the vhost library.
Also these two PMDs are the ones that copy to the end of the packet for computation purposes, which will cause the problem for virtio case.
 
> 
> > +			if (strstr(dev_info.driver_name,
> > +
> 	RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_MB_PMD)) ||
> > +				strstr(dev_info.driver_name,
> > +
> 	RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_GCM_PMD)))
> > +			RTE_LOG(ERR, USER1, "Cannot enable Zero Copy
> to %s\n",
> > +					dev_info.driver_name);
> 
> "Zero Copy to" should probably be "zero-copy in" or "Zero-copy in".
Thanks I will change that.

Regards,
Fan

  parent reply	other threads:[~2018-11-14  8:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-30 14:48 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 [this message]
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

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=9F7182E3F746AB4EA17801C148F3C604334E0739@IRSMSX101.ger.corp.intel.com \
    --to=roy.fan.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=mattias.ronnblom@ericsson.com \
    --cc=maxime.coquelin@redhat.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).