From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0044.outbound.protection.outlook.com [104.47.34.44]) by dpdk.org (Postfix) with ESMTP id D29D4379B for ; Thu, 1 Sep 2016 06:42:13 +0200 (CEST) Received: from BN6PR03CA0030.namprd03.prod.outlook.com (10.175.124.16) by MWHPR03MB2445.namprd03.prod.outlook.com (10.169.200.139) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.13; Thu, 1 Sep 2016 04:42:12 +0000 Received: from BN1BFFO11FD026.protection.gbl (2a01:111:f400:7c10::1:175) by BN6PR03CA0030.outlook.office365.com (2603:10b6:404:10c::16) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9 via Frontend Transport; Thu, 1 Sep 2016 04:42:12 +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 BN1BFFO11FD026.mail.protection.outlook.com (10.58.144.89) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.587.6 via Frontend Transport; Thu, 1 Sep 2016 04:42:11 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u814g8Qw029498; Wed, 31 Aug 2016 21:42:09 -0700 From: Shreyansh Jain To: , CC: , Shreyansh Jain Date: Thu, 1 Sep 2016 10:11:50 +0530 Message-ID: <1472704915-13112-1-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131171785320856598; (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)(199003)(189002)(105606002)(50466002)(4326007)(92566002)(626004)(2906002)(189998001)(50226002)(86362001)(81156014)(81166006)(8676002)(47776003)(8936002)(68736007)(87936001)(7846002)(8666005)(356003)(106466001)(48376002)(305945005)(19580395003)(19580405001)(586003)(5003940100001)(5660300001)(85426001)(33646002)(77096005)(36756003)(5001770100001)(104016004)(15975445007)(97736004)(50986999)(69596002)(11100500001)(229853001)(15395725005)(7059030)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2445; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD026; 1:qZ60LL+ZYn0OiKUqODyBFQmtII9y3X/S6Q1U8reyEoVbqwMCRCQw8MvluJcm/URTRN3r8Hm0BHi8viABPPNgn+mTRuvpuL1w3uyM1KoeaDAAPN2eT+tD8mQAe6/9bvHICtRcjznZFpqdM/2PcLojxipJ/Efl4DKHoLghKWxsqNOSjrAziQznx+eS4SbqB2U5A8QnBH9JYxMwiLNr4TKzBeMsCiPbNHHgm/l0CVbAVgXP+aNKvb53Cl9NlhKZ47gH0niU08V7dezLXAuZf2elATA/v5DXpZo0rpuHU8KRH9XRSmibAo0VGwT5wBXuDcbdCFonwlAZU/2uP9AcMswhtDNfHiPnmlb3NCREoSLEhvJp1NbsNCH88qp9L2SoUCNAtalzM+B4KOQcubzjl0ShVRUACUoC0y6vWpoifabBH/LhJFXDE73BUnAyeZuFwoQrrWAoLHsmvhv1Rzbp7ZkjoaZ2ySn0b/8HPw/1mtLsEt0PpQQ9XWj7vejdycfpgehrTBfDbqJnEXn1H+nUHgq+MMrvXOKfCCFIa4A1XK9QexE4tFtMD6i/0lpwBw3W/DdnKqV9SbrDFxxyx7gleE2pU/YJAyMmXfwaJdaWRvP0IFWLnbe7SyjUw8+JnUftgknaowymP0f73DwYgXEfkVCYI/O3GiE4JEOX3CEU5FVHucUqnXx2C7aDPvviGwcRixc/nN6QPhuKg+Sk6i4HncaLlmGBc2gzMNEkIrBW+NsiWiI= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 06e2bf8f-7598-4584-7c16-08d3d2225711 X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2445; 2:UYGOgZYZlJEau/KaYbz4/q+2dF2Sq2UDWOS10A6i1TuTK3nHOJM6s1f2/PSQtNRAxNfv08DyXWh+E+2ie7jJWx+3OvM4frvsLnVWQUlCqgmqL1ZPdHNrMhOy00LXK7NuZLWSxzN1Ju5vWjFXSd9kU39+a8NXZtTLQ4jZKcSBDTrIeX3gQxnYnsOdsCqvQB5M; 3:2/PGTdZ/HAdjZNGMJpsB5JLT84uRUQjJo+VcEo7EI8Zr3gw7UknV19H/3u2YLd8z+TfTPadlWzzChqeUEXDUR+oWe3s8wnLOliomaWpYdmGuSvGD1HPBC8R6AXDqVjkvsAAQIXbHbgJr5ebF4y30avLRxEDDBK0Fp3+wVgKuuBQUmhjLQWiRv4SeKn6Y9U/Za3fpM0maf1LRi0/4cV9xyicOXRrmQ3DUX2iB5J++0oI= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:MWHPR03MB2445; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2445; 25:daIrIg8FCSAeDFL08xAPaN8k0IrMLH0Tc8eU9iN6A7QIMP3fFLGSC6RwuutUUOYVdQO+S7krVy+hq0NYdx90vvF0V1o3QLaqSTp+GEtjMufQHLHPjAEx5o2pBX6kTXYBF4JwpxoyA2A5pBw+rADVMdpnOReXLMx4zxrzaeQ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P3daWfAtCimYW1zxJROmZEWu3AaudbZ5vGPsIjsp1XA1Ok+ABaHluUXXh7V4PLBTPgrKEalpX8Hv4/3R7s4fvWfZxwniGu5lZgymy9j7dPaNbbitB3EHNv8CFTJ/9MIgQwg+wd2wvPIrQ4Z6+yDAAKG5OHgJBUvdtiN1du/pYCS/rRv7zSASKbRALIxXKTJxlACyAKjUjl07TOCtdq6wb86lAaf5mjPCSOIOhZPnVgoJ+VXgV6QcQ2Y3SSiJjJ8+HKp3zl1QKPnqUx0Yl+OCc5KZyWI68PUS2FOlqZABlnNAczckCxuQmBdLwpCcRd8TFP81SRotVsiPDixUi5j6O/GouNVutziUD59g9V25LYyvfD068Xbg5DZz5rp X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(13015025)(13017025)(13024025)(13023025)(13018025)(10201501046)(3002001)(6055026); SRVR:MWHPR03MB2445; BCL:0; PCL:0; RULEID:(400006); SRVR:MWHPR03MB2445; X-Forefront-PRVS: 0052308DC6 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2445; 23:mrc19mxMiXuD2YKM8tJh6untZ7K5hN2uqm1C4DFKG?= =?us-ascii?Q?NokNgr6VuPgWeq8j7f0h4npCZFk6SQ4o+TQqsCSwxyfIXbwqw2joe0bMG1VL?= =?us-ascii?Q?Re5giIKFynpc+seiOZivdYeezPJ1i1b8d2H1XJaMzUn3PR+Bly2cfkN6dRf3?= =?us-ascii?Q?0ken0fgGmKEAsx6GqmvOcs6LUEF5+qI7jfnF07t19ejRiu7zjEDsOmVCReVB?= =?us-ascii?Q?/Vj9zrgAzfHUFMO/AQM+/ZdzcjAtG0kTXGVd+4qPzgUcw30L8r3XV6nDVPQD?= =?us-ascii?Q?AsH0mGOPERczW4JpQGo1zqqENhzByh9qaKiWiXakTw00Zo2SeszbjeAUeh2F?= =?us-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O1fMsY14MywPnUrnV0PsgQ=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2445; 6:PTJO2W7/cNWHxshUBmBTcd8+dF2WKRZfJfIv72tN+AXNknn43VqX6gUL2t+b9/60wBmGyVzdpnhpeMBFFZMFKDSmO6g0gFM7MC/qe78ElWJjuJ6cL92p67jdcbml3VkFY6bS0AQqJCfFAnzJBrJtavcHHQGghIElRxtbJMFNVvZB+/f4X3JrHeWu0yxczfVVXRNphvIjYfhtf3bCsjH4ta7I3NJXDgK1nHmvbviETuOxsAVuS7wPcd1nY4OlqEfZmxhD5fgLgqvnZUw9uPGTWLbiuHyA+Ue2ZSJZ10m7BD0=; 5:QQEcTfBdDn2sRM5e1mds/p0m2uisjB7bX9tfwL0/MaYZY1aIpr/0pl2V/nfjiAyPHbMBjMWYDeX3062Yq0clLbcWi+z5noDY/6+YsjuBBE43tZ/f13LfLgCT4oSbkj7sFqrk0FWCde0r8WEdy0t0bPZOsKa1typmWK3rQ0qik6E=; 24:h2Oy8SIJQcIUgJkQRPucjsRQ6a2JfOp7jejy9ozrTEyJ+kr9CwkuMumD9tSEvu4WUe2VKtEAR+7qmVRL07JxgMfaJlVk/eeWvwsQH6Wzh6Q=; 7:mdhHrO+wiZoLYrH1Z0b8pKhPelwBYDS2TaXSnJLK9qjazHp0M8IG5X/ZVokh1FuWxsS4Rpa/8dlhN5NsVXqQIpNPm/uqpTos/8YP4QRgofNPJCPXwELnYV7czQRz4wl1eZQX9S7at83Ko/MQg3zhObkUnS1K9V3tPWro7KgdZmkuDt2mHqy8PK/xnV2DyowAlUiy9RprGKmoz/PZMrM9pLuMhdOmoY5WoBCeDC7VFh2lwIeLIlw7bXpCsO47QuB4 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2016 04:42:11.8516 (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: MWHPR03MB2445 Subject: [dpdk-dev] [PATCH 0/5] 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: Thu, 01 Sep 2016 04:42:14 -0000 From: Jan Viktorin (I rebased these over HEAD e228563) 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 by me 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. 5 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: eal_parse_sysfs_value function has been split into two, one accepting filename and other working on a file object. This is helpful if multiple calls to this are made from EAL - that way infra can maintain a file object. - 0003: Functions pci_map_resource/pci_unmap_resource are moved to EAL common as rte_eal_map_resource/rte_eal_unmap_resource, respectively. - 0004: 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. - 0005: 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. If need be, I can propose them as 5 separate patches - but I think clubbing them together makes more sense (these are loosely related). [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 Jan Viktorin (5): eal: make enum rte_kernel_driver non-PCI specific eal: extract function eal_parse_sysfs_valuef eal: Convert pci_(un)map_resource to rte_eal_(un)map_resource eal/linux: extract function rte_eal_unbind_kernel_driver eal/linux: extract function rte_eal_get_kernel_driver_by_path 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_filesystem.h | 5 ++ 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 | 91 ++++++++++++++++++++++--- 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 +++ 14 files changed, 234 insertions(+), 155 deletions(-) -- 2.7.4