From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH 10/12] vhost: support to kick in secondary process Date: Thu, 21 Sep 2017 17:17:59 +0800 Message-ID: <20170921091759.GE2251@yliu-home> 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> <59f2bfc0-91ee-b276-68e3-563e5b5af89b@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, maxime.coquelin@redhat.com, mtetsuyah@gmail.com To: "Tan, Jianfeng" Return-path: Received: from mail-pf0-f173.google.com (mail-pf0-f173.google.com [209.85.192.173]) by dpdk.org (Postfix) with ESMTP id F15A01B18C for ; Thu, 21 Sep 2017 11:18:08 +0200 (CEST) Received: by mail-pf0-f173.google.com with SMTP id b70so2937570pfl.8 for ; Thu, 21 Sep 2017 02:18:08 -0700 (PDT) Content-Disposition: inline In-Reply-To: <59f2bfc0-91ee-b276-68e3-563e5b5af89b@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 Thu, Sep 21, 2017 at 03:04:39PM +0800, Tan, Jianfeng wrote: > >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) I was thinking that those fds will be retrieved by the primary process once? So thsoe it got at beginning are still valid? --yliu