DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Fan Zhang <roy.fan.zhang@intel.com>
Cc: dev@dpdk.org, Maxime Coquelin <maxime.coquelin@redhat.com>,
	ferruh.yigit@intel.com
Subject: Re: [dpdk-dev] [PATCH] vhost/crypto: fix missing head correction
Date: Fri, 27 Apr 2018 19:38:13 +0200	[thread overview]
Message-ID: <3355640.sTbJTRXtYB@xps> (raw)
In-Reply-To: <e0329d67-a2b9-eece-f461-7ffe02e2f051@redhat.com>

27/04/2018 16:19, Maxime Coquelin:
> Hi Fan,
> 
> On 04/27/2018 03:52 PM, Fan Zhang wrote:
> > Fixes: 473387aaae4a ("vhost/crypto: move to safe GPA translation API")
> > 
> > This patch fixes the missing head descriptor correction for
> > indirect descriptors.
> > 
> > Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> > ---
> >   lib/librte_vhost/vhost_crypto.c | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
> > index c38eb3bb5..81fab7e94 100644
> > --- a/lib/librte_vhost/vhost_crypto.c
> > +++ b/lib/librte_vhost/vhost_crypto.c
> > @@ -919,6 +919,7 @@ vhost_crypto_process_one_req(struct vhost_crypto *vcrypto,
> >   		if (unlikely(!desc || dlen != head->len))
> >   			return -1;
> >   		desc_idx = 0;
> > +		head = desc;
> 
> Thanks for fixing this, and sorry for having introduced the regression.
> 
> BTW, my patch is half-complete. Indeed, it ensures no out-of-bound
> accesses will be done, but it does not handle legit buffers that are
> contiguous in guest physical address space, but discontiguous in the
> host VA space. Such case can for example happen when having buffers
> larger than the huge page size.
> 
> I have implemented the handling of such buffers in virtio-net.c, for 
> example:
> 
> fb3815cc6 vhost: handle virtually non-contiguous buffers in Rx-mrg
> 6727f5a73 vhost: handle virtually non-contiguous buffers in Rx
> 91b7b4080 vhost: handle virtually non-contiguous buffers in Tx
> d0c24508e vhost: add support for non-contiguous indirect descs tables
> 
> Can you try to work on such handling for next -rc release?
> 
> 
> For this patch:
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Applied as hot patch for RC1, thanks

      parent reply	other threads:[~2018-04-27 17:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27 13:52 Fan Zhang
2018-04-27 14:19 ` Maxime Coquelin
2018-04-27 14:22   ` Zhang, Roy Fan
2018-04-27 17:38   ` Thomas Monjalon [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=3355640.sTbJTRXtYB@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --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).