From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 4552C376D for ; Fri, 24 Apr 2015 09:27:19 +0200 (CEST) Received: by wgyo15 with SMTP id o15so41313075wgy.2 for ; Fri, 24 Apr 2015 00:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=A7zGKcJCw3bJpJ2073sO5m15ytv+VIYFBmaedlyPArc=; b=PYkmnoWcXKNNwgrLMkSCJgd/Dg8fHq2iDwFhNp9HtM6SdHVAAPoXQXobBqGF7cw2sC TZ0Nr4TvvYNw3uwCVZVGQD25BXuM0mYrZ9aJk0fjmtxJ4UzDt09fQpKz5uOXDtUqjpKP sa0ThBpckZF0qA9Q6R4l4kuk8bDjD6sXleeLtlm8bIbCdvBgjWe5su1Xe8eWvrgVwbIs NZS25xoMUUSP7qtbQNyfI0LTP6fPH/Lzo6EmLHRIdYnIcNjcOJvv1SQ8fOYW9XY/6MuA A1avqEZnJxFUbt7jBff3S+hp8NtkbcnT28RaPu8aWTPLU0uvhQ0v9Y75bDetTSrAqkCI MPWg== MIME-Version: 1.0 X-Received: by 10.180.78.135 with SMTP id b7mr1208932wix.65.1429860439114; Fri, 24 Apr 2015 00:27:19 -0700 (PDT) Sender: lukego@gmail.com Received: by 10.27.134.198 with HTTP; Fri, 24 Apr 2015 00:27:19 -0700 (PDT) In-Reply-To: <553995DB.4000801@huawei.com> References: <1429720392-25345-1-git-send-email-huawei.xie@intel.com> <553995DB.4000801@huawei.com> Date: Fri, 24 Apr 2015 09:27:19 +0200 X-Google-Sender-Auth: mwJEkUxoouQQxMuT_UOy5XrnB0A Message-ID: From: Luke Gorrie To: Linhaifeng Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" , "Michael S. Tsirkin" Subject: Re: [dpdk-dev] [PATCH] vhost: flush used->idx update before reading avail->flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 07:27:19 -0000 On 24 April 2015 at 03:01, Linhaifeng wrote: > If not add memory fence what would happen? Packets loss or interrupt > loss?How to test it ? > You should be able to test it like this: 1. Boot two Linux kernel (e.g. 3.13) guests. 2. Connect them via vhost switch. 3. Run continuous traffic between them (e.g. iperf). I would expect that within a reasonable timeframe (< 1 hour) one of the guests' network interfaces will hang indefinitely due to a missed interrupt. You won't be able to reproduce this using DPDK guests because they are not using the same interrupt suppression method. This is a serious real-world problem. I wouldn't deploy the vhost implementation without this fix. Cheers, -Luke