From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0045.outbound.protection.outlook.com [104.47.40.45]) by dpdk.org (Postfix) with ESMTP id 9160369C6 for ; Mon, 26 Dec 2016 14:23:53 +0100 (CET) Received: from DM2PR03CA0034.namprd03.prod.outlook.com (10.141.96.33) by BN6PR03MB2468.namprd03.prod.outlook.com (10.168.223.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.11; Mon, 26 Dec 2016 13:23:52 +0000 Received: from BN1AFFO11FD019.protection.gbl (2a01:111:f400:7c10::127) by DM2PR03CA0034.outlook.office365.com (2a01:111:e400:2428::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.11 via Frontend Transport; Mon, 26 Dec 2016 13:23:51 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) 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.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 BN1AFFO11FD019.mail.protection.outlook.com (10.58.52.79) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.789.10 via Frontend Transport; Mon, 26 Dec 2016 13:23:51 +0000 Received: from [10.232.14.87] ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uBQDNmGk003840; Mon, 26 Dec 2016 06:23:49 -0700 To: References: <1481893853-31790-1-git-send-email-shreyansh.jain@nxp.com> <1482756644-13726-1-git-send-email-shreyansh.jain@nxp.com> <1482756644-13726-4-git-send-email-shreyansh.jain@nxp.com> CC: , From: Shreyansh Jain Message-ID: <6ced05ea-ba17-b808-dbc5-6398cfe6ad2e@nxp.com> Date: Mon, 26 Dec 2016 18:57:24 +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: <1482756644-13726-4-git-send-email-shreyansh.jain@nxp.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131272322314628357; (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)(336005)(7916002)(39380400002)(39850400002)(39450400003)(39410400002)(39860400002)(39400400002)(39840400002)(2980300002)(1110001)(1109001)(339900001)(377454003)(189002)(199003)(24454002)(33646002)(356003)(8936002)(31696002)(86362001)(81166006)(81156014)(54356999)(4326007)(2906002)(50986999)(76176999)(50466002)(68736007)(23746002)(64126003)(305945005)(8676002)(5890100001)(2351001)(92566002)(110136003)(31686004)(2950100002)(6916009)(6666003)(105606002)(106466001)(626004)(229853002)(97736004)(38730400001)(77096006)(65826007)(189998001)(4001350100001)(5660300001)(85426001)(47776003)(65806001)(36756003)(65956001)(230700001)(104016004)(69596002)(83506001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2468; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD019; 1:61iWkxaja9xiVICG7pNcUm4df+HokiyFEhxXGfwwqF0PZB5f1F73HTjZOgiqYHwtJg9GZTGTZygoI0nsVl7+xI6M+oJ/Dy9ozdSnGPyHkvuJ1dEYWrIRZgLaLFQHjaBWDZ7iFphRX3XVqHwduOnQdTIKJHwC0Fs4MnwaUFLMixBcAvAsVEoi0aBtpx4pkgecnK3tlLR1ofb7H9pAJnQib0T4nc6Klde7XAK4eKMVeesx9IdsxQFc2MGosety2pEqKm/vQh+Z1EtJZ2w49iEgsurD8+nxKX58uMeryCW3Z9yCLG4syAxd2+53jAr4aCNVL9PKT45fsGrPH1PC86n3/64JmmFWYi130nMQR7czugh+P3K4sUs7WG/ZVmd0pF2iZtnBTu9Izz0kMOwHWqCPMlQ7vW0jDYxavN7cm3zGwwzLLs+i+d/T8yDGzc3pu1iRLdJm2XJrpdSC3zEMS1oK3YRjUgKh92h/nptEOhAwvlL7Hiyj8371Eh9VvHudOxUA4ZHwHx9hzsFPubHkmWxHYtxI6rRfdspQQ90V+AQpkgY6wnxTz15aU5w0baHxwu0qzyzKeom0P88blbC0uLDc5gKNP7yHaZ2ctVIZvrrAVfk= X-MS-Office365-Filtering-Correlation-Id: c7c9fb54-fddc-424d-0ba4-08d42d926edc X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR03MB2468; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2468; 3:vGrvZSvYh0E5Sa3UgaTg2g9q+Gl21vk9TtBpxmfgD/t884v5g4BXC34bAhsQmfdfF6L9Kaey/DxGvwTmW2ZIyz9Jw2f3ua/NkJXtYsfbPT+IZpEor1l318LIW/N17jt8ji+MCfDZCLSFSkZTkT36ThxFHQj6anHhiRv2hQqc2boAL/JU+BKZU8BZs8cfxNlHEJKUoEgy4mOiUkHKKzua8AnDxPwssbd+QmfiV0hYjNHqYrEQSI9b0wfPT6TPvhKzrCE74WIMt5sUPxRM81uqqSmPq7e89a0kOoAZShPqgsUFXzvbd4/B7ly58bdpQq3TA9vFPlNVGp9mL1gW/2MtDccD6skSUvVEyz6soE9R7eBpDbJs7mkvmqBMcBg7IJCw X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2468; 25:JEYyW/UZ0IfL9XrWtHlHHOs5sdIIjEhguBJCoaI4QXLaVpIzIQht34QYS/PfkIrvOwZpOt82kDAnXvqpVdtnmD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oft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13015025)(13017025)(13018025)(13023025)(8121501046)(13024025)(5005006)(3002001)(10201501046)(6055026)(6096035)(20161123559025)(20161123556025)(20161123563025)(20161123561025)(20161123565025); SRVR:BN6PR03MB2468; BCL:0; PCL:0; RULEID:(400006); SRVR:BN6PR03MB2468; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2468; 4:tac65dARM6NvitxJI4CheJ1yaVIF/L+vbFB2UrYjZWtx5Z1urk2Xdo6Lrpkp6K2wGuGSQVfVTCOfHU38BAOcpiakmvhoZBW5n4Fj6sXQEzqrnUMXsoydA10/KXBZEeEuGJrCz7DWQ9eNBXCugU/Nkxm5Rws2qeqWE8ZNg7BGCX4kjgkadPQnDynXh5s6COKSF90pAKPyPvSg1IWiw7AaJHOU9lMuDBku+MycIwPzVeRtHROnM60IaCvQJ9bC8aJ/xc/816ISslYcuS9QJBQDJqnMyMsAvhBKyqKeC205eU2LajIwHViG/4Gznh9OF2yvN5Pe821Zl2M69ClRdMFL79+zWdJct+1I4hefMrAYD+BW3S588PsHAV6V6oS+F5RzZkSyWFyJbqZTes/AHo2mgCGtTfO786JLDaL1sE+dHVcDwUzCHU/gBbZC+C74wV7USAzZObrVqSk2hPk83/ZfEiGxdFrNscKeXjgUFgw7fxlwp38uBt+gXEU/xVmh2e3vk8lyhmElReHdxX8BM2BFmtLR5B4Mql5y18SDPM/s/S8Hs6qNpn7Nx6pe/PJpai5zMa12ign8eP8RzLvk4wlQPMdy5ZfuPGbSK++SAzmJsvxR/hnqE65fKo32odKD5WjHuCzVRVdtNcRN3L7VWa+DdZFxWLwKDVFWgKVeAu9QUDnEbSKyr2/qhmHrTKb/YSQ2uqFLKgDYanRwlcyiVsOqXMdEVL4QQdmW1ZxGIWNl+PZf66zwbJZv1PN/DcVypoMA X-Forefront-PRVS: 016885DD9B X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BN6PR03MB2468; 23:EF/4Q8snukeabkyVfMWUG7JYbZwaP7L/YrYot?= =?Windows-1252?Q?mUXpsbNO/mZ4EbfL2IyiFPpMaBX7jrQzQxKt80OACimwGGl4tkdOLf+f?= =?Windows-1252?Q?iyqWSlnrLseDk8g2Ze9EpbyYBWZTmiICw118NaEgT/AfH3TbpANMU7Nw?= =?Windows-1252?Q?H9ql8xLqaBu0dmN8t5PwJiARvVxeTCksE+iPhlj+EIOzENfoOixjI/WP?= =?Windows-1252?Q?jjvJE+qtvlU4rNyVeb1vwew3YlELlmmunDFHNAPPxELTrpo5jLGnMkt9?= =?Windows-1252?Q?HFcgiSO4CkCA60xWDpUrGwcczatvptG5YERXm65T26If3u7kHNDR9ER5?= =?Windows-1252?Q?TKc+rt4UsD1Qc1U5rjcgB+c+LRUr7VgcxVbSFW4M0nHtkReNlHjyCceH?= =?Windows-1252?Q?PjZOiC+LW/pWPFIr3MBgqTbyCZ/FOplg4WocqFdmUAWZnfoXyv7fD3Ek?= =?Windows-1252?Q?rMOLJRL6KuvX3ftCT+9V3uQeA7GS9HxwLCNDmB4gF5JN4fz8Kcy0sBDu?= =?Windows-1252?Q?OGX40hVY9jkTa1j/GuLvwCoSQreDFeY7s8WxAk8ls9vmWBkM9RGqlfh/?= =?Windows-1252?Q?7VgXVfAYllvalcmsavCV+8IYMuHDzBjWzlAieyPVVN6inZUGOv3HNoT2?= =?Windows-1252?Q?XviU22+N/LS4TRW9FbVFZUIDM9702A86K0D9bLz9V9RONbofyAfvCnp4?= =?Windows-1252?Q?oGRAW90Knjn/3zGx6RzGtdjdob89YlRYvNDd6AhEkgsydKfB9MUWaSxM?= =?Windows-1252?Q?pZuhO9/2v1mBn4jWSRnJHxCi+6M94CUIvZfNkqu3Uonh/vK93s1ZZ9vw?= =?Windows-1252?Q?fFlVh4bs/VG06VMNfGYaO7KzIY6QjuUOjk++AJdT58PkDSZlztGmqMK9?= =?Windows-1252?Q?gf2sjzVXw4PDOGBvvLgX/SiBgtnCSKka0b95lJQpXkfsHeaFE2At6KJk?= =?Windows-1252?Q?Js1kG5FSk4z8O8GxH99WfYLLh4dSvL4cl10B71CjH8gA0Oq2c3NDWoCD?= =?Windows-1252?Q?xztJOpiKs9eVkAzPOoIheEhvQ/8+w5BvR8MgxUBu31vCB+G4B8CI/Uhx?= =?Windows-1252?Q?4Qbly3MfiWcemgyiyaC1EkKuHYKaf/LIXR2n4x1rHX0Iaq9Ios2gZOVw?= =?Windows-1252?Q?CAJ3HbliID4z9HWzHUHEfm5r+CFyUVUGuJjhV+hd3j4GY9s+KrPkCSPH?= =?Windows-1252?Q?k2gfIQkaqbzz2Xh2M5woNMXQyG+ciVVjYSNQR/hrB+2oykX+JX7VcQS1?= =?Windows-1252?Q?FBOToTE+TC/ndsyp/BqCXAG6VeXtL7VO3OeAY0D+tlOwgMgNTXfLGUqy?= =?Windows-1252?Q?f/bGyYYsGsFDbL+66Lv0DQyXqolJqZvroMcLxYKHfLC89ZG5uiFgn375?= =?Windows-1252?Q?Y4XvOw/EwuSZK7+5jIfcQT4cEMD6fBJvVn6DMUwbZQJvHoQDNTODjce6?= =?Windows-1252?Q?W6JaY4TvWkXEGOnaoH32/2wRr0nVual5yOTnMdXX7L1QBUqFZBVXB3E2?= =?Windows-1252?Q?BWvCp6BlGNEsupmvseMeGPqS3q93ElO2wrO68yf/YorAZ12y6EXvwEfG?= =?Windows-1252?Q?MGkFCy6Zvohi+yP9WawKp2Ntca28C8l5U8pEEd8u7R0U9ZwDkkafWGKU?= =?Windows-1252?Q?6SWF9AauO5md1RmS51jdxHPeSSDSx8Cmd7DxFhls+5V?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2468; 6:X14sP0tsHB2LOEqH3+jVBms73FEK4YaP1ds+ciRkH5pmFppsQ77MpWPOZYpzJN4YBOA5aIBGRQ4tup0OB+FDgSSttrWt6saWKvkpWOfFARHlmSf4HG7XYXQwVZdin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yOa6FujildBhME+AJE0itS2WGeNR4MVDbokSe6xqoMJKNlNBpyfFBfNsMxX6garcNADf5kT7qtChKgYp+o1ofMic+53nhJPS8/oSNvd7o9Ps9eCk2KtPorzliyXCg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2016 13:23:51.1976 (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: BN6PR03MB2468 Subject: Re: [dpdk-dev] [PATCH v4 03/12] eal/bus: add scan, match and insert support 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, 26 Dec 2016 13:23:54 -0000 On Monday 26 December 2016 06:20 PM, Shreyansh Jain wrote: > When a PMD is registred, it will associate itself with a bus. > > A bus is responsible for 'scan' of all the devices attached to it. > All the scanned devices are attached to bus specific device_list. > During the probe operation, 'match' of the drivers and devices would > be done. > > Also, rather than adding a device to tail, a new device might be added to > the list (pivoted on bus) at a predefined position, for example, adding it > in order of addressing. Support for this is added as '*bus_insert'. > > This patch also adds necessary test framework to test the scan and > match callbacks. > > Signed-off-by: Shreyansh Jain > --- > app/test/test_bus.c | 265 ++++++++++++++++++++++++++++++++ > lib/librte_eal/common/eal_common_bus.c | 15 ++ > lib/librte_eal/common/include/rte_bus.h | 64 ++++++++ > 3 files changed, 344 insertions(+) > > diff --git a/app/test/test_bus.c b/app/test/test_bus.c > index 60950d3..98250c8 100644 > --- a/app/test/test_bus.c > +++ b/app/test/test_bus.c > @@ -80,12 +80,32 @@ struct dummy_bus { > struct rte_bus_list orig_bus_list = > TAILQ_HEAD_INITIALIZER(orig_bus_list); > Checkpatch reported an error for this patch. I have sent v5 with the fix. - Shreyansh