From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0062.outbound.protection.outlook.com [104.47.34.62]) by dpdk.org (Postfix) with ESMTP id CC4C1BD28 for ; Mon, 27 Feb 2017 09:55:02 +0100 (CET) Received: from BN3PR0301CA0025.namprd03.prod.outlook.com (10.160.180.163) by BN1PR0301MB0723.namprd03.prod.outlook.com (10.160.78.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.13; Mon, 27 Feb 2017 08:55:01 +0000 Received: from BY2FFO11FD042.protection.gbl (2a01:111:f400:7c0c::145) by BN3PR0301CA0025.outlook.office365.com (2a01:111:e400:4000::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.12 via Frontend Transport; Mon, 27 Feb 2017 08:55:01 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; infradead.org; dkim=none (message not signed) header.d=none;infradead.org; 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 BY2FFO11FD042.mail.protection.outlook.com (10.1.14.227) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.933.11 via Frontend Transport; Mon, 27 Feb 2017 08:55:00 +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 v1R8stfK025209; Mon, 27 Feb 2017 01:54:55 -0700 To: Jan Blunck , References: <1488018496-995-1-git-send-email-jblunck@infradead.org> <1488018496-995-3-git-send-email-jblunck@infradead.org> CC: , From: Shreyansh Jain Message-ID: <303005d0-f852-f252-7131-8ef6311917a9@nxp.com> Date: Mon, 27 Feb 2017 14:29:43 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <1488018496-995-3-git-send-email-jblunck@infradead.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131326593011311387; (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)(336005)(39410400002)(39840400002)(39450400003)(39380400002)(39860400002)(39850400002)(39400400002)(2980300002)(1110001)(1109001)(339900001)(51444003)(24454002)(199003)(189002)(377454003)(8936002)(2906002)(85426001)(81156014)(105606002)(36756003)(230700001)(626004)(23746002)(68736007)(305945005)(83506001)(31686004)(8676002)(356003)(106466001)(81166006)(47776003)(4326007)(54356999)(76176999)(38730400002)(65826007)(64126003)(97736004)(189998001)(5660300001)(33646002)(50986999)(104016004)(31696002)(6666003)(92566002)(4001350100001)(86362001)(65956001)(77096006)(6246003)(2950100002)(53936002)(65806001)(229853002)(50466002)(54906002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0723; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD042; 1:u6GMO54xVCouAd9WlF6pjTSN6zFwuPC4C1YkxaW1hXBXJlhCR2xkSp0SInq7IaLY9CeCu0HjiElWEtrH4zkUK0OQpwgq/GgPY3b5aZajo9g7rYOQR+uy7ZIwvHvB22ExpU0BzZaxQx5UGVQG22Mn34MnWRT169s4xxCTBjYJ6zaq+xf3vHSoW+j+ARSkUS6SiVNL8LP/v32/7MCmTKIF1R32qGrfdiyWQ+6Wct52DKol0eU9Lg+f2I1f2mShv7bPifgTxbGeFG2e/l8egCB7JY/yVOp0qRt2mzKLRsWsqIO7VIQhl2g4CgJ8qtHZB/OHeSD5lktkpwk/K0bv1OmivZ72siUkYDo9ZodmRL/xB6aPwt+qE2SEkYZNsRALGBMojbdjgA0KjAALr/pwyABsA5Mqptg1cNdspfC+IA9XgiT/lla7j7e3JHP3Bfw4N3TM+qxmG6RKJito4QejSo+/frmYqDF4XTpOt78aCq5mvYQI/KOHpOTwfH1+MfvuaHtPd90FBSFeLIdn7JVw/Qvycm6GqsJNTOkxzANN3jd2Q5SSCSx/4i0Je0xVj5IFZ8QOZ8KGC+Er0nyBreaaSMBbjozklBItEnFLg6fjlfe1NwQ= X-MS-Office365-Filtering-Correlation-Id: 442897ae-d35c-4210-631b-08d45eee5077 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN1PR0301MB0723; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0723; 3:iVYlBlVPHGEb1LHFS2w9rLfc9GQ2ZRWejbT6fBzhtc5UtfByPLhD4RUVVGkHkIm1NLrNm6a7kyB6TDUd/l6ZkXx+4/tkuDbQCIBHhrpYYD80Ppb09eK1dUjOQDMURF9hQjIDXslaVbMM3J2uj2VFw9WJ6sm91jjCNn/6nmh5HrP3YXRQYhrr6dbjtXkzckGzuVYQrGnyzwOCW8/zOnu1cinO+udTraGn/+sxUBf4QbDhTBOEUry5tEcw0g5ej61QPm+x6Ph8Mgaq6Z3r6WF+WADXy50fYgOH8EHqWGxsiDrFxHplafzSLqKFvI19Q7k+5ohlDzQwoF2jLfbtnXQSvnAPCLX1mJpKetQ0QSqCVhJW6x/EMg8ssh2k2g4Elimx; 25:7Vtaa2PNE4Tg7STSsYer0Rm0OTpQMpnDcIMeq7mwsRl8kvWk2QNiBUEANOYn+jDIWwN0KBmxqKQlKfzARZgpUujJtMClyWxUT2BROcGh5c/NLo2JNSfALb55YWYLaF4Z/vDAIM0YTMAbtTJVpGfUIe2cJ8JCU7/j1ebQZIrW4mqbJcxiKdoVJIi8PFZiAzLu3yDQJZEDpvF0My5DnKm0mwErB7CehLKS70zwnLipnZjuTKLdwm8UcRrBlpM5r/1PJD4DrhKKYhvR/BlPC6yxned180aHmEBJl1ylyIt1EVl25YpHDw3zUTSgS5I3PMF4IQarUvDI0hFOzTArZSqV36hZrkLMRzLQ1oAYIXNs9550gF6wAoVEHZYYO5Wf74OinWIXHQYbgt1JvZGHMw3twAggrOXc0+oDTv9SMsn32Jiwce6B3YHUtSymMtM87JVJ1MSPnykXOgqTcF4KqsL2Jw== X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0723; 31:Q3Ba5p4dsgCkLWfxizU9Vphz6BGutrmY1RP6AnN8q9p3AObSTGPwITtYffDGzEDLxdDvuntDMLFc4DkE8Rihza/xil/4mfIT0NFGA9v+MMI34dizxNntDGPlajKl8TbYBCpCKjY+JTdNM7NepBGD2npB2o/mkOj1/UHA+6oADtoSCPPVKvoXRdQ9eLR/F986UjJcJ2QoVFeHIwyZZQROhOpug4/mfhqkRQwYuwIdfKSADOzmnsKw7GxvU/K2LGBtg114YNVztO+JPfuIyG3+jg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; 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)(20161123563025)(20161123556025)(20161123559025)(20161123561025)(20161123565025); SRVR:BN1PR0301MB0723; BCL:0; PCL:0; RULEID:(400006); SRVR:BN1PR0301MB0723; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0723; 4:SqiMC9fsje320nXLlF1NrcbkePC5tfEbMoaJgI9wgrluFVU5sDGfShmC6mbikgTEX6Wc7TnU7NGJvQZ3bexrpyxAUA+Z45bdeB5WI24ObV6vdCIE5a3c78OzudT+EVTfFKVcjrBFejlY0JA8V6mv5Vh+R7XH9SHcMtvSgIq/828lstpCAkAt9wwzldRkmktx14TKnhFaKvLexeCSZBX91R8uBaFs2Z4JeSVBrX/EEHhmHDb2Mfqbb7lPFMSafJj3S7I4Ss3ELzSHwl3xWxuj+BNF15stZAHbksoSs0lpGJG7KD2aMu/DNa+s0hvuBddhY6Yl29mFnHoeRv32TmYusYJotRGlsd0xiYnlrXdGSvwVxAh+zTxXmhYrjR6p/A/87s31R7QXfKITvvpwAkX5Uc2S7Lre4KaSovoQKTlCZOMKcKHJKyuI7ZQ+P8kOdjIvWhMta8LAESEzZETyNlSf9EwaEVBIuBMeU3YDDo6DTjUUoKOop22ti6AP9Xcw5Fwg6+Al+nEfQ3j11fWIexq1hkuyX/HUs/16vR46uy4+WEJGfL6CAkoYPu0dNNA5dLur/GfZIiiMVNLpyb0D9SO1Uj2bWAjF4ZuWnKd08kP3ZzrOMjbE/F/MwPYjIaqVWm1ZgbgBvMCYxdxVauMuP/zDX9mB+CmzLA7VEMBszlSuPajdXROAH8LY6GmeXWGsk0DhXDRybspyvElBeS37x1a/9A== X-Forefront-PRVS: 02318D10FB X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BN1PR0301MB0723; 23:4+YB48DmWSMD/JkBoVMRuCAv7YJkMYGbJUS?= =?Windows-1252?Q?JSP0TNuGfF8QYo9RJpXbHKU/6RbgGwQc3fjP38IuXCsbpv9h5Ti1KSao?= =?Windows-1252?Q?ePMndMF2G3hzeg6TSW4rSbRpRLXffbIYFYEbjn90PaHze2LRcqxi7Ol3?= =?Windows-1252?Q?v2nC31bslPE+kKOw0acpYF7YQIGDIP8fIH0Ligk5cZsrfeljb7CiIWbn?= =?Windows-1252?Q?ggUcfFy4HQ4edhCNMkB8wgWU4JdeFzkmMpJvYd+yb5KnT9r2acRiIMy2?= =?Windows-1252?Q?5jDSdYweryXDtZ8eZ18jQRloJnkHqtpzc3q5h0ItrbyG7LN1LubRP4lU?= =?Windows-1252?Q?3mzDemBpheAdUsezgwKZYJ7ALABZyJqO6akvIud9QPptazyGGqUhQMG2?= =?Windows-1252?Q?C5CNTSw22hW2An9H5eWXuIA/Dl7UalooNDvUheiWDrtLa6feqg1tO4tT?= =?Windows-1252?Q?WSHJhf3wWck5v1vuEKTYSJ4c5vGuknvb8PgRWWRI7+YJ5FnCMcOWrGar?= =?Windows-1252?Q?exTdkR7n9NnMEIbr6demRnNqfO1XtOb1eM4AYO4XNTrJcDuSHIwLe3lh?= =?Windows-1252?Q?jDmAJ+xRTjk8a8bCTNFlVnMhZiMsDq58uwzod94bQNDX1CtSmNNl11ed?= =?Windows-1252?Q?iHEVe3mlO18IVnxYQ7YI5JHCW4+6eYGfAVLqQMBpkONTr1h5cG5Bm8WV?= =?Windows-1252?Q?qyGQpTkPJEO7WXO5+rPt+UuEy3hkm5MNXU6YtIPzNxVDw1eoWc+LO47A?= =?Windows-1252?Q?AVc6Ucw4W9DlvIwwF8AoGTsZzJQp4/FejARYhJDF2BaqUl8XnpYMiDZ5?= =?Windows-1252?Q?IjU3E7ObphqLTN7Ii6MZld0UxMzUl2WRgQ/rLy98olcRVLNUCs4AJXTR?= =?Windows-1252?Q?x63RQmhT5culyt6SJxxVc/MsQ3I/okfhMF2fvJmMnIGIzW2xfi0Up7fw?= =?Windows-1252?Q?kyo/r8TZIYXrVQdsNJK/AozV3dG0iN3vr3kRxYsSWu69Lda0OmwPdb/u?= =?Windows-1252?Q?9QkUskbZVV6+IPrbiPEHtmfw2kE4A4j1RvV92L4LvcPAXTC64ziKCcPA?= =?Windows-1252?Q?JZpiyPQnFJENo03sBM4ov1JnlYZdDEf37x4AyobyrFlSPgetob01ed0R?= =?Windows-1252?Q?VU5vTk70v23b/M6bOdCh5JAhlg485UOzkJsa6w/UJrCglkG9s+fFayak?= =?Windows-1252?Q?oPuDwn29ISeoZoQV7MtoJn6T9bNEP1IQvceLYeE2W2dfK8pvQRnhxqMk?= =?Windows-1252?Q?e1IpGBr4wEDk2evKml07rG3F72mRtx2Tdcoi5TXpNp/Y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; 24:Xg44UPFndJy8K1owuuLKOriimD/xoPA/IcDecOMEOgXtkrAv3If5AJpQEPdW70gq4uXSF+l14nwXvJIqz4GhJV6131fhH9lDvfIuYz4OTvw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0723; 7:xeEADghDM5TS+isIQ+9B0POC4D/qYLa54E/BG8fjNEsgJ+fwKkfLH3G+AArpA0Qlo8lUw/KY4EGUwIr6+rFRmgw2R7dtwwE6LdcDzKG0zoHXAzMilHW9DU4NXEiO68sVWe1VrW4HLywyYG1dl5hDhrkGvVxYQv9sogHO5kwyNubJCfA2w1QdkDg4B76xDz1M3dRLNZZjfC407FTBS5Uw/fTNwA2zCuS2AoCNd6tapHCXxETSsQ49s4F93IjorK9ArbSpQHt6GzX077D4J7GFj5wYwXV386JZRrxUDSaVI4TpzOkzdwD0W7oGZM8qOzleECINZKFNmwWSx4c6jOPaAg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2017 08:55:00.9283 (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: BN1PR0301MB0723 Subject: Re: [dpdk-dev] [PATCH v3 02/10] eal: probe new virtual bus after other bus devices 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, 27 Feb 2017 08:55:03 -0000 On Saturday 25 February 2017 03:58 PM, Jan Blunck wrote: > Also see commit f4ce209a ("eal: postpone vdev initialization"). > > Signed-off-by: Jan Blunck > --- > lib/librte_eal/common/eal_common_bus.c | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c > index 4638e78..8f9baf8 100644 > --- a/lib/librte_eal/common/eal_common_bus.c > +++ b/lib/librte_eal/common/eal_common_bus.c > @@ -86,9 +86,14 @@ int > rte_bus_probe(void) > { > int ret; > - struct rte_bus *bus; > + struct rte_bus *bus, *vbus = NULL; > > TAILQ_FOREACH(bus, &rte_bus_list, next) { > + if (!strcmp(bus->name, "virtual")) { > + vbus = bus; > + continue; > + } > + > ret = bus->probe(); > if (ret) { > RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n", > @@ -97,6 +102,15 @@ rte_bus_probe(void) > } > } > > + if (vbus) { > + ret = vbus->probe(); > + if (ret) { > + RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n", > + vbus->name); > + return ret; > + } > + } > + This has probably changed to do away with priority of RTE_REGISTER_* macro. This is based on an assumption that there is only a single 'virtual' bus and no driver ever registers another bus with the same name. The problem originates from the fact that rte_bus_register is _not_ checking for duplicate entries while registering. (Apparently, it would be a problem in case of RTE_* macros as well). I think that should be fixed. If we are in sync, I will push a patch. > return 0; > } > >