From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 531172BF3 for ; Fri, 11 Mar 2016 08:16:16 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 10 Mar 2016 23:16:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,319,1455004800"; d="scan'208";a="64112879" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by fmsmga004.fm.intel.com with ESMTP; 10 Mar 2016 23:16:15 -0800 Date: Fri, 11 Mar 2016 15:19:07 +0800 From: Yuanhan Liu To: Tetsuya Mukawa Message-ID: <20160311071907.GI979@yliu-dev.sh.intel.com> References: <1457590462-3680-1-git-send-email-mukawa@igel.co.jp> <1457593565-16240-1-git-send-email-mukawa@igel.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457593565-16240-1-git-send-email-mukawa@igel.co.jp> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] vhost: Fix default value of kickfd and callfd 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, 11 Mar 2016 07:16:16 -0000 On Thu, Mar 10, 2016 at 04:06:05PM +0900, Tetsuya Mukawa wrote: > Currently, default values of kickfd and callfd are -1. > If the values are -1, current code guesses kickfd and callfd haven't > been initialized yet. And vhost library will guess the virtqueue isn't > ready for processing. > But callfd and kickfd will be set as -1 when "--enable-kvm" > isn't specified in QEMU command line. It means we cannot treat -1 as > uninitialized state. The patch changes default values to -2. And the > patch defines -2 as VIRTIO_UNINITIALIZED_EVENTFD. This looks more like a workaround to me. Besides, this patch would make following fail: eventfd_write(vq->callfd, (eventfd_t)1); --yliu