DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tiwei Bie <tiwei.bie@intel.com>
To: He Peng <xnhp0320@icloud.com>
Cc: dev@dpdk.org, "\"CHENCHONG1 [陈冲]\"" <chenchong1@kingsoft.com>,
	"\"YEXIAOFENG1 [叶小峰]\"" <YEXIAOFENG1@kingsoft.com>
Subject: Re: [dpdk-dev]   *rte_vhost_rx_queue_count* should  be protected by vq->access_lock
Date: Thu, 15 Aug 2019 21:41:42 +0800	[thread overview]
Message-ID: <20190815134142.GA26845@___> (raw)
In-Reply-To: <64da2070-08b6-4e8c-9873-246f98d79ed3@me.com>

On Thu, Aug 15, 2019 at 09:14:52AM +0000, He Peng wrote:
> Hi,
> 
> 
> Would you please provide  a list of impacted APIs, thus we can check if our code has further issues. b.t.w, we are now using dpdk 18.11.

I'm looking into this issue. The API of the builtin backend
is supposed to be protected like enqueue/dequeue. So e.g.
rte_vhost_enable_guest_notification should also be protected.
I'll keep you in the CC list of the fix patch.

Thanks,
Tiwei

> 
> 
> Thanks.
> 
> 2019年8月14日 下午11:09,Tiwei Bie <tiwei.bie@intel.com> 写道:
> 
> 
> On Wed, Aug 14, 2019 at 03:31:09AM +0000, He Peng wrote:
> 
> Hi,
> 
> 
> We found that *rte_vhost_rx_queue_count* is not protected by vq->access_lock,
> and the access to vq->avail->idx is not thread-safe, since at the same time, the vq->avail  might be 
> 
> 
> set by *vring_invalidate* when some vhost-user messages arrived, such as VRING_SET_ADDRESS,
> VRING_SET_MEM_TABLE, etc.
> 
> You are right. And other similar APIs also need to be protected.
> Thanks for reporting this!
> 
> Thanks,
> Tiwei
> 
> 
> 
> 
> 
> 
> 
> Thanks. 
> 
> 
> 
> 
> 
> 
> 

  reply	other threads:[~2019-08-15 13:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15  9:14 He Peng
2019-08-15 13:41 ` Tiwei Bie [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-08-14  3:31 He Peng
2019-08-15  6:07 ` Tiwei Bie

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=20190815134142.GA26845@___ \
    --to=tiwei.bie@intel.com \
    --cc=YEXIAOFENG1@kingsoft.com \
    --cc=chenchong1@kingsoft.com \
    --cc=dev@dpdk.org \
    --cc=xnhp0320@icloud.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).