From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0064.outbound.protection.outlook.com [104.47.37.64]) by dpdk.org (Postfix) with ESMTP id 39C7A1B2D5 for ; Tue, 10 Oct 2017 15:47:04 +0200 (CEST) Received: from MWHPR03CA0011.namprd03.prod.outlook.com (10.175.133.149) by CO2PR03MB2357.namprd03.prod.outlook.com (10.166.93.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Tue, 10 Oct 2017 13:47:02 +0000 Received: from BY2FFO11FD018.protection.gbl (2a01:111:f400:7c0c::177) by MWHPR03CA0011.outlook.office365.com (2603:10b6:300:117::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7 via Frontend Transport; Tue, 10 Oct 2017 13:47:02 +0000 Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD018.mail.protection.outlook.com (10.1.14.106) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Tue, 10 Oct 2017 13:47:02 +0000 Received: from [10.232.133.65] ([10.232.133.65]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v9ADkxNi031239; Tue, 10 Oct 2017 06:47:00 -0700 To: Thomas Monjalon References: <1499946530-29581-1-git-send-email-hemant.agrawal@nxp.com> <1507375221-16271-1-git-send-email-hemant.agrawal@nxp.com> <3342808.snfueRI35B@xps> CC: , From: Hemant Agrawal Message-ID: <6e9b5a3b-4a5c-13b4-f0d2-776313b08f93@nxp.com> Date: Tue, 10 Oct 2017 19:16:59 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <3342808.snfueRI35B@xps> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131521168225653984; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(7966004)(39380400002)(346002)(376002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199003)(24454002)(189002)(377454003)(68736007)(23746002)(189998001)(229853002)(81166006)(77096006)(8676002)(81156014)(8936002)(2906002)(47776003)(65806001)(65956001)(230700001)(104016004)(65826007)(5660300001)(305945005)(97736004)(36756003)(83506001)(6246003)(50986999)(54356999)(50466002)(106466001)(105606002)(76176999)(356003)(54906003)(33646002)(64126003)(498600001)(53546010)(69596002)(4326008)(31696002)(31686004)(2950100002)(58126008)(6916009)(86362001)(53936002)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2357; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD018; 1:fPm+xGEINm5BMTpyYTiyWLp+GjmccSzN0W9slRDApRvjqhGf1c6FRFg0FpH2bkRneNIIXVFr0m62yXYfOUwhXzGLvfE42iyR64FbDLBg0uWe3yNFCUBc/WShjT1X7lm4 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 982dde7e-f12d-4693-737f-08d50fe562fd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:CO2PR03MB2357; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2357; 3:YmOnik6xt6uQQkgK9x9fXC6ppjmUYXf5oXwvQPpcoTIeFR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vR4ef2KT5DTL9uX5nXMSb6DxzSO21ZAG/x9bq+LnAZ+JNGvVRgx1GD1yhvUFn9C7B6yb1YgL58uuwhM/oA/daDnGdIfKBde5DGJhfPm67Z1VW7aUlpO5WYQR9vpl7L6F6fidMLWJtwyrw1268juXudCcmUn435OnIvk873xn9ZuztNTUwlsyu4xiKmfxh/iyPo= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6096035)(20161123561025)(20161123556025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(20161123565025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR03MB2357; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR03MB2357; X-Forefront-PRVS: 04569283F9 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; CO2PR03MB2357; 23:jS7dappRMbD07X7xli6QpslvrYKvm+MHBke4P?= =?Windows-1252?Q?DaWVeeHQJmaLTU9MJnBYqdG2mCCcJHl0QDDU9oAFUYdoQOhkLfG6Kumv?= =?Windows-1252?Q?leTCMgO+7hUdNYYwddbQDUjNRQKzgl8gwULbZkd348JOz55GCZU26owJ?= =?Windows-1252?Q?ef9yS49VtARFdJPYXWjsiytxI+WeAufFpcjBMdnZ3fHGbDHLSV8WgilA?= =?Windows-1252?Q?0D8osmUc8yP6tGTTD/5LoSNQ48pJHd0G0oHmo70YhLUNp1wM550JJT9/?= =?Windows-1252?Q?SSWtqOe8iabJOlExHb1GiObrjmUDCKNDQCZL9cApArArjOpRuKAOApfy?= =?Windows-1252?Q?vbKvAKNAF0Q94+z7ZSTu/emgX/DdlJO2nZpqnIolTrfgtewpoTIj6RaG?= =?Windows-1252?Q?bhbSZvmdKtIuyJv2GZ8Z2Kccl4psXboY4KJEFhruUfFO2ddwbjxJVxxI?= =?Windows-1252?Q?tYfrE12kdMP5sfEZa6cPyWS451kr4zKpk/P6BA9AIyo4G7z6egHCtqZY?= =?Windows-1252?Q?hbVgyWCc3gIpgcHqFczy6HJ70xk1NgP4ueLIqiiaX9vkdafH55r+Zle5?= =?Windows-1252?Q?zpQvC4ZdYibQYGezfZ3lSBDfc2SxrLSH+71J7ssKXcdOuG3SXCegcwPp?= =?Windows-1252?Q?etKhXSnAO0LVXGIe3NdBnju6TTcLmTXSUIEsq8KXAxyEMKQ/RsJJ8J/j?= =?Windows-1252?Q?H9VVVx0OhSpg4GtK91ite1MKAqsVzgZSCQMPbAXXEkF1SCUdRNvXFG5D?= =?Windows-1252?Q?PwJOLesrV4ITMkHbhreD0jy814YG51yhQxtID4+dy9C/pV7osX6gxaj8?= =?Windows-1252?Q?uSd3jgZy834+orFeTeoWqb3kxJ0awta7hmIsa77Dwa2LB9RgFR+w0dkW?= =?Windows-1252?Q?sZZTGeznCSj3DbQtcyzD0wEB5L0ZZxTMfeD1h6sKGlWdXerVzSl4RSQO?= =?Windows-1252?Q?hMYcK8sUW+aDypCHhhJ/OQPIG+A8PgvgmGll7+ndzZuzYAfxUQVdzJuJ?= =?Windows-1252?Q?/rU7J+CndIWZT8D3jmuV83M9g2VW2wnvtPxdmC1y+VoN1E/zQwDlEEfk?= =?Windows-1252?Q?/25tLX9p1MbKME6O5dURiUNxrdiVW2fjMzzcNgpqa4ucAaPWTjbqscIA?= =?Windows-1252?Q?jXuTlEH6pnIxm67jTlI2Nodd8sQ1r9OrQzLZD6pRAvo7Pnihal0FnAig?= =?Windows-1252?Q?Y4UYHNbp8AXLbag2M5e50+5sGL58ZVmT7IwJS1ZLxfHWS9WJNlObKVOC?= =?Windows-1252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RM54QFB+k5bH6RAwlGaVOrXS4odUJDkE0gKdYV9z4CiVYybCn/KEa49LNBI7FQJAOQ1/NFq9Jr1YtO1p/RRJ1RSc72Qoy+EqSvok+9xgTXMkjjvBapOwia8JIieAn0nPa/QoM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2017 13:47:02.3781 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR03MB2357 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 13:47:04 -0000 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?