From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH v4 03/12] eal/bus: add scan, match and insert support Date: Mon, 26 Dec 2016 18:57:24 +0530 Message-ID: <6ced05ea-ba17-b808-dbc5-6398cfe6ad2e@nxp.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: , To: 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) In-Reply-To: <1482756644-13726-4-git-send-email-shreyansh.jain@nxp.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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