From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v2 2/7] net/virtio_user: postpone DRIVER OK notification Date: Mon, 26 Dec 2016 14:27:19 +0800 Message-ID: <20161226062719.GA19288@yliu-dev.sh.intel.com> References: <1480689075-66977-1-git-send-email-jianfeng.tan@intel.com> <1482477266-39199-1-git-send-email-jianfeng.tan@intel.com> <1482477266-39199-3-git-send-email-jianfeng.tan@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, ferruh.yigit@intel.com, cunming.liang@intel.com To: Jianfeng Tan Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 4FFC398 for ; Mon, 26 Dec 2016 07:25:34 +0100 (CET) Content-Disposition: inline In-Reply-To: <1482477266-39199-3-git-send-email-jianfeng.tan@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Dec 23, 2016 at 07:14:21AM +0000, Jianfeng Tan wrote: > In driver probe phase, we obtain device information; and then virtio > driver will initialize device and stores info, like negotiated > features, in vhost_user layer; finally, vhost_user gets DRIVER_OK > notification from virtio driver, and then sync with backend device. > > Previously, DRIVER_OK could be sent twice: 1. when ether layer invokes > eth_device_init to initialize device; 2. when user configures it with > different configuration from that of previous. Yes, but that's wrong. Now only 1) will be taken. > Since we can only depend on DRIVER_OK notification to sync with backend > device, we postpone it to virtio_dev_start when everything is settled. I don't quite understand what you were going to fix here; you don't state it in the commit log after all. Normally, when everything is negotiated (when DRIVER_OK is set), we should not set it again, unless a reset has been happened. If you look at QEMU, qemu will simply ignore it once vhost has already started. --yliu