From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 7F0B71396 for ; Thu, 16 Mar 2017 08:37:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1489649820; x=1521185820; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=FatCm/Vao3Ou691EriHhyTb94pbk0Hb36uZRfAJ5xdE=; b=ATETTkxB4o1BAhyt0Cmwy8h/Jy/u6lifLFh7cQVLOgdJGB9xSBsKnnAf c9UHHuPyByCJQj3aWBxNlWhuuMh7MA==; Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Mar 2017 00:36:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,170,1486454400"; d="scan'208";a="1123218508" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga001.fm.intel.com with ESMTP; 16 Mar 2017 00:36:58 -0700 Date: Thu, 16 Mar 2017 15:35:16 +0800 From: Yuanhan Liu To: Maxime Coquelin Cc: dev@dpdk.org, Harris James R , Liu Changpeng Message-ID: <20170316073516.GQ18844@yliu-dev.sh.intel.com> References: <1488534682-3494-1-git-send-email-yuanhan.liu@linux.intel.com> <1488534682-3494-7-git-send-email-yuanhan.liu@linux.intel.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 06/17] vhost: introduce API to fetch negotiated features X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 07:37:01 -0000 On Tue, Mar 14, 2017 at 12:02:59PM +0100, Maxime Coquelin wrote: > >+uint64_t > >+rte_vhost_get_negotiated_features(int vid) > >+{ > >+ struct virtio_net *dev; > >+ > >+ dev = get_device(vid); > >+ if (!dev) > >+ return -1; > >+ > >+ return dev->features; > >+} > Are we sure the negotiation is done when we can get the device? Yes. However, one thing worth noting is that the features may change after the new_device() callback. Notablely, when live migration starts /ends, the VHOST_F_LOG_ALL will be set/cleared, respectively. >>From that point of view, we need a new callback, something like features_changed(), or live_migration_starts()? Or a better name? --yliu