From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 2B7EE1B2D2 for ; Tue, 10 Oct 2017 18:27:25 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 99C05209F2; Tue, 10 Oct 2017 12:27:24 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 10 Oct 2017 12:27:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=2sXbd+be9vFilbU RMuEB8GRgIawFw/w+Mek9/e2RfQE=; b=ijFq531kcCo+8TGaTzvqN5nU4u3tFo+ Do2JRLbKfYF0l2wEFGhA9BCGQtCTkt/A5PXCOU76eolVWWFG544hO9xPBf5hhXoU zhrmVFbLRm/SP3FTl1lsurwJMWdAlqpNWrBf9lLDMEC68H3U7VPe381Ht2ZMsIdv lJpiEvy3RFfs= 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-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=2sXbd+be9vFilbURMuEB8GRgIawFw/w+Mek9/e2RfQE=; b=sEq+EBwO I7k527XtIP6RhQQQLY55GcaRxAjEMyzKZuz9POXBLFSvqjb3he0vQCvRjhE7qSRF z1VKbf3rNbP59E4oGaOLSEQPzvCIvG+4wU5Sxi3TWNS0pEdR7bxDbDzV95HkUOrf NeqRaBD95OO14nrMkRSmV5MplxSH7c20PuA+b+hEt038fM+SeyV4brSUJ5rE7AIB 0Vfwydishe/Tq5EQzdbFsaqyCWg4h0tgqYzBlhuP37ZfkesWSchT+ieRJm2s7I8i 5Fk6omJ3QX+wIOljQIqBHlpuBMVwTp/06eTcoEEhFmUl2e1DSGISilk/qG63ijN6 PjWaTFAjOUlp5A== X-ME-Sender: X-Sasl-enc: NgM1K3vuGfL5rSDsSpPFBqnpv+9hM4b7g1776C1NqPcK 1507652844 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 3A1B57F92A; Tue, 10 Oct 2017 12:27:24 -0400 (EDT) From: Thomas Monjalon To: anatoly.burakov@intel.com Cc: Hemant Agrawal , dev@dpdk.org Date: Tue, 10 Oct 2017 18:27:22 +0200 Message-ID: <2615630.Np2p4rFThG@xps> In-Reply-To: <6e9b5a3b-4a5c-13b4-f0d2-776313b08f93@nxp.com> References: <1499946530-29581-1-git-send-email-hemant.agrawal@nxp.com> <3342808.snfueRI35B@xps> <6e9b5a3b-4a5c-13b4-f0d2-776313b08f93@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] eal: enable vfio independent of no PCI flag 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: Tue, 10 Oct 2017 16:27:25 -0000 10/10/2017 15:46, Hemant Agrawal: > Hi Thomas, Anatoly, > > On 10/7/2017 5:07 PM, Thomas Monjalon wrote: > > 07/10/2017 13:20, Hemant Agrawal: > >> In case no_pci is configured, other buses e.g. fslmc bus will > >> still need the the vfio to be enabled. > >> > >> Signed-off-by: Hemant Agrawal > >> --- > >> v2: enabled VFIO, independent of no-pci flag as suggested by Thomas > > [...] > >> --- a/lib/librte_eal/linuxapp/eal/eal.c > >> +++ b/lib/librte_eal/linuxapp/eal/eal.c > >> @@ -733,10 +733,8 @@ static int rte_eal_vfio_setup(void) > >> { > >> int vfio_enabled = 0; > >> > >> - if (!internal_config.no_pci) { > >> - pci_vfio_enable(); > >> - vfio_enabled |= pci_vfio_is_enabled(); > >> - } > >> + pci_vfio_enable(); > >> + vfio_enabled |= pci_vfio_is_enabled(); > > > > You are enabling vfio_pci. > > This part could stay conditionned by no_pci. > > > > I was thinking you need vfio without vfio_pci. Am I right? > > yes > > If yes, I suggest to enable only vfio root module. > > > > vfio_enable should be done only once. So, if I enable it for "vfio", > pci_vfio_enable is not required. > In any case it is not storing any PCI specific data and there are no > error checks here of "vfio_pci" enable failure. > > So, if we use, > vfio_enable("vfio"); > vfio_enabled |= vfio_is_enabled("vfio"); > > It seems no_pci check will not have any value. > > let me know your thoughts? I don't know the code managing VFIO. Anatoly, please can you help meeting the requirement of VFIO always enabled?