From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 134213195; Mon, 29 Oct 2018 01:17:43 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 98DFD21E07; Sun, 28 Oct 2018 20:17:42 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 28 Oct 2018 20:17:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=Mm15GXASHoYnkdbtqMRXTNvlg9XywpqjNey+5NMDeKg=; b=lchue8qaAtu9 ueed8h7oIZzKjcinW9cF70Qon1RMLkDPbeTWFgSqtZLUuYaw+RRJOcVD6i0XJmVh VMYberZpRMFgF+5sFAPNOQw1Tjbrk3GXKpkyBbh5dYSa9CvyRV+4NOJR2AWWuwSK RBLRPF8baBoOvMAUWU7zuQLoudzvAX0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Mm15GXASHoYnkdbtqMRXTNvlg9XywpqjNey+5NMDe Kg=; b=th+P1MoSOSLGtaYriJBQD/A0bHWWqXYRCNVs6XbpBidR0fVo29PoKYiY/ RZkLjiayfkT8qCLjhB4KvGlynuo8E39xwMzflkhjk2s12O0lp7yApPnhuhDVv/6D 84QiEsZm2aBsMKgMD7V/k1AVH2/6ugzeDsoulnHxVq/xZWXVwhMQE1B7cQrJUyoO Sjm0jx9bZy4cuqParpYUxL9fy3U8J4Lkul+Nue8QKmrTW3r47XFHuaKAqF0SmspU 8bX14yaLHQ1mn600XQL2wa7b227HCO8p6/RqUyUQmswygw4brHwcn7LGIztfd0br 2VEJdsSw46O1HzoL+iQkURPqCNLhw== X-ME-Sender: X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1EA54102FC; Sun, 28 Oct 2018 20:17:41 -0400 (EDT) From: Thomas Monjalon To: Darek Stojaczyk Cc: stable@dpdk.org, "Burakov, Anatoly" , dev@dpdk.org, wuzhouhui250@gmail.com, pawelx.wodkowski@intel.com, gowrishankar.m@linux.vnet.ibm.com Date: Mon, 29 Oct 2018 01:17:47 +0100 Message-ID: <2151144.DLmmOzqKvU@xps> In-Reply-To: <45f61fc2-ee13-e342-6f4d-0178df40c94d@intel.com> References: <20181003123925.6343-1-dariusz.stojaczyk@intel.com> <45f61fc2-ee13-e342-6f4d-0178df40c94d@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] eal/vfio: share the default container in multi 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: Mon, 29 Oct 2018 00:17:43 -0000 05/10/2018 10:57, Burakov, Anatoly: > On 03-Oct-18 1:39 PM, Darek Stojaczyk wrote: > > So far each process in MP used to have a separate container > > and relied on the primary process to register all memsegs. > > > > Mapping external memory via rte_vfio_container_dma_map() > > in secondary processes was broken, because the default > > (process-local) container had no groups bound. There was > > even no way to bind any groups to it, because the container > > fd was deeply encapsulated within EAL. > > > > This patch introduces a new SOCKET_REQ_DEFAULT_CONTAINER > > message type for MP synchronization, makes all processes > > within a MP party use a single default container, and hence > > fixes rte_vfio_container_dma_map() for secondary processes. > > > >>From what I checked this behavior was always the same, but > > started to be invalid/insufficient once mapping external > > memory was allowed. > > > > Fixes: 73a639085938 ("vfio: allow to map other memory regions") > > Cc: anatoly.burakov@intel.com > > Cc: pawelx.wodkowski@intel.com > > Cc: gowrishankar.m@linux.vnet.ibm.com > > Cc: stable@dpdk.org > > > > While here, fix up the comment on rte_vfio_get_container_fd(). > > This function always opens a new container, never reuses > > an old one. > > > > Signed-off-by: Darek Stojaczyk > > --- > > > > > + if (internal_config.process_type == RTE_PROC_PRIMARY) { > > + /* if we were secondary process we would try requesting > > + * container fd from the primary, but we're the primary > > + * process so just exit here > > + */ > > + return -1; > > + } > > + > > + p->req = SOCKET_REQ_DEFAULT_CONTAINER; > > + strcpy(mp_req.name, EAL_VFIO_MP); > > strlcpy? > > Otherwise, > Reviewed-by: Anatoly Burakov Applied, thanks