From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tan, Jianfeng" Subject: Re: [PATCH 10/12] vhost: support to kick in secondary process Date: Thu, 21 Sep 2017 15:04:39 +0800 Message-ID: <59f2bfc0-91ee-b276-68e3-563e5b5af89b@intel.com> References: <1503654052-84730-1-git-send-email-jianfeng.tan@intel.com> <1503654052-84730-11-git-send-email-jianfeng.tan@intel.com> <20170921033323.GA2251@yliu-home> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, bruce.richardson@intel.com, konstantin.ananyev@intel.com, pablo.de.lara.guarch@intel.com, thomas@monjalon.net, maxime.coquelin@redhat.com, mtetsuyah@gmail.com, ferruh.yigit@intel.com To: Yuanhan Liu Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id C05711AEEE for ; Thu, 21 Sep 2017 09:04:43 +0200 (CEST) In-Reply-To: <20170921033323.GA2251@yliu-home> 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 9/21/2017 11:33 AM, Yuanhan Liu wrote: > Firstly, very sorry for so late review! That is understood. > > On Fri, Aug 25, 2017 at 09:40:50AM +0000, Jianfeng Tan wrote: >> To support kick in secondary process, we propose callfd_pri and >> kickfd_pri to store the value in primary process; and by a new >> API, rte_vhost_set_vring_effective_fd(), we can set effective >> callfd and kickfd which can be used by secondary process. >> >> Note in this case, either primary process or the secondary process >> can kick the frontend; that is, they cannot kick a vring at the >> same time. > Since only one can work, why not just overwriting the fd? Say, you > could introudce some APIs like "rte_vhost_set_vring_callfd", then > you don't need to introduce few more fields like "callfd_pri". That cannot address the below case: 1. Primary starts; 2. Secondary one starts; (if we overwrite it without storing it in some other fields) 3. Secondary one exits; 4. Secondary two starts. (primary cannot share the fd with this secondary process now, as this fd does not mean anything to the primary process) Thanks, Jianfeng