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 C05711AEEE for ; Thu, 21 Sep 2017 09:04:43 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Sep 2017 00:04:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,424,1500966000"; d="scan'208";a="314546847" Received: from tanjianf-mobl.ccr.corp.intel.com (HELO [10.67.64.94]) ([10.67.64.94]) by fmsmga004.fm.intel.com with ESMTP; 21 Sep 2017 00:04:40 -0700 To: Yuanhan Liu 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> 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 From: "Tan, Jianfeng" Message-ID: <59f2bfc0-91ee-b276-68e3-563e5b5af89b@intel.com> Date: Thu, 21 Sep 2017 15:04:39 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170921033323.GA2251@yliu-home> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 10/12] vhost: support to kick in secondary process 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, 21 Sep 2017 07:04:45 -0000 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