From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0051.outbound.protection.outlook.com [104.47.37.51]) by dpdk.org (Postfix) with ESMTP id E134338EB for ; Wed, 21 Dec 2016 08:08:03 +0100 (CET) Received: from BN6PR03CA0033.namprd03.prod.outlook.com (10.175.124.19) by BN1PR0301MB0737.namprd03.prod.outlook.com (10.160.78.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.789.14; Wed, 21 Dec 2016 07:08:02 +0000 Received: from BY2FFO11FD018.protection.gbl (2a01:111:f400:7c0c::162) by BN6PR03CA0033.outlook.office365.com (2603:10b6:404:10c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.789.14 via Frontend Transport; Wed, 21 Dec 2016 07:08:02 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; networkplumber.org; dkim=none (message not signed) header.d=none; networkplumber.org; dmarc=fail action=none header.from=nxp.com; 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.1.789.10 via Frontend Transport; Wed, 21 Dec 2016 07:08:01 +0000 Received: from [10.232.14.87] ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uBL77v2p002301; Wed, 21 Dec 2016 00:07:58 -0700 To: Stephen Hemminger References: <1481636232-2300-1-git-send-email-shreyansh.jain@nxp.com> <1481893853-31790-1-git-send-email-shreyansh.jain@nxp.com> <1481893853-31790-3-git-send-email-shreyansh.jain@nxp.com> <20161220091156.4442cb07@xeon-e3> CC: Jan Blunck , , David Marchand , Thomas Monjalon , Ferruh Yigit , From: Shreyansh Jain Message-ID: <50a813ca-8921-3a8f-49a1-efa1441dfe69@nxp.com> Date: Wed, 21 Dec 2016 12:41:36 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161220091156.4442cb07@xeon-e3> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131267776821150740; (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)(336005)(39840400002)(39450400003)(39860400002)(39850400002)(39380400002)(39400400002)(39410400002)(2980300002)(1109001)(1110001)(339900001)(377454003)(189002)(199003)(24454002)(6666003)(33646002)(31686004)(65956001)(47776003)(305945005)(230700001)(65806001)(97736004)(105606002)(106466001)(50466002)(93886004)(2950100002)(6916009)(110136003)(356003)(83506001)(64126003)(36756003)(4001350100001)(85426001)(626004)(8936002)(54356999)(76176999)(31696002)(50986999)(92566002)(81156014)(81166006)(8676002)(65826007)(23746002)(189998001)(5660300001)(86362001)(229853002)(104016004)(4326007)(38730400001)(2906002)(68736007)(69596002)(77096006)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0737; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD018; 1:WcCet6wBtJBavGmkfhMHoZi/pJyNgw86kd9nSPzU69c9jyNj+/RE7I/SbSPBKvLIzdji5dwfMOn821dP+sQDwBDgxPUy0uWgi5EG7oIzOc0r3FBAPFqqVKI5Dh2ts5T6Fl8zRGDw9J3OJ+afIShXrZXmgK/pyaZTTILkDWfqrk5RddO2mE06jzsCQTWEROUo26FB5BA2JeaWlM37sDF7CUZ5pdT3378/nsdt106xDSSDAmwsWia73QzkaW2nziiC3ND4g0fjXRggKc10swsCende84DeUXm4FrB30AXidB8By6XkCR86hV4s3ZXZw6ASAkAmfpbg7oCfLz/i3iU+ZimK+o7SR6u3K5EyWyXEJRw7DzfsUzCS8EbtECbPo+WlyLuH9y8+ZtrdkoiGPeWdGgnURd4EnP3Juajd2TDVYnm1OjUeJYzobtBlJlqEVHY66UNVmFdxg2r/45if0uvkx84tGegqdoW50/xe8Yo+nv6f+s4BDZFXHjcOTx34v/9tRRsYb7kJpBBIabNa1jb4pFYwws65bAr0Yy8bPGLziJ3PJ9q2jF+SwFWF5V4fnZf575YAwLhVjBNgckfiPYti1v+2flBhAtVjWN+fGV9JX9EMSd9Zq1F/JXT9YIRIogIuqTrr9gUi115wMl2+e6pDYg== X-MS-Office365-Filtering-Correlation-Id: 072eae5e-20c4-4bf5-e2b3-08d429701a55 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN1PR0301MB0737; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0737; 3:/ltScmc2seAw+ANQxd/N9RDudznK631ix+AAtAozBcpHvoI3CG9hShbcLOWrfig4aR10dQR2osiTzUnZv9VVYPh/t0c42IGKR3yn5tbWhsA6UBIg4IqgzF/FSNMmBDTeJE32PF/Ds25543WeM3pRId3JXcMZe2jon5k28UgUugBRRiZBLni8yuf3tFsC2mXZ2A0pVY8sPKaDt8gBxevowRTUlGI5aAWFYrB3E8vb7LXSdXMmFcSwzXINUObX46f1+fOu7pklzpmTGHleSEIZk84LXXkPzCGK8ih52tOj5ZjB8C862l2/3K8McTnjEZ6YYDEV3RAbCDoEYV2LZNDEuB62T6+QOc41jyNNjeX6zOg= X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0737; 25:5neLA4TFswwYvRzZnx0+lFUlGmel72VHossnHuk5pBKm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s14dL0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(8121501046)(13018025)(13015025)(5005006)(13024025)(13023025)(13017025)(3002001)(10201501046)(6055026)(6096035)(20161123563025)(20161123561025)(20161123559025)(20161123565025)(20161123556025); SRVR:BN1PR0301MB0737; BCL:0; PCL:0; RULEID:(400006); SRVR:BN1PR0301MB0737; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0737; 4:ooh6zqjHRJRU32ibnFJ/Af3B6DCP3/zbqtpxkRni/Q9ELGQKQqL6vftvD3Q2Emt2dD7WND4LEJPf+kXDPHYPaJLAnea16/E+FRD4/2MBjnSxqkpZTkZmPNvkq+Gm2gCuyuyhwwxTU2NJloEQg+W7ffcITKvtS39xKojPRSoTdipMJaoWjzaZDdUEQrf6W40UsCUWtaavTyXDz/hDRc+9s8Y6i6SmYAFaG8SPuEkip+YFofxxkIlRKa0GNZ/yFfgvbLnrOPVT0ymP8ewPsBTZLnnUshUDmnAT+1QpLR+MAeDIF+JSNzw605dHVdShne/w64fKoAlEs/wHPa5Z1lxnfx+ovxMPIC+7OIgLgn1x4ClLV02TTvOMzWXcP/QzPqHu5qczO3fGLkpWqn6yr56md36aexEbkUW9MFT5HGw6hiqsaylGYiTATyIVGy+exabqLJ4bvRnJJkN8FUVdcdawHrbho96gHU4k3qKVJqFAwn0au+M87vgmf92CTUXH40JEltbfpb6RK4HUnr3kWzWq5OnA530L4Uos0QsilA68SSoAMd7iRpbt3JxtM/R49GOrUXUymZcsDIUdXV+JNrl7WSqe3SiogbmnoE1mS5ynVHyAR+TjcC0gW1Zx1TnokWxK03dLF7n5cfQOL0z8OzjglNvaOoEyA4e1pMcOzllozOKf2GeUkpZUqJeZQju05tXD1WHhUkEqwlR2LCCB8eVcGS/rQChGa6zeqGpQrResBQbjvFTJYcMnphA04jyoyabp X-Forefront-PRVS: 01630974C0 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BN1PR0301MB0737; 23:xPZ7aYa2zMl1sGAHLTwZsqJfQRN8LMl/llJ?= =?Windows-1252?Q?obK52RMXKVgkWxWF3Aky7RDBo0zaXSKhz0lI/eAb1hCSLC3gITBiPrhw?= =?Windows-1252?Q?hdcXsfQm8Ic5vdGbDJzHoY2OcKUImRIHOZ0KvzwsJdgH0xt/Bng4dkp2?= =?Windows-1252?Q?jPUowyH0bPXvKQlgxUom3YUaU7rz0wjYHHn08g5KnewspbRkDJ70+K6z?= =?Windows-1252?Q?5X1MEjNdcV9T06GRJWApCRWQFfIvS4k22J/fzQH0mhKwFXNFHTtcQ2fM?= =?Windows-1252?Q?LlQeLpdRsoW1+oqI/QYMZIQDeNNVRUFn5IprQN18vt7rh2cIKIY9Gkb9?= =?Windows-1252?Q?KG5NQ0GgF4KfZvZPiAcdkEmpn5eTyiNhR30EzeHGO16KLVRJUyAmYqVG?= =?Windows-1252?Q?Zkyv/VsgAtYnBMKj/OGR3PWj3JTJekZ4lnAqQJ1Gn49gA3sxi8wbm/YJ?= =?Windows-1252?Q?KPbScN8pm669wrPfy17rw1m9ggjIMMaIY0MLyvsqekCvYdrVp2skf7oV?= =?Windows-1252?Q?N67Du3+AAGyLiWFlcIDa62nnU+RjQunnqT6GShVGbpaeywvRXPrfkiwU?= =?Windows-1252?Q?W4epjwR5CubPYl0D7mRadNQT+OytVE58WCWK0MtxgJBsFXqT3YCF1DcN?= =?Windows-1252?Q?UgXv0apfdQ4Efj4avQ2Orjv7vD2Jhyzdmjj1dxzSj/5ptyzpgM/8q+84?= =?Windows-1252?Q?ulfox/eDu7P782uHBaXiDbeoUne1CAeL8fTY/Y7Yh8B2xG8UnDW2H2EK?= =?Windows-1252?Q?m3HX87f1uHFDa/3fq/+Zt/UAHJTaUq/14rrkRJ6poXXfPoS00C8BcFmh?= =?Windows-1252?Q?nmixl8d8sDmZsBJWgIyrco3zglKlNpaoLb4j41vD6ZcZUFPIfcN/Ab5w?= =?Windows-1252?Q?bSqaLScTL6QUO0xusbALgCqWud1i/nVPufm8FHSaBbCBFd0f37tRzXET?= =?Windows-1252?Q?iQBYHxwLKMOaKf59Kuqakuh5oA060x8o8NV41Vco1NrgIRqe0XfKSIWH?= =?Windows-1252?Q?D3QRnnrcrmsIZb0yNN1Euvg86JRzch94/jOBsqBsL71cVJHKoxNp1/iC?= =?Windows-1252?Q?57Krm40JTLRVItLaaxXLjmHj2HTL3tJHu2yYzA7YuBVxU9zw4Zmo+NVI?= =?Windows-1252?Q?SNd93frTzuZYEy4iJwX8ppI8Ie3C0O8KpCRj14d9qF3eFtepmiTrHsoU?= =?Windows-1252?Q?19Fgwbc0ZhXJJDUEhvNXUqF9zlnp8sAodo2IGtGHU9j3XwRoqRaCiy8v?= =?Windows-1252?Q?b0dzezrivVYStR89t8P9aVECWSM25EF5xdCoZ+v166bQ1vF/Tsm1pQV5?= =?Windows-1252?Q?QCJHitX4ulDl6Cu+CuO5SazX5lFu0jvSX4e9Qehk4klQbeRdPetrpdms?= =?Windows-1252?Q?Q1I+fzB01/92uVIqHh5wH3yOcTZG+m7kzfNugAoA6m/cRFO4BpXTnzTH?= =?Windows-1252?Q?aiTJ4KLOEuspdqDK0RIGwp3i0QcGgjoDyFcfdB+3zKZ3KGQEQRIYfkno?= =?Windows-1252?Q?JQmc7eC2uws2+lpaEzt+thHVhT2ofIpLJ9KzUIDDRrVRKYbslm/nI6az?= =?Windows-1252?Q?a6lXFhb2mh6SNrfvwO90Wi6ECYJIuQ/fY6wlLVSiz43xMTKm39PwdqJe?= =?Windows-1252?Q?Fw5Luj5xAHSFSZ/hPriJ1uHST41T95fWMBmUMKz32aGgU?= X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0737; 6:mQhp2IeghRMlJq7TQmkkyLqEVilXogzqUz9X9JLmB6gVJmHO8KHy3gQtvifjPngv7c12m9g1dd3Kux4kaDyV4gocFvbQuUxYpxF+46+/tvboYICveN10A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ryfFlTyOgPWRW3bmyfVAbtonu7G2n0sIxnI0RMgcNv4iMinvq3o5J97xES/fNHdw887F3V9e5Q1Up5Q7en657viEHpxPdm2nb/xUMBEkJKkK7dh1h4idO7rVksTxg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2016 07:08:01.5846 (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: BN1PR0301MB0737 Subject: Re: [dpdk-dev] [PATCH v3 02/12] eal/bus: introduce bus abstraction 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: Wed, 21 Dec 2016 07:08:04 -0000 On Tuesday 20 December 2016 10:41 PM, Stephen Hemminger wrote: > On Tue, 20 Dec 2016 14:17:14 +0100 > Jan Blunck wrote: > >> On Fri, Dec 16, 2016 at 2:10 PM, Shreyansh Jain wrote: >>> This patch introduces the rte_bus abstraction for devices and drivers in >>> EAL framework. The model is: >>> - One or more buses are connected to a CPU (or core) >>> - One or more devices are conneted to a Bus >>> - Drivers are running instances which manage one or more devices >>> - Bus is responsible for identifying devices (and interrupt propogation) >>> - Driver is responsible for initializing the device >>> >>> This patch adds a 'rte_bus' class which rte_driver and rte_device refer. >>> This way, each device (rte_xxx_device) would have reference to the bus >>> it is based on. As well as, each driver (rte_xxx_driver) would have link >>> to the bus and devices on it for servicing. >>> >>> __ rte_bus_list >>> / >>> +----------'---+ >>> |rte_bus | >>> | driver_list------> List of rte_bus specific >>> | device_list---- devices >>> | | `-> List of rte_bus associated >>> | | drivers >>> +--|------|----+ >>> _________/ \_________ >>> +--------/----+ +-\---------------+ >>> |rte_device | |rte_driver | >>> | rte_bus | | rte_bus | >>> | rte_driver | | ... | >>> | ... | +---------...-----+ >>> | | ||| >>> +---||--------+ ||| >>> || ||| >>> | \ \\\ >>> | \_____________ \\\ >>> | \ ||| >>> +------|---------+ +----|----------+ ||| >>> |rte_pci_device | |rte_xxx_device | ||| >>> | .... | | .... | ||| >>> +----------------+ +---------------+ / | \ >>> / | \ >>> _____________________/ / \ >>> / ___/ \ >>> +-------------'--+ +------------'---+ +--'------------+ >>> |rte_pci_driver | |rte_vdev_driver | |rte_xxx_driver | >>> | .... | | .... | | .... | >>> +----------------+ +----------------+ +---------------+ >>> >>> This patch only enables the bus references on rte_driver and rte_driver. >>> EAL wide global device and driver list continue to exist until an instance >>> of bus is added in subsequent patches. >>> >>> This patch also introduces RTE_REGISTER_BUS macro on the lines of >>> RTE_PMD_REGISTER_XXX. Key difference is that the constructor priority has >>> been explicitly set to 101 so as to execute bus registration before PMD. >>> >>> Signed-off-by: Shreyansh Jain >>> > > Ok, but let's keep this as bus type not bus. It gets really hard and complex > to enumerate all layers of PCI bus and bridges. > Sorry, I couldn't understand your comment. You mean it should be rte_bus_type rather than rte_bus? Or, you mean rather than creating a rte_bus, we should rather have a type embedded in rte_device/driver? (Though this is 'to' Jan, the context is hinting at my mail)