From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0062.outbound.protection.outlook.com [104.47.37.62]) by dpdk.org (Postfix) with ESMTP id 73E031B19A for ; Mon, 18 Sep 2017 13:42:30 +0200 (CEST) Received: from BLUPR0301CA0019.namprd03.prod.outlook.com (10.162.113.157) by CY1PR03MB2361.namprd03.prod.outlook.com (10.166.207.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Mon, 18 Sep 2017 11:42:29 +0000 Received: from BY2FFO11FD009.protection.gbl (2a01:111:f400:7c0c::108) by BLUPR0301CA0019.outlook.office365.com (2a01:111:e400:5259::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.9 via Frontend Transport; Mon, 18 Sep 2017 11:42:28 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=fail action=none header.from=nxp.com; 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 BY2FFO11FD009.mail.protection.outlook.com (10.1.14.73) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.35.14 via Frontend Transport; Mon, 18 Sep 2017 11:42:28 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v8IBgPmU010756; Mon, 18 Sep 2017 04:42:26 -0700 To: Gaetan Rivet References: <618e47fbcfbc9ead4c009f0456faab563f22a426.1505726803.git.gaetan.rivet@6wind.com> CC: From: Shreyansh Jain Message-ID: <88d7466f-8c93-b97c-48d9-fb7bab7e7f77@nxp.com> Date: Mon, 18 Sep 2017 17:23:23 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <618e47fbcfbc9ead4c009f0456faab563f22a426.1505726803.git.gaetan.rivet@6wind.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131502085482990179; (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)(336005)(346002)(39380400002)(376002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199003)(24454002)(377454003)(189002)(76176999)(50986999)(8936002)(65806001)(54356999)(230700001)(50466002)(65956001)(65826007)(47776003)(104016004)(8676002)(81156014)(81166006)(5660300001)(106466001)(2906002)(36756003)(33646002)(498600001)(77096006)(105606002)(23676002)(64126003)(31696002)(316002)(229853002)(53936002)(58126008)(305945005)(356003)(83506001)(31686004)(97736004)(6916009)(6246003)(110136004)(85426001)(68736007)(2950100002)(86362001)(189998001)(6666003)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2361; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD009; 1:DCX/ZBopCXNmUA52guchjFdvcKQbY92UWceoS7ggdsuZYoWT96GBayxKrxDFBKkwNf5twppmTGTI1fb6nNwOXFBwjkbqW2kSkGMeskfrNc6TTQU1gMVBAnLKP5s19OqR X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3649fd3b-618f-4507-ca63-08d4fe8a56e6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR03MB2361; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2361; 3:VCJBu16wXWqv+XLL/+RarGhveJy9Hn71ADWmB9iXHFNoFalIVgRWD6PbeRpGWMDaGmtXGBUK8GbdU+OKYQp969Rjy6hCcAJnPrXRavOLAD2D1rRCFEtZwQAXTRZY4LH8kXfRiPKl5j4Um1cYf10bPIjKEC0rBoCNcuudkecJYSfLK1zboJygxyNPcgzhJ2o56rc0wdYhe5rXzANpVQ1/4Y7M30AJd/ScvxQgs/IyrjnIe2EcvA8myMDZRplIOAI15h5tRR0yLRnWPFdLQmR9DY+oxMHRkFSDqTWIEF5NZWeEzgXGDxvpeIVaa879OWPQvjgQYaVwpr5vr3X6xMQD43zKZaftK0ZhOxqb3gft24U=; 25:FLHQQFGu/U3R9vSzjH1ym84ejiCqwEWYKhQrSvHP+LlFLB8dtfNY4K00PMMnfJWvQnKJH8Ble3YRTs8kEcXxXSQL+SiBN1+RB9nJ2j+E7lpMSnXfSFKW5XU1XwQYvgLuwneBT27f42OGVPSVvDQVMTBERZxWO62jWTlY6ct6Q3GAcAKUKZK1V3XfY6wwQmylZgTA6eNqrx94KeDSetHu8rzTWblCfvUEEk4TsxXPUtvfDOQcc8ZOv0GRo9E8ha4pkmafYmBwVxh90EGMEQ/KlUe+C1odnIQ0TmnOevBfuqJZcNc76C/XxBoqMq4nPxhQr4iKVRO/IPFPM91+tm1YSA== X-MS-TrafficTypeDiagnostic: CY1PR03MB2361: X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2361; 31:J+pd01byf2lZe3ETsk3S0vZJsBSsUURou+DnHlouVd99sVBYetx/mNuRMuKWD34ynlt7D/EInayGCPBR9LJbIb7/hIOFDHmk/vNFj1xsWSr9CDI9hiUB2xLUunTyrUwFMK19vyDciMEuAykMiPrEThsJQkHkfj5kYk6mR1Hpj7cA4jTSxGmjEVPbkmtsVuj8cK5OvuiqLgITExs2icZwtkHUTNxuZrkPcr2Gr6NI35Q=; 4:AbOakrRle6CwGnKYdLtq/fEjQDSLbvlHn8y1h66cbpaxUb+4cprxYvfRJJaPQX4C0HsFkYSktX7ZK9NyF26Ip7Wq0BTYKNWuuYXFC3qjcxs78eP+Ek+WMxREoMB0Evi+Ml2H0AEnDZSZLUC2T27NxGfI+5r4XL9tYGeISBj2M4WZlNPxNVMr4ql14c+cTXYExEOAUltB3QrnKTUoDtxIeZTC70FCl40gH76/trB8NAAkjw8cXYc0H64FvJtBpBFgP6zzkjGPKiJRnCYCYo1bxr/3Wvz2CoUrxf5Ip2bTT84= X-Exchange-Antispam-Report-Test: UriScan:(131327999870524); 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)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123563025)(20161123565025)(20161123561025)(20161123559100)(20161123556025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR03MB2361; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR03MB2361; X-Forefront-PRVS: 04347F8039 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjAzTUIyMzYxOzIzOjlpV3Z0cXAvaFlHNVg2cE9qUTFKOTNXT0Ix?= =?utf-8?B?RGNRcGZ3bDZKUXJjN21tWkFlQ3dubS9ma2xHZkNQUFRyVU9TSTRQR1lMSm5F?= =?utf-8?B?OHFvSWZLSUJQcml0c2MxNDlYODRiYlhnQmlTUXZuZ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aC5AVIG5/KDxCfCULgrQPTa/6jDYTjHd8EH6Nty/zvc6EOcTlbcymt1Tere4L9UIE6qAWFMTFQ8tfv9VkTBPIA23VGP699+kv0vg+ayhJM8jTTDIiwRSHZUKuXVTrkHsHAhmjCV4u8zcJEQAHGxCaHLzb5PZtJcvcR1uG4v6CIOODn68U2D+be4yW8DTaAIW8Q/R7LTCc2MEkVqVJuGAwRm1IqM/PVaEy85J9hn1hqJYZ4jFeIQ766w==; 5:Uzwelq5vfu7xDXx8jSF5PzzndEWHiKx4WzrMdHEgsqU611i4hBiwCLdrsCp+b4p13YOVwnCMyvkzpNkfoqrW2V2cdyi0U8EitRoeDMuq69J76DJlrRHaMzMI2zudGIalVNXqul1RIEeT35X54KWdjg==; 24:XaeOs7cwWd5teYlHmGxCk0h+FvnAqQuaZZzqSrsp2yBq7BJ9b+vOJuFTyGnmGSSf6mfxg1MC/cl2gG6GnnpzNn0DqwngcdJjDW+Z9QryWW4=; 7:dopDYrTXbc0cMknLonI6gdxKU1PeCxehBtLO6/uaLXBDeYF1zsV2azJz7Fo0VdH2n7zDyEX/AtlGkHVitoES/qvX1ZwADgqvLGI1FT6Mg+bX2nVhlzY0RL82D/Z35fijOypdamGvwQjmCtXaxDCqfoMA8CK7Bi4gMngz3p29rpA1YwAZuJ58rjOok149sXnRTysrBXF/BNoqnGsYLvPkYCw0RSCYgiGRbBmS/POm3kg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2017 11:42:28.1118 (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: CY1PR03MB2361 Subject: Re: [dpdk-dev] [PATCH v2 05/14] pci: introduce PCI lib and bus 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: Mon, 18 Sep 2017 11:42:31 -0000 Hello Gaetan, On Monday 18 September 2017 03:01 PM, Gaetan Rivet wrote: > The PCI lib defines the types and methods allowing to use PCI elements. > > The PCI bus implements a bus driver for PCI devices by constructing > rte_bus elements using the PCI lib. > > Move the relevant code out of the EAL to their expected place. > > Signed-off-by: Gaetan Rivet > --- > config/common_base | 10 + > drivers/bus/Makefile | 2 + > drivers/bus/pci/Makefile | 59 ++ > drivers/bus/pci/bsd/Makefile | 32 ++ > drivers/bus/pci/bsd/rte_pci.c | 670 ++++++++++++++++++++++ > drivers/bus/pci/include/rte_bus_pci.h | 387 +++++++++++++ > drivers/bus/pci/linux/Makefile | 37 ++ > drivers/bus/pci/linux/rte_pci.c | 722 ++++++++++++++++++++++++ > drivers/bus/pci/linux/rte_pci_init.h | 97 ++++ > drivers/bus/pci/linux/rte_pci_uio.c | 567 +++++++++++++++++++ > drivers/bus/pci/linux/rte_pci_vfio.c | 674 ++++++++++++++++++++++ > drivers/bus/pci/linux/rte_vfio_mp_sync.c | 424 ++++++++++++++ > drivers/bus/pci/private.h | 173 ++++++ > drivers/bus/pci/rte_bus_pci_version.map | 21 + > drivers/bus/pci/rte_pci_common.c | 542 ++++++++++++++++++ > drivers/bus/pci/rte_pci_common_uio.c | 234 ++++++++ > lib/Makefile | 2 + > lib/librte_eal/bsdapp/eal/Makefile | 3 - > lib/librte_eal/bsdapp/eal/eal_pci.c | 670 ---------------------- > lib/librte_eal/bsdapp/eal/rte_eal_version.map | 15 - > lib/librte_eal/common/Makefile | 2 +- > lib/librte_eal/common/eal_common_pci.c | 580 ------------------- > lib/librte_eal/common/eal_common_pci_uio.c | 233 -------- > lib/librte_eal/common/include/rte_pci.h | 598 -------------------- > lib/librte_eal/linuxapp/eal/Makefile | 10 - > lib/librte_eal/linuxapp/eal/eal_pci.c | 722 ------------------------ > lib/librte_eal/linuxapp/eal/eal_pci_init.h | 97 ---- > lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 567 ------------------- > lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 674 ---------------------- > lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c | 424 -------------- > lib/librte_eal/linuxapp/eal/rte_eal_version.map | 15 - > lib/librte_ether/rte_ethdev.h | 2 - > lib/librte_pci/Makefile | 48 ++ > lib/librte_pci/include/rte_pci.h | 279 +++++++++ > lib/librte_pci/rte_pci.c | 92 +++ > lib/librte_pci/rte_pci_version.map | 8 + > mk/rte.app.mk | 3 + > 37 files changed, 5084 insertions(+), 4611 deletions(-) > create mode 100644 drivers/bus/pci/Makefile > create mode 100644 drivers/bus/pci/bsd/Makefile > create mode 100644 drivers/bus/pci/bsd/rte_pci.c > create mode 100644 drivers/bus/pci/include/rte_bus_pci.h > create mode 100644 drivers/bus/pci/linux/Makefile > create mode 100644 drivers/bus/pci/linux/rte_pci.c > create mode 100644 drivers/bus/pci/linux/rte_pci_init.h > create mode 100644 drivers/bus/pci/linux/rte_pci_uio.c > create mode 100644 drivers/bus/pci/linux/rte_pci_vfio.c > create mode 100644 drivers/bus/pci/linux/rte_vfio_mp_sync.c > create mode 100644 drivers/bus/pci/private.h > create mode 100644 drivers/bus/pci/rte_bus_pci_version.map > create mode 100644 drivers/bus/pci/rte_pci_common.c > create mode 100644 drivers/bus/pci/rte_pci_common_uio.c > delete mode 100644 lib/librte_eal/bsdapp/eal/eal_pci.c > delete mode 100644 lib/librte_eal/common/eal_common_pci.c > delete mode 100644 lib/librte_eal/common/eal_common_pci_uio.c > delete mode 100644 lib/librte_eal/common/include/rte_pci.h > delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci.c > delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_init.h > delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_uio.c > delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > delete mode 100644 lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c > create mode 100644 lib/librte_pci/Makefile > create mode 100644 lib/librte_pci/include/rte_pci.h > create mode 100644 lib/librte_pci/rte_pci.c > create mode 100644 lib/librte_pci/rte_pci_version.map > > +#endif /* _PCI_PRIVATE_H_ */ > diff --git a/drivers/bus/pci/rte_bus_pci_version.map b/drivers/bus/pci/rte_bus_pci_version.map > new file mode 100644 > index 0000000..eca49e9 > --- /dev/null > +++ b/drivers/bus/pci/rte_bus_pci_version.map > @@ -0,0 +1,21 @@ > +DPDK_17.08 { You might want to bump this to 17.11. > + global: > + > + rte_pci_detach; > + rte_pci_dump; > + rte_pci_ioport_map; > + rte_pci_ioport_read; > + rte_pci_ioport_unmap; > + rte_pci_ioport_write; > + rte_pci_map_device; > + rte_pci_probe; > + rte_pci_probe_one; > + rte_pci_read_config; > + rte_pci_register; > + rte_pci_scan; > + rte_pci_unmap_device; > + rte_pci_unregister; > + rte_pci_write_config; > + > + local: *; > +}; This is huuuge patch :( and I am not yet through it (most of it is movement so I doubt anything major would be problem here). Just the above comment in case you are spinning a new series.