From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0054.outbound.protection.outlook.com [104.47.37.54]) by dpdk.org (Postfix) with ESMTP id ACF2858D8 for ; Fri, 14 Oct 2016 12:54:15 +0200 (CEST) Received: from DM5PR03CA0014.namprd03.prod.outlook.com (10.175.104.24) by BY2PR03MB330.namprd03.prod.outlook.com (10.141.139.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.12; Fri, 14 Oct 2016 10:54:13 +0000 Received: from BN1BFFO11FD034.protection.gbl (2a01:111:f400:7c10::1:105) by DM5PR03CA0014.outlook.office365.com (2603:10b6:3:118::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.649.16 via Frontend Transport; Fri, 14 Oct 2016 10:54:13 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) 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.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD034.mail.protection.outlook.com (10.58.144.97) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.629.5 via Frontend Transport; Fri, 14 Oct 2016 10:54:12 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u9EAs934011436; Fri, 14 Oct 2016 03:54:10 -0700 From: Shreyansh Jain To: CC: , , , Shreyansh Jain Date: Fri, 14 Oct 2016 16:25:23 +0530 Message-ID: <1476442527-30726-1-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474985551-14219-1-git-send-email-shreyansh.jain@nxp.com> References: <1474985551-14219-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131209160528830718; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(19580395003)(356003)(48376002)(8676002)(229853001)(81166006)(2351001)(77096005)(97736004)(110136003)(15975445007)(8666005)(305945005)(68736007)(81156014)(189998001)(47776003)(50226002)(85426001)(86362001)(33646002)(8936002)(7846002)(87936001)(105606002)(92566002)(50986999)(5003940100001)(76176999)(586003)(626004)(4326007)(36756003)(11100500001)(2906002)(106466001)(6916009)(2950100002)(5660300001)(104016004)(15395725005)(50466002)(6666003)(7059030)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR03MB330; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD034; 1:bDcg4A0EDTWffc1PcE2hDBi2WtIQfNqaTLlT3zFpcUOrLTuNJl/xFUvFvyceF3JvsBP6V2BKerT0qe7F+iwVoxiu+jPukNXDqQoT1F2g+Zzeu/ZWE/iHyaIQGAwMixbQ6n5Ry2r4w7XKWwCH+XDeMqyAOTuD38QpYI50PBxm95oQDJSaMewBRSTsmLscXkLa3ISP2iziVpN2th8fiCkufTBJr2Xd6e9CFgx8u7WGZ9jz/fkcfR9XrIf0gjl9floyoyZonTuzJenVdlchihXQo92U9HY/dwgsfyc3Y8yD0+WZPRDMu9/ejBkJCjMMfPnhh/KQnsFbT4KhMZ4d2EJnYji+Dji+OL9P23bWJ49bAO7HrJqXflYtFh3qBEgCCrQQp7Gze/1w9yKcgc9NVoQEpQiE+wOTpW3ui6Yq88OIdTF1q+ovq+zahjdLWE3zjqbHZMlVoLIlmnTlYagQFBO47jO4Aj0aec13mY9itHfqACu8fk0E8JY0tZQtG6d/0Qw07tLld58kDhAw46BuhY8L4qKdW2bbIyauhOlvqjdl+ggqGyys9p/LQlbgV7weoba9jk2zUas5xn1VWlgwj5sJzbwTN3cXcnihpVBP74I5oFN73IkMzBMqI5TuNJa6sR+IdIp6wicvh46meSQoTE4Ftq1JWT1Qs5KzhR+aAEm2BoDNZI/CTvsVpIOuaciDF/s1hkUJT8lYU2ILiUZrFbv2nJ85SrA3kQdVP/sb2JToolI= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 1d875580-0325-4872-20fe-08d3f4206f10 X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB330; 2:nksorv6SeuCXmctsHuGP8WmLsW61gqzVw57DMJIkutsuq+EA33GreEbctyiNbGTGcc2rskXjzWKKLnQJOCH/44ob+dqGjFc1waygejd3VkbESHLF5mg0JjN3ZzCNgtk27R7Kb8R8amYlEN40Z+gd9K8Ap1LC2srrxN1IcnaTL4Z+PAAw58tBwcfC8zfi3+teDitwLV2jcgeOZj+lO66m7A==; 3:MQsIUUyHh4w1zMb4jI9exUiG4WUWtIMT6Ww64EJR9vhljmHNo89w9q/W3CedtQ/GsqJeVZ8MJ/a44r3eaJ7I4YEsDllyjbQ7Yr4sWb4XtP9lZ7RkNKRyFAhtK89PT7hPe/H+u+M5cCwF69zD8hOQEEpsyraCJ4qHA0a1/xADVNfThLD1dKoq+KPpxsxjJYLMK1vHCZDFH1lcO506erxzjYYAVyqsfUpQEXQvqUkbPSbkeH14YzXX3KxXiuct/rv5 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB330; X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB330; 25:yDhg4rbtxsKWJ5IVq228MthK+6eMGqjd4YHPYrMao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ATcA6QVJW7Rr6OSSnf6VZru7VEgpAlEIKhyn+UUOEJ1tpAaL7b1SY3kNgvvw1fZLolWz1xdaj3e5XsYzoEbYE68XKVXdYqlH1PJF7kXvlg=; 4:ts0faNTaebM0KeYgGD0aMUFUL4bb0RyfUZ0aosIFL1krEKrkz9LsWX4giHrRepEvewIoGvzlYdBa9wd2WmSnInO5A4Rm/XHJ1ua+87yUXCF8py8wVQ3ZbX62Eh+O55pgw2TpKQgZxKJbCLFHH4LrfOlhfxSi8LlaOsEEnbGWH9RBmmslVEnrPaZHjeee4UDQtrdHwW5ZayrecsMfD/0YnY7TdgLYZ8xDpNXlzsAjiaeiIQ11D8tq5yGvFHYPxzav00FE0sWhCBBlhyhGVuEAcfsLLjuhIaGssYaBbGtaiszqiFfhm+y2hU7LC7ycCHrlm+kFJ71BEjrZlBehsS27XIV+9+GM6XzpL/DiUFbH7jTwrgwGCPDoUU4P096TsllrgzeNl0sb9LP6sq/NXTrhaAbDFNEidb6aHoGpZ3zY2a5AAah0ocJRGJasxy/DPE+kxLufOZg4dVItblqKaRcLfpacww41EZCwLLHEXUB5Ay2BX5fX/j0Ldja7maRK9fslIvWkYbjFXk8iKj/3GIMttQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13024025)(8121501046)(13023025)(13017025)(13018025)(13015025)(5005006)(10201501046)(3002001)(6055026); SRVR:BY2PR03MB330; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR03MB330; X-Forefront-PRVS: 0095BCF226 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR03MB330; 23:446/XxI8TkWOus2iSBUlsUdf5f+h8mXZ2IBLAny9sv?= =?us-ascii?Q?hZQOWDBq5etdHW/5i6HJBgecq3TKk3ALlAHiEZV+qDLm6xEnA2HBrH1ZWtiy?= =?us-ascii?Q?i04zlhR4IIWSDEZi+0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b?= =?us-ascii?Q?OQmJWjGHdrH1K9pND/dj+KzSL3n6B8tfaEkfeAkPvByG3qEbtScl8XDD+MFE?= =?us-ascii?Q?kVNfTUGdQOgAfxBkq+ZIqB+vM0tm1iSM3TPmRLzqOLSi273fx2NYBvTVuyEd?= =?us-ascii?Q?bD/4f1PXZg/MtVSR1fgkHnqqnlZzg0ZUrRAWyrzAMAVBRrpnXobO2Ef0nDRD?= =?us-ascii?Q?ZftAtOJ8rOWD74IMb0og783I5tzLZZesz/fTpoIMGlmGSgadgIedjxHexvlD?= =?us-ascii?Q?jvu7DQiu+rpnwph9GtY6Qyotw2wwLZyT0fTnIH?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB330; 6:RnH+4XmP/W6wvPlRjGBJniUbKfaVgZM9yAZk6vCcN9+LlS3b0ne31ii75kXo4tUXpOK5zSFj6upoZP8k5LoLo3s6LfwEUheE0VmPP1XnuWmMRJ4hdo81OdNykyOgHoixjsr0995WbCct0BA3AaQtCnpqz+9JvU4Ioid24GGhZ4FcvRl6zOaJ2hynGuoCorr5XhElQdvsqDxdh8hZ5hfSyDNwV1LZ011oysqOahHjR9K4w5nwdEWXW2tWjwjkIWMPN9NNyNsqDrmYw6iHz968SgZxh+rZc3JnXX2Z0dEcsMx23APYfr1xUDeQCkw4AVFQ; 5:ztlE8J77Mg8t4bt9AKggWFg2Jxy1Oogz1hMEG2rUulnS49BWOffWZCO3myc2C/cHqLwU1dXMM0eq9jSZ5Hygmov6U2pc7WGloyE1e2GG2vpSnQi+vhXM/eylbkzrtaal05Cj2NkGhHfWOus2vfYXSiSvOc5gDWhYRXkW0IrFVrt77pAxonaaNaJ5KNek7ndX; 24:22K1G8sl/aoG7lE61k5644kM+r8SlmLBu33ZF4tvnnUcvP6LaxdYNb624ffwZmF6XqnzeRFDxwFWMmR24pwufGU4kZJG21uRvCHwdaowWRA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB330; 7:zgh1l5+x6EJYJX5fUaiRG7HnVCXGc5UapnQdYG6Ih1gGDdX9pIyJJ84K/f+2MC1QX/2bAUamYcTt39MwwqkjhYTdBrqYWKdi6Hkqt6DoH0VwTOowdYN8Ai3sJxQZhlNGX4k/IjW3NhqgcsL3B4TLgy2BBKsdMTd+hMwlV2SFh7GON+usymNlQTKWexdfT7FNS93kNr+2S1uYlBitEC1OjTlDKzQOXDrFziNu/T6ZImJzIsv9aLhm3ZaUt4ZlOA8E7GDLLpP+pW6qgp7f3OLiaFIVrm5/Y5SvsrvNDZJlf3I7PDHj4CVaTfZB5JkGdfME18aGQAKjxM1fh+t7pyKShVl2FHOYr/kQ0PAIzYy6WiA= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2016 10:54:12.6958 (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.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB330 Subject: [dpdk-dev] [PATCH v2 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: Fri, 14 Oct 2016 10:54:16 -0000 (Rebased these over HEAD fed622dfd) 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. -- This is useful for other subsystem, parallel to PCI, which require | MMAP support. `- an equivalent NOTSUP function for BSD has been added in v1 - 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. `- an equivalent NOTSUP function for BSD has been added in v1 Changes since v1 - Rebased over master (fed622dfd) - Added dummy functions for BSD for unbind and kernel driver fetch functions (patches 003, 004) 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.c | 14 ++++++ lib/librte_eal/bsdapp/eal/eal_pci.c | 6 +-- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 2 + 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 | 41 ---------------- 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 | 2 + 14 files changed, 208 insertions(+), 146 deletions(-) -- 2.7.4