From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 34EAC58CF for ; Mon, 9 May 2016 20:19:40 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 09 May 2016 11:19:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,601,1455004800"; d="scan'208";a="962103258" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga001.fm.intel.com with ESMTP; 09 May 2016 11:19:21 -0700 Date: Mon, 9 May 2016 11:23:55 -0700 From: Yuanhan Liu To: "Xie, Huawei" Cc: Victor Kaplansky , "dev@dpdk.org" , "Michael S. Tsirkin" Message-ID: <20160509182355.GG5641@yliu-dev.sh.intel.com> References: <1462603224-29510-1-git-send-email-yuanhan.liu@linux.intel.com> <1462603224-29510-5-git-send-email-yuanhan.liu@linux.intel.com> <1245742132.28022376.1462790702229.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 4/6] vhost: workaround stale vring base 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: Mon, 09 May 2016 18:19:40 -0000 On Mon, May 09, 2016 at 01:39:25PM +0000, Xie, Huawei wrote: > On 5/9/2016 6:45 PM, Victor Kaplansky wrote: > >> diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c > >> > index c88aaa3..df103aa 100644 > >> > --- a/lib/librte_vhost/virtio-net.c > >> > +++ b/lib/librte_vhost/virtio-net.c > >> > @@ -560,6 +560,14 @@ vhost_set_vring_addr(int vid, struct vhost_vring_addr > >> > *addr) > >> > return -1; > >> > } > >> > > >> > + if (vq->last_used_idx != vq->used->idx) { > >> > + RTE_LOG(WARNING, VHOST_CONFIG, > >> > + "last_used_idx (%u) and vq->used->idx (%u) mismatch\n", > > I agree with this approach. I just would add to the log message that last_user_idx > > have overrode by used_idx and some packets may be dropped. Good suggestion. Will do in v2. > For TX, the packets are resent. > For RX, the packets are dropped. Yes. Thanks. --yliu