From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0068.outbound.protection.outlook.com [104.47.42.68]) by dpdk.org (Postfix) with ESMTP id 51EF910C38 for ; Thu, 22 Dec 2016 06:09:31 +0100 (CET) Received: from BLUPR0301CA0006.namprd03.prod.outlook.com (10.162.113.144) by DM2PR0301MB0750.namprd03.prod.outlook.com (10.160.97.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.11; Thu, 22 Dec 2016 05:09:30 +0000 Received: from BY2FFO11OLC007.protection.gbl (2a01:111:f400:7c0c::196) by BLUPR0301CA0006.outlook.office365.com (2a01:111:e400:5259::16) 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; Thu, 22 Dec 2016 05:09:29 +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 BY2FFO11OLC007.mail.protection.outlook.com (10.1.14.254) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.789.10 via Frontend Transport; Thu, 22 Dec 2016 05:09:26 +0000 Received: from [10.232.14.87] ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uBM59KRT001415; Wed, 21 Dec 2016 22:09:21 -0700 To: Stephen Hemminger , Jan Blunck 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> <20161221153334.2b04f732@xeon-e3> CC: , David Marchand , Thomas Monjalon , Ferruh Yigit , From: Shreyansh Jain Message-ID: Date: Thu, 22 Dec 2016 10:42:59 +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: <20161221153334.2b04f732@xeon-e3> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131268569687486962; (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)(39860400002)(39850400002)(39840400002)(39380400002)(39400400002)(39410400002)(39450400003)(2980300002)(1109001)(1110001)(339900001)(199003)(377454003)(24454002)(189002)(23746002)(38730400001)(8676002)(81166006)(81156014)(77096006)(8936002)(189998001)(2906002)(68736007)(86362001)(230700001)(5001770100001)(4001350100001)(31696002)(4326007)(97736004)(36756003)(69596002)(33646002)(65806001)(356003)(47776003)(6666003)(65956001)(104016004)(2950100002)(92566002)(93886004)(305945005)(31686004)(83506001)(54356999)(76176999)(229853002)(85426001)(626004)(50466002)(5660300001)(65826007)(105606002)(64126003)(106466001)(50986999)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0750; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC007; 1:0RNaSD+a2C8DU1zn2jPyaayW+9zC5WG5y6b51hsLkEqVrGcD5oG99OEAYkvlEzHQlOsC0OBuxjteubyWs0lt84pnQ0IhKVUR8YInFHpTom4ivM0z3WHt5cd+2/qUkLQzBIa7NnkcwqtCFrsLGjyWrZAygtY08sIecYziEz7ucsvoKNKH/Qy1efo9b/BIz5MwxRiP4gKDFkfWapKWXsWTZWD4tNoHE/c4bfvtX+JCjYqiXL1INy+nsXdTWtNtgCHr/lj9XYtB5CMyFaUYfqdxm7nsvI3Gl2pKrrqi3gTF5N0VW7lU8ML1sVeUP2QJ0q66ENvidjN+Cys9T7VPVtsRYrypGlnPx95O5eKET1sEVOLndbEVQcrVUP9DlNhC1KKPc/3ARCvJEMworZC3eIwTh+TZeyQ1wMSjodOHApVGsVMFyMdEXmp3hQsxEhteL3c9H+hcHeV2Af5YVUK0xn/t5ORIMTXKUqjMflQXgLss7LI/V8pzF5Z64L1mPbaadtWaE1pcaKD+217L+NPHV6Z/0QiZQ2PquaT8/TIJJC5QIEtGwbf9+DLtFCJIkf3bnrgWETYi6FOw1h0fDIAzI2HtuupZiXh2GJgeixivTSLFXDlFtc+A5nQZY+DrxpD+BE3u3AGfNQjNDj/Ct8++uCVcOw== X-MS-Office365-Filtering-Correlation-Id: bccf4c23-a4e5-4169-1093-08d42a28b4da X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DM2PR0301MB0750; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0750; 3:LunQbApb8TqViZy5EPIJCU/WmvRuzCKnWWv3PSmkloFAp0p7sQAsbgVb0+FBG50rmBUcAJOpB2PAEAn1Eywnd+cnpkQz05He6+akXXBJnR2Cm4G9V9mQWiCH3jQvasrWcvRDHFDv10uoJRgmVa0oTMiYE8xRRx/QLYhmMswXApV3x4+liYpy8HnndVdpqhfbtoE/vQNro7fDOyFuVE+yk2GncOGGosqgRVshkO17uszmEtWkm1dJvYXF1Ql51sEY86mdnb0NvlQfO8IPU9eftNDjSS5pVOU/nNDMUTOOgz2l2cVD7eIz5i6jl0kJ/GN2tdLI6/3ucW6PI5teVIr2ufo+YjuRe+OBvwatw228jwDmycxkjs/2YliAbHWXNYMP; 25:/j2qXsqJbt8wsMm4MbaaDtqvvS9F3sTKDu5aLheZuTHPwYApd2cJxUH3IXiLwC0UoyYFVnNdwvBD9v9qQV2Q7trsnhtAKL/sAC6RnNxD9iseAAwBi3TmVZry4QB2+JeFx244iz1BoqAtMsSGIm3SxlVZFxbyQlcZXm1pwlUL2rnOsk52hcmzzyO9ehwnQ0nPxodQxw+2dKStgxuFcmbrtYbk7rjRBerxwSYYgQLXjwOvK1/KUZbtuqTcztWXT3MpqnickqMEf3kbwtoMfGLanugxGgl7rKOqCMpzg+r6+Zc3vQSQ6FDTW36spq1rLyNybjFqN292JabW+TiuGxf+AOfsS4iICnP75LAgck4XYoVpBZ7CW0O2Rcs9xhhS3OtTQb3S37m8m5kV/ScBrKdvzRl4FmELg9FQpJ/23QDXvoc1UWlmfh2i57mppKmsLzPzyobL2Mx6tm5lG5VvxJzOKQ== X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0750; 31:mkzIJpOoJKhPjZg9M7pJIdEvJ3RFhQyYNjP+f1vJiaVFNqTmDtmJAmo7ay2m86rBsjXUNcAnoIa5yv7IKEB4sPo0a/4Qb8gf1QXnudzkmq10zEK79wicDr7kjol8hs7HMvkutwSDyF1SCXogZg6pPmMHUn8S360wUKI3CX60fT/rmUPSRs+LF+RbS6DOmSkolDJQScQ/1pdccLOzXzyfT+lAqmBS4S1armnkzJm5t8wUuadFX5vS0ugplNTHoWu0Wz029az7E8a02LwpQzy2Kg== 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)(13017025)(13015025)(13018025)(13023025)(13024025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123556025)(20161123563025)(20161123565025)(20161123559025); SRVR:DM2PR0301MB0750; BCL:0; PCL:0; RULEID:(400006); SRVR:DM2PR0301MB0750; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0750; 4:TPoYJiWOb3Mr1z/igAnBrGHZXW4/bGvCzRPFwQKqYBbuphTDaju+EMbI3m9wPfiLE13YdNABaLh+0Z1jWCPKf2ZCKXWc9ES9P8lipyKYsF0ymf4Ndt8z6ZqeW6/NItpSpKjDo8/byWDDlobHnUXWxUx6ykjd4g74RNZQxlEH1bFOeNEOTDtwVFva6nQAUhCAKkyqL09ltYynQdUha6TB//HJYBKVYfa6G8FNFK5PJqlwGJHuRnmc7rtW8Tao1cY1ur/tlzsREWdfe5YExZFgdYxtMHgVnyr1dsVPuA4L+oTF//nwAxLAAYxcGzPrsRXkaS0ZHYMxenQv5Ek8qzI61UWqGzNbraOJAwj/RhKItddMb7Z9jHCHc5GT5wRWclX68/2xydhyE+6L2IA9bHqCZzkHDToa8rlWGymbeDYSFamfXERAyv0CbGDpStzdJvGCuw/UgeA8adXspIb7T1ZX9Ikfi+YwjK3EA3vRWOpCf+ZKqN8hPB/6k6zeGr+xE9vddiVK6UWIvOORJrPooSVQwCfTjAFyFNrwvl7t6urk3EGhQj/ZQaivi/APUeQVprqVjVx/QvD/hRrwMpf0HytdvjgvOlxexQdQQUQ+F7f4hk9wUCQVBEixEDOKnHFGZ/SheouYFfgwo+45Fcq+Wb/eI32qVy3j+FboIp3L6dO7S3n5UVVSjzkTMK73ABjQmFPWB65qpXGqmsmH/J3CUc325VnmmU/tDs8Q+HvaD+egSY9R73VgEollL/95vjGs/1Nt X-Forefront-PRVS: 01644DCF4A X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; DM2PR0301MB0750; 23:6nS8Byf8OVe/EUsfIjRIw366eLeHnAmu7OE?= =?Windows-1252?Q?lExJUPTydQYwrf26UdDjqsckAq7ptTtmaCwZX44M0bdl2PfFE+nnLlH2?= =?Windows-1252?Q?FrvHCVqJoSz/gHgkNoB194I+V1HSsvQ96cVVZftW1HNzet2+1kDMqcRN?= =?Windows-1252?Q?Z2uSl/olWfwu8lLC63ovlh1H7aHBxbqvKOywePMURtfmEpMFKbC4OQTQ?= =?Windows-1252?Q?TQOXlhjiBfGZ5OgAZRP6bHUAU9/nwb/2AnERf0BVniBCj39t6Fo4Q/sl?= =?Windows-1252?Q?5QVE0T9MEcfc8MScLPawETemfZ9mTVFJWCPJgMCFj6F6WU7QZcbq7o9J?= =?Windows-1252?Q?JkaAh+A4dz+bnKIjg/KtojKcJyOclmEbIFpQVyTsIgXE3QcHzMs8Dmwe?= =?Windows-1252?Q?tWg9oF65dsAJ09m458zOOxQQw3CXmOvDD+qIIDx1oLMi90CrURp5Gkkc?= =?Windows-1252?Q?LpwN4DPWQeLyJauMyGFqngLKE/HA9yGxe2UY9tuUOjEmzVrphN+MspeC?= =?Windows-1252?Q?qG1i/6VYC5NCqR+CHXZfRXmJejiOq38kX5JvqMPOun4RWb7pHmhTwsu6?= =?Windows-1252?Q?RJWzWo0ifgF5GJvJ8t/EerFwUH78MMnWum4tCBWL0A1JvwNEGdHIH8m+?= =?Windows-1252?Q?Plq2Yk6/6D2YIWZ3RXlAvt/y461NMJxoGy4aYFPRmjZ8CWuZxMCg+BSg?= =?Windows-1252?Q?ZzA8XKMslTT8UVj89n5d+meIHyc4vwvZRtW5qBeJSbfYCVTKyvGL/2v5?= =?Windows-1252?Q?E4tQSPcmvs9MoG0IJAB5z7+ncXc+uzD+U4SjFqj1zu2Zui9fXM9eMaCM?= =?Windows-1252?Q?EVupRFawJ/qR5YvF+Xq9XvjV+3MKoP3Rqeua6dQQ8VKz2Y6PgZnTlz7c?= =?Windows-1252?Q?ccZ5PF+DHR1+HRdqeq47tMuQg/J5F3LUZg2+JaAALncKbxkXKL+4C4s1?= =?Windows-1252?Q?VirUo8H9FgKRXq/e1p9F20E5QynsTxR9j1NeldufVgQn+gM98jtheYOW?= =?Windows-1252?Q?cMfs+Kl6lxyD3RMNrY4cik0CVKeBW6vunQX0AbwK+R/XrLN4eAbFZROM?= =?Windows-1252?Q?BUxPihitX4HSx8NwwqUDS28Nns9KcrXf0FQOHBJXT4WD2oDxN52gVJrH?= =?Windows-1252?Q?3XFTp/G2fC05cLHYc/9x2fzXcrfT4U3EKGuf0QmNwNOJrwNkZsNKGgjA?= =?Windows-1252?Q?QeImXwrxiZ8h8S+0bXyXrjPer7VfWuOhTP6IeNji7tAlbcd270uwP5wU?= =?Windows-1252?Q?lPLX67jMAi+Y9beMvb2YWHKhGCRHlcS/uPxe0VBzRFB9q/43vQXx4RGq?= =?Windows-1252?Q?L3TSf+ityizfUmKi7LTWg5McI3FLRXNUj3nNf0YpPFKQnL38dvSUtqo5?= =?Windows-1252?Q?EfBlTg0L5bRMnAFB9T9uxhFVJnhti/nL2UcfZp3nZNANWBHgJ8UxHvb1?= =?Windows-1252?Q?DdW6y/y1+DKvMh2uRD36r+AvjB39ncPT7keKf3S+zSpbxSZgzXxtPOgP?= =?Windows-1252?Q?AvSqfPHgNayYfJ7TV2+d8p275NIzkZ+CbAkIuzD5rQ/z0FpV7oFW2EO3?= =?Windows-1252?Q?fGAvP23yKGndjVDiln55ZtP0afcWrCGQmCjI4wyZV4tCm/tz/KzStLYU?= =?Windows-1252?Q?KJOYJbgPNTwvNhuh19B2Dqgq03xnXbeioOQA+Td5qZj8v?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0750; 6:4s4AJMpupCcylySuA/AwWNnWeJptc2oJTWgxRQjU+4vcuJwZLFl4oRb+wKEF7h3PuT/piZDktuEHE4WHnt9RxLJ9d+wVO7qRLp0DJXih85bTj5LL7vpDhvE32Q4RqVCcYNE0iBWNFcTdkYJ/t8Bpv5uRUqig5u2e5zrw1IX1V9FnkkI0waRnukTg5FLrOtN5fLOTdrhZixC7nZWrfj+IZ4nwuTerknbnEgOsnP5Pr1KQRi77XB5yBg+5lO1W8ZN0D7nam/Cvj1qhOBVQCjxOGkloNBARTsOF+67mzrQL9WsHaC8cKajQdCyF2vklnU1BmKdAAUIUPVW/KNOIZdgZvSNH0YBnjfAOZ9zWKIy7Dscb+hXrsWze/6NvnjESqGKGxY6I5G+9BBsGLS3xQDsq/aiWU2VIyp4aB+srf4eTVHn/yeGYE+UqdGqhs8FlMMxi; 5:PAl+GC8+xbGP+m/napwXRcOLC37YkBxY42hWf9MbsM9K8j8TtDb/WDJ02xwPZ5i51lfRb3aFbtDPNZ7w4qB4FToNycjCKM2MJNOfZLsycv+1Q4PJpGe5QrqS+y6ozBvq1CXuvcgdu2o5BD2ApKpARgorZKu/92HgXBafpjIROGCN3Ahbyqrs3lskb6wPDHtq; 24:EV7FQKReEz2JJ3kTGmPrH2ca83EXfkDB8NcusI5pGOrFFRaWVFnrfQZYQVuoQ9PGGbSP5ayy0AZ+1kmAJhhmAmZXvaseI+QbIUifLlLRodU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0750; 7:UguXAtwpgnHG7ZtY0HIyy1xTH7kXkz/2N3leI1KTDKWrbKvGHf1NKRQHwMczG+DDC7E+n7NA8mpV3LRsPcVSDlYCDM5CzAa+M2vNjqvIWBqEXFa25FcXeAdBX1Cm1vJXkt3AtAP3ubDyQD7RG/3Yi8og+7MKgS2rRBwC3UH+v5/QDI9G5eoCY0qIDwMDpKVqvcu6J7JJt8SD8ctTrgXkkMm2+1nVCO0WvupmVEravjthae6EbjK7ugLoVgWMKuN+vEm9RsiwS0qYbFT9ZZwZ0Z9VjdFZuUq9IeWEiK7sR69G5N0D6axudGhx6qHSjYyPIrbSwliITI8cqDHA9axohk0Jtvzsv1Y7RqZmrIsuxbUq6WXmoHTzPSg9VSk/Fb+qbi53CU2gWIerXwaDBDE7XRISydPXKbdBqQsyOr4ahZPYB99CiwX7SDSiC8J94ucSCM4Q+T5DO2vsH/1GKTmmEQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2016 05:09:26.1435 (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: DM2PR0301MB0750 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: Thu, 22 Dec 2016 05:09:31 -0000 On Thursday 22 December 2016 05:03 AM, Stephen Hemminger wrote: > On Wed, 21 Dec 2016 16:38:42 +0100 > Jan Blunck wrote: > >> On Tue, Dec 20, 2016 at 6:11 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. >> >> As far as I understand it this isn't the intention to replicate the >> hierarchy of buses we have in the kernel. The PCI bus in this case >> becomes a list of PCI devices. > > One of the motivations seems to be "lets be able to handle lots of devices", > but the current model with an array of ports is not going to scale well for that. > > It is time to make rte_eth_devices into rb-tree and get rid of MAX_PORTS config > option. > That is a nice idea. Probably once we get the EAL compatible for 'lots of devices', this would be next good change. - Shreyansh