From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/f27agZzJ5D46kJFqRD2UtLHFbbMGVpawI00Z74PEio=; b=ykDx/JvXUxzX7V4cHyecQsM1HajnmE6+XqtP9hTMgnn5JXvQ04jmX5vcgWN2roEqKh 0JKGqb5o1k+11ZaZSkS///rDUqQFyAnIsJalK3CvhgfRc7GPxm9xDAasWrBcSw/BqJWs G3jtby1p4CYaT8lLZC28/riBYiSO2ss37IcKRv1awan9eoiCo82ViiOzW8MXjJdHu2tm +RUqi4qPrylMDVA3YVn7ydxkQm4zm8YfmcfF7o7G5jB9540cob/8wKjTB+bsevJkkR4n xm1Nx1aN7ze3gM0rviPHk9j8DSnoOYNPDaeupHAbogto1fJ/2vyW2Xs+PiRT/lJZMtLB jhhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/f27agZzJ5D46kJFqRD2UtLHFbbMGVpawI00Z74PEio=; b=nqBTZ8Oc7P55aQpZINj0fOb0lSZGJ3gku2RU9SklkkaBmGdxCGTMPFaEKhluB1k62C YlIcHFBs/N7hdpAFPresXdetzJOwOThrGpFSxnG0VeLqqLqujL+ha0G5NIMksPutrkO0 2CapBw1W21j/mHtLKkAYIhc9DYPCcM9UJDCd8p065RyCCxmBr33W1hUvx2E2PPJp5IqW JgrEejE1O+oODKk76Ah6S99dEEk5ahgZnI5133TKoYITusdzvcPDwvtXS1+tN5R+eLss o2vsdnA17+9xWPUUFc73f0VdS4qmNT7ZoYglDfoTbeFN2zHMmhvMyQ41bIdxuqf6vVMq RjTQ== X-Gm-Message-State: AHPjjUiJ5DkF629JtNWDA4tAaiF/Zjsoh/hyGNE/bJ5QyOzj2EP260BQ YVfGb6zUKCsxc61hfw8DkD3zDw== X-Google-Smtp-Source: AOwi7QCS9bR7cedNCm3V55OKs9EhUjNtOFEfnOXYJwoYgUWayGlLKhpWfWghk9gGAOm63j62ZWQWDA== X-Received: by 10.98.32.92 with SMTP id g89mr5020950pfg.285.1505985488194; Thu, 21 Sep 2017 02:18:08 -0700 (PDT) Received: from yliu-home ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id w9sm1689133pfg.129.2017.09.21.02.18.04 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Sep 2017 02:18:06 -0700 (PDT) Date: Thu, 21 Sep 2017 17:17:59 +0800 From: Yuanhan Liu To: "Tan, Jianfeng" Cc: dev@dpdk.org, maxime.coquelin@redhat.com, mtetsuyah@gmail.com 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 Content-Disposition: inline In-Reply-To: <59f2bfc0-91ee-b276-68e3-563e5b5af89b@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) 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 09:18:09 -0000 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