From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0063.outbound.protection.outlook.com [104.47.40.63]) by dpdk.org (Postfix) with ESMTP id 599DF37B4 for ; Tue, 27 Sep 2016 16:11:58 +0200 (CEST) Received: from BY2PR03CA068.namprd03.prod.outlook.com (10.141.249.41) by BN3PR03MB2226.namprd03.prod.outlook.com (10.166.74.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Tue, 27 Sep 2016 14:11:56 +0000 Received: from BL2FFO11OLC001.protection.gbl (2a01:111:f400:7c09::133) by BY2PR03CA068.outlook.office365.com (2a01:111:e400:2c5d::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5 via Frontend Transport; Tue, 27 Sep 2016 14:11:56 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.com; dkim=none (message not signed) header.d=none; 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 BL2FFO11OLC001.mail.protection.outlook.com (10.173.161.185) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.629.5 via Frontend Transport; Tue, 27 Sep 2016 14:11:56 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u8REBqcd027766; Tue, 27 Sep 2016 07:11:53 -0700 From: Shreyansh Jain To: CC: , , , Shreyansh Jain Date: Tue, 27 Sep 2016 19:42:27 +0530 Message-ID: <1474985551-14219-1-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472704915-13112-1-git-send-email-shreyansh.jain@nxp.com> References: <1472704915-13112-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131194591165769976; (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)(7916002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(356003)(8936002)(6916009)(50226002)(2906002)(4326007)(305945005)(2950100002)(7846002)(19580395003)(5003940100001)(8666005)(86362001)(110136003)(626004)(586003)(85426001)(87936001)(5660300001)(189998001)(69596002)(92566002)(105606002)(106466001)(2351001)(229853001)(77096005)(76176999)(97736004)(15395725005)(47776003)(15975445007)(50986999)(36756003)(68736007)(48376002)(50466002)(104016004)(11100500001)(81166006)(81156014)(8676002)(33646002)(7059030)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2226; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC001; 1:00XUEg5VPpxkxarmJY6e7EcgyMLKY6c0FYXuRdOB+UFCzAkJZj5kI0zU4eGvjBD4jzhxGAITHpKmOLo9GKYHeAf2ts8FENwGPwQLdoMqdmFJGGytvfIEQQdwwVaPQAFut/Rli/eAcq+GUz2L+WLxjLuU8xYaes4FrVs00I3iCZw7VR7GBi1jKkB83/S/M3iYgwBb3rbPcehjUwRvstGu1DhHH44loJ4xynyISg79bBfx7QXTeiSVVwseHieMRNxnBM8IOt0AXcxGNTOx1oxObUl7Wr5o7KZT9f03wiWXMWsFLNe6CpLmTneJuqsG9wU4x59P3j/yE1vIaXADEflhYjb01+HzBCh5CcfAgxp1uZpErPaqKgsj4dM2gpBQIug+aYXYN07OxI+a5uZ4QKIYVx7gGYzwgqnI1ejBr7oys+SFpPdSIzrNQDL/unIbZbnGxpwkyTKhZ8AZRx17sHw52QtqufA7TPHTmbkhHZlh6ilupzD8tbGBePwqAFzYdfixewtgh9VUH0nV8SwlRv6q+zptyhGFAX8ynkj0WaDpmvCHw4fMquw46x9xRTMtVRLzFXrRwp2IabilfOTr1x3D2lDPT7wAXVezvG089IDEaOiGegn7H3N4lfJQtMOXJQA7MAXUYVTciK+1QMBKEnuA2bDE0XnvW3v3UAFJGuQfyKW6b674RS4zkdqcMfvTIi5BLNBdhYwyPeS96n9ltmwY+wGjRyHtxJW0F2Lt/4LdACk= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 2c32fc15-88a0-4b40-079b-08d3e6e03d58 X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2226; 2:vJeGs6rWsVEniAfK4a8BQd+vlT7u+Fat5bd8P69gMk2BylpfmZdRWQR1D5F7EEFuyA9Hr1ujtAKvIfpRbin+6DwC0RNhRtKmI4fNSWfwg2uxCCvon8QdujY6d4lnatweB45hJPlJKcZManZdKBacFh09m40d2XEAv7a6KM/FVX6Ar3HJxuHKO3lGksQ7XANS; 3:4NwnoY8+lkP+aUixvYOXcj69o666zU9sQ6CmMplEhSETt0nwHZtYRzVIVcoahWiZFeNkBA1n9WBbfGXG+zc0Qvs1NvQ0YPjA7BBX1BT/UIqdsVjr63voJuwDBcHl9c/stbFyTLVKsKYaos9/ehKVv9n+n/T7h3L3IVzKAY/m/wx6OODpbfBCqe0kNbb/2znexPTiR+wLr84xdAUl7PonwDR6B4O9AFBQSyEBB0Pjwn8= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB2226; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2226; 25:cdpUBjF8ZkophNIant5Doex4cUxFdFIeMrGB+O0j6SWyonm96Ez45LVBNv25zUX9b8KSUnBQvm+PAEDj685zlsFs375CssEvQl72GqGxj2WD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86SAhyEe5eMXtJMyNw6AWVGoMpQK75BilLJOK3aQ1pqyHDZIyr9LXX6y6cimKFu0Mz4sJ4xT8IVld8ewrabuMVaDJXcrXZcxyvgmub5YbZjHV0PZ82fWZ8ZMCiOugoMUicAZC+KvLsgEZ9iu4krPeanishRPbFhkEc2MtN01+uLsUDjwn6DMliOU6fz4bZE2XuVfQtPiRUfy7GxHs23oYgWFDvRVwq4Hen7wi2P/UOJC/usdKzU8zB1RpO1WXeNx/OPcYjnTQsJO+vPKYVrijvddhvO2C5/I1GxxXFWlVoXJWOpnH+WjYsUFj2N1/m68O9g2LEBYTITjms7L+0uoJuNBtuPycfhg2H8ZT+/HIl4MEB5DEQNbSYKMaN4Sp1eUaGLd/JJI4n6bqn4bEo6LEcMAYqsACxnsYahqZiaoUE/c4GrCp6x2+huVeHx89JxYSx1x/Xyz9XJgWy X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13017025)(13018025)(13015025)(13023025)(13024025)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:BN3PR03MB2226; BCL:0; PCL:0; RULEID:(400006); SRVR:BN3PR03MB2226; X-Forefront-PRVS: 007814487B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2226; 23:ZMiuHB84p1qxdE2ld7l9GVO0iCgZjWwIbhMNazd2h?= =?us-ascii?Q?8mnlpHDSWfrS6JPHJzR1GRQ7I/48AWfvrlx8kX4tNLh5SUFJYe31tv/jfp3Z?= =?us-ascii?Q?N0TL806/zxEoqDiD1Rd5Y/IO7Y0UhyRxTy080PMoZk5mIHJusYvzkjvC8FWg?= =?us-ascii?Q?EY1Lem5qQ4FiWHBb8m/4soKg/5x3l9dHJoMDaYZqEYBIszvLt5yJBW3KpC35?= =?us-ascii?Q?F+a76hNZHqVwGAC/bzjo66aqT5fzwmVTon22VWXK/CoErRa2kyj5V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1YmK9it8sCA7Nf1zU4tO+LaJ0if59E SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2016 14:11:56.3586 (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: BN3PR03MB2226 Subject: [dpdk-dev] [PATCH v1 0/4] Generalize PCI specific EAL function/structures X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 14:11:59 -0000 (I rebased these over HEAD 7b3c4f3) These patches were initially part of Jan's original series on SoC Framework ([1],[2]). An update to that series, without these patches, was posted here [3]. Main motivation for these is aim of introducing a non-PCI centric subsystem in EAL. As of now the first usecase is SoC, but not limited to it. 4 patches in this series are independent of each other, as well as SoC framework. All these focus on generalizing some structure or functions present with the PCI specific code to EAL Common area (or splitting a function to be more userful). - 0001: move the rte_kernel_driver enum from rte_pci to rte_dev. As of now this structure is embedded in rte_pci_device, but, going ahead it can be part of other rte_xxx_device structures. Either way, it has no impact on PCI. - 0002: Functions pci_map_resource/pci_unmap_resource are moved to EAL common as rte_eal_map_resource/rte_eal_unmap_resource, respectively. - 0003: Split the pci_unbind_kernel_driver into two, still working on the PCI BDF sysfs layout, first handles the file path (and validations) and second does the actual unbind. The second part might be useful in case of non-PCI layouts. - 0004: Move pci_get_kernel_driver_by_path to rte_eal_get_kernel_driver_by_path in EAL common. This function is generic for any sysfs compliant driver and can be re-used by other non-PCI subsystem. Changes since v0 [4]: - Fix for checkpatch and check-git-log - Fix missing include in patch 0001 - Drop patch 2 for splitting sysfs into a sub-function taking file handle. This patch doesn't really fit into the model of PCI->EAL movement of generic functions which other patches relate to. Also, taking cue from review comment [5], it might not have a viable use-case as of now. [1] http://dpdk.org/ml/archives/dev/2016-January/030915.html [2] http://www.dpdk.org/ml/archives/dev/2016-May/038486.html [3] http://dpdk.org/ml/archives/dev/2016-August/045993.html [4] http://dpdk.org/ml/archives/dev/2016-September/046035.html [5] http://dpdk.org/ml/archives/dev/2016-September/046041.html Jan Viktorin (4): eal: generalize PCI kernel driver enum to EAL eal: generalize PCI map/unmap resource to EAL eal/linux: generalize PCI kernel unbinding driver to EAL eal/linux: generalize PCI kernel driver extraction to EAL lib/librte_eal/bsdapp/eal/eal_pci.c | 2 +- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 8 ++++ lib/librte_eal/common/eal_common_dev.c | 39 ++++++++++++++++ lib/librte_eal/common/eal_common_pci.c | 39 ---------------- lib/librte_eal/common/eal_common_pci_uio.c | 16 ++++--- lib/librte_eal/common/eal_private.h | 27 +++++++++++ lib/librte_eal/common/include/rte_dev.h | 44 ++++++++++++++++++ lib/librte_eal/common/include/rte_pci.h | 42 +---------------- lib/librte_eal/linuxapp/eal/eal.c | 55 ++++++++++++++++++++++ lib/librte_eal/linuxapp/eal/eal_pci.c | 62 ++++--------------------- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 2 +- lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 5 +- lib/librte_eal/linuxapp/eal/rte_eal_version.map | 8 ++++ 13 files changed, 205 insertions(+), 144 deletions(-) -- 2.7.4