From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0084.outbound.protection.outlook.com [104.47.41.84]) by dpdk.org (Postfix) with ESMTP id 3414B7CB5 for ; Tue, 6 Jun 2017 05:06:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hBc/Uy0tTnaJICN48+ykezNjjCZenlQu++VGbeW3CPY=; b=XzgjkbGhc9IllktYIexgwEOoZXH938f+zeO3eOu80PRvIHA2A56l7gRzIVVc7Gig8i2nDwlZOWOsZMqLkriROZ0kqCuPNDyzZVXnGpxtgn9a3fABae+yOuts4xo0s3KnDc6pzv+yzgQDMp9PRT5Phk/cKd8FCIRjsWVKB3SgK5A= Authentication-Results: 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin (171.76.74.1) by CY1PR0701MB1725.namprd07.prod.outlook.com (10.163.21.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Tue, 6 Jun 2017 03:06:04 +0000 Date: Tue, 6 Jun 2017 08:35:48 +0530 From: Jerin Jacob To: =?iso-8859-1?Q?Ga=EBtan?= Rivet Cc: dev@dpdk.org, bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com Message-ID: <20170606030547.GA20006@jerin> References: <20170601164146.13501-1-jerin.jacob@caviumnetworks.com> <20170605125555.GJ18840@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170605125555.GJ18840@bidouze.vm.6wind.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-Originating-IP: [171.76.74.1] X-ClientProxiedBy: BMXPR01CA0039.INDPRD01.PROD.OUTLOOK.COM (10.174.214.25) To CY1PR0701MB1725.namprd07.prod.outlook.com (10.163.21.14) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY1PR0701MB1725: X-MS-Office365-Filtering-Correlation-Id: 30031da2-d404-4bca-c9ef-08d4ac88f9a8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 3:LaGPE0b55S54PZvKcjuVbb1RJDf/DfdErFzUmZNDBQuv5xwuM1LMQtRTZnfMyQGQ8lM/mNVjUtSR9lWWLBRnNIjlX7L3+cC8dx4ocdimyVbFlQ3wZkNYkFSy2Nu92eLaFfOJ1afHyifkQaI9G/adMLnSnXmgVNvte3faVnit7Te8TuHlgFj/7d13reTGgQ84q+6r6DX/v5H1YEIaXntN6wyPExlrssQorfuFRawfqJnEI5M/Z619/6dj9fTNlYgkJZ8UaU/J4tREIU3vNSOVsh4/1H7GsW/5CwoHHnNdiu5/I8qKPOqVnBvNRpwGgg5aBWXBiWweHsSkvpNdFmlfww==; 25:CScF7GVOleaSUjSuSnKyNuVABhetcN5tfOBfzQsv3XFgAcmnIVcAYwVwRaQ3LA4BVMyeohi+INA0BwbK9EHdUhf6udUwk9Dn9m+SeoYKEqEQiWtzyURj34R2qp1Z565FhWMGq+frLG005mMlhpabjTum6aLOlalzRviKPieThwqe+3tm7AZFX224zTHzNiNFN4ejLBCR5avtDzE/OxTiP9wvxCl72XPmopobolcp6uZl73TyoVfQ4M0dM8TB4Pe803oRNJjHbzr+qHul2OzPdhBUVNZmpAMXrar6NY4Jit8utqI3bC3T7IOwVMTfSemzYbVrLKDPiPGmUS/v9EtOhFDN9O6XARktVJjvuHq12FTSiItZFZ/rqOmQhfY3r7Ozva1d9bNBxQWYJKHkcvSqqlJ5aGvRG4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Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(3002001)(10201501046)(6041248)(20161123560025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR0701MB1725; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1; CY1PR0701MB1725; 4:W92DrtMX2lICtXGqrhMVBAUKXkYyGCtE2qUygW?= =?iso-8859-1?Q?xjRHmv1UrFJ7Iarke7cG0OZjBU+rPfQcSGQ8uphzSb9phvCmWdjH7t8F32?= =?iso-8859-1?Q?9J49SbCa5EL1cbwzKJi2rCwBz2iF+zWwPZyFQhLuRh1t6XD1neSpXMvzvv?= =?iso-8859-1?Q?wFw6xhjsMu71aiAB6Vmkp7/+Oy8TmaBSv6VGMKKc4RpHTQGK8A3D8oSKSQ?= =?iso-8859-1?Q?/al8xalZ0UlkCYlZ5BBNQfLGTxU7ihf925wh9mPGGI7C9qZgXDN+oUgn0J?= =?iso-8859-1?Q?Nw7ouLrHFMJjMBtc6xDumMKlQgh91Emw7HdnPgPAQSaBXAapoOHCEpH94W?= =?iso-8859-1?Q?zGsEitsUia5/8aXIfNtlxhdDur/h32Digop0H3E94funP1/mAVnpe0RiXX?= =?iso-8859-1?Q?0x2qpgw+3L1gHq0SRG1oJSS0ChrSwBmudJS5ybLKKyufnNlL79cfZkruAJ?= =?iso-8859-1?Q?cgewxUOC5871B9U4ACqhJvlOxjcTndDTUHUIIO1BAovDanAEq5ZiRhWm1y?= =?iso-8859-1?Q?EpEBLKiMe8hHmnJyrX3fe9fRhiKn535BarDwC0MCVf6XuV58WJhrhqSa0r?= =?iso-8859-1?Q?Y/y3ounznHTPtgUtqUgCl478AC75EnPFmQj9gvdmVgK0BLisYbkTmHFDwz?= =?iso-8859-1?Q?i9kQsqE2krj3ScW9J0qvm3eWvfuqJfUsDn4n+9ZmNgO0VIItt4tnXFYIfM?= =?iso-8859-1?Q?hA/Yzl9Hup80vjpToSnlv9qXohmjAr1r2qZYegjnJ0irBDMNXT079elz1I?= =?iso-8859-1?Q?sCPSd2wMFo7CwCQP/c0nQPDUs+RaypjFgPutaYENB1dLpLZ0qLaOT3Sh31?= =?iso-8859-1?Q?n0zs1yQAQPun7t7qrFPBcFfTLMPqsIIrTqEfY/odIiL0s34AdgTfNlrEm2?= =?iso-8859-1?Q?MFKHNxgWVbsp3Yx3SDeo7bGod2YHHWbWkHSmDokHSVv9HTZg2qyNOyM7/C?= =?iso-8859-1?Q?QPE8q/HQM1UVnHlmU3LPCTJ8z7pM3Z7RVxI79zspUxufnfQFmbTUHIH2dC?= =?iso-8859-1?Q?tjPyNuNzsKvz6f20szkYfSLoDXnNp9BBb+3eJQKdqmeGg2REwD3wjYwRxR?= =?iso-8859-1?Q?CixpsWHxzVlaKUHFGyQdeAcAqx2ou0y2EgrIQa/HSy4wYl8h3XJ8RPoZJe?= =?iso-8859-1?Q?YLwqBW/AoSadda8e5A5GtDf/O/DnKpd8JhBBbrRTc1cEvy1njaia9vcXre?= =?iso-8859-1?Q?Hz+u0VJvsI3oX+7jS5iZACyPZmF6mpMs9VzRxTYWIj0JhDz63ThqV4GOyG?= =?iso-8859-1?Q?cSb9/keNV2DCzQfmRd?= X-Forefront-PRVS: 033054F29A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39410400002)(39400400002)(39450400003)(39850400002)(377424004)(24454002)(13464003)(2870700001)(72206003)(4326008)(6496005)(33656002)(83506001)(33716001)(53936002)(8656002)(66066001)(38730400002)(6246003)(54356999)(47776003)(110136004)(50466002)(23756003)(25786009)(9686003)(55016002)(42186005)(76176999)(50986999)(1076002)(189998001)(6116002)(4001350100001)(5890100001)(478600001)(42882006)(6666003)(6916009)(229853002)(8676002)(305945005)(2906002)(7736002)(81166006)(5660300001)(3846002)(2950100002)(575784001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1725; H:jerin; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1; CY1PR0701MB1725; 23:XM34R5soz3hLWqtrcaBA/LKwsSiTxrTde2AuM?= =?iso-8859-1?Q?5DzGwEHX2B0zFbFmTwtK8+QCFnV0MkGK8NglOF/S8AvAXqxL0foREupK4z?= =?iso-8859-1?Q?JSRl34N+AppFh4S/jgHNHbhNG662W/GDZM96UyOpxhfdeCNWuq8ZQFpTyq?= =?iso-8859-1?Q?Wrjq7+UlQS97cNM3SEtQ6ey34n6ZfAHqNqCKTGbIEMpFhB0z9tjALyE1XL?= =?iso-8859-1?Q?wlnDk21oGSvaJEUGSwFy1voBAish63bApBqif0DW6alxtO+QLjp7nulIWI?= =?iso-8859-1?Q?kQ7wHNz+UfieQHj1d1r/tgRGE1Q5jP58a5S0IgXRg4RcxqGU+p+lePzyws?= =?iso-8859-1?Q?Kz6XYrMnisgC5muDt3J+QKySAazog+JRc4m9TvuYDcHJ7pkcvSpqhIkIY7?= =?iso-8859-1?Q?66MF33G/Oz0RUvAWtmroNT8VHcLuQhjqB/JuBw3ackgXT/Ex2TEqBP/1hj?= =?iso-8859-1?Q?nM6QO3Jjy9IoEFwPiqWMQCooeXSUyHfgyhkInPUe/O1QFCs5cu4UjQacC/?= =?iso-8859-1?Q?ID+JiztmISrQ0bvQVPFDxuaFYULynk7lgR8jCW0Ti3plgk+x+SkoZUjr92?= =?iso-8859-1?Q?IYwDPjWguy+AF25E++5WnTTcdOIvSlZoQUdLHwqOK9UVsQBwI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5RN2wwtMyzKZJooV8Y6c/lxx4Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 7:leibrtvA6crykYxNHZiZvyjwgbxwpsoc7VaKcbHadMnCCT/JgjebMo42EJISw/xlm6nfzpGPDjrcgT4WHbPyE2yTD+Pt9WDhn2WDNqfEi8zL0s12fm2ZKXsMjtM3ZxcYYiLz2LIbgpXPToed29brG4c/YF8YpgxRP+GyYFHm69j8aIvoh7uV7xL+B7ZQTZZ2mwJVvDXEC9Dc9qc5G9KSpu3hAEuioAmAym+t+NiWkgg9Df77YF0ucDyNvTdNKMEyWEhXcPbpPphkwg270I206zDdmkSKkPdC9DdSLghzKtV373UGehsSeTFLKFiDHli5vMTSxBcWpCSI9ipqWRM79A== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2017 03:06:04.2856 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1725 Subject: Re: [dpdk-dev] [PATCH] eventdev: remove PCI dependency 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: Tue, 06 Jun 2017 03:06:10 -0000 -----Original Message----- > Date: Mon, 5 Jun 2017 14:55:55 +0200 > From: Gaëtan Rivet > To: Jerin Jacob > Cc: dev@dpdk.org, bruce.richardson@intel.com, harry.van.haaren@intel.com, > hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com > Subject: Re: [dpdk-dev] [PATCH] eventdev: remove PCI dependency > User-Agent: Mutt/1.5.23 (2014-03-12) > > Hi Jerin, Hi Gaëtan, > > On Thu, Jun 01, 2017 at 10:11:46PM +0530, Jerin Jacob wrote: > > Remove the PCI dependency from generic data structures > > and moved the PCI specific code to rte_event_pmd_pci* > > > > Thanks for working on this. > > Do you plan on removing rte_pci.h in rte_eventdev_pmd.h? Do you think it > would be feasible? That is for PCI PMD specific probe(rte_event_pmd_pci_probe() and rte_event_pmd_pci_remove()), More like, lib/librte_ether/rte_ethdev_pci.h functions in ethdev. So, I think, It is OK to keep rte_pci.h for PMD specific functions. > > > CC: Gaetan Rivet > > Signed-off-by: Jerin Jacob > > --- > > drivers/event/skeleton/skeleton_eventdev.c | 30 +++++++++----- > > lib/librte_eventdev/rte_eventdev.c | 37 +++++++----------- > > lib/librte_eventdev/rte_eventdev.h | 2 - > > lib/librte_eventdev/rte_eventdev_pmd.h | 63 ++++-------------------------- > > 4 files changed, 41 insertions(+), 91 deletions(-) > > > > diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c > > index 800bd76e0..34684aba0 100644 > > --- a/drivers/event/skeleton/skeleton_eventdev.c > > +++ b/drivers/event/skeleton/skeleton_eventdev.c > > @@ -427,18 +427,28 @@ static const struct rte_pci_id pci_id_skeleton_map[] = { > > }, > > }; > > > > -static struct rte_eventdev_driver pci_eventdev_skeleton_pmd = { > > - .pci_drv = { > > - .id_table = pci_id_skeleton_map, > > - .drv_flags = RTE_PCI_DRV_NEED_MAPPING, > > - .probe = rte_event_pmd_pci_probe, > > - .remove = rte_event_pmd_pci_remove, > > - }, > > - .eventdev_init = skeleton_eventdev_init, > > - .dev_private_size = sizeof(struct skeleton_eventdev), > > +static int > > +event_skeleton_pci_probe(struct rte_pci_driver *pci_drv, > > + struct rte_pci_device *pci_dev) > > +{ > > + return rte_event_pmd_pci_probe(pci_drv, pci_dev, > > + sizeof(struct skeleton_eventdev), skeleton_eventdev_init); > > +} > > + > > +static int > > +event_skeleton_pci_remove(struct rte_pci_device *pci_dev) > > +{ > > + return rte_event_pmd_pci_remove(pci_dev, NULL); > > +} > > + > > +static struct rte_pci_driver pci_eventdev_skeleton_pmd = { > > + .id_table = pci_id_skeleton_map, > > + .drv_flags = RTE_PCI_DRV_NEED_MAPPING, > > + .probe = event_skeleton_pci_probe, > > + .remove = event_skeleton_pci_remove, > > }; > > > > -RTE_PMD_REGISTER_PCI(event_skeleton_pci, pci_eventdev_skeleton_pmd.pci_drv); > > +RTE_PMD_REGISTER_PCI(event_skeleton_pci, pci_eventdev_skeleton_pmd); > > RTE_PMD_REGISTER_PCI_TABLE(event_skeleton_pci, pci_id_skeleton_map); > > > > /* VDEV based event device */ > > diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c > > index 20afc3f0e..91f950666 100644 > > --- a/lib/librte_eventdev/rte_eventdev.c > > +++ b/lib/librte_eventdev/rte_eventdev.c > > @@ -126,8 +126,6 @@ rte_event_dev_info_get(uint8_t dev_id, struct rte_event_dev_info *dev_info) > > dev_info->dequeue_timeout_ns = dev->data->dev_conf.dequeue_timeout_ns; > > > > dev_info->dev = dev->dev; > > - if (dev->driver) > > - dev_info->driver_name = dev->driver->pci_drv.driver.name; > > return 0; > > } > > > > @@ -1250,18 +1248,18 @@ rte_event_pmd_vdev_uninit(const char *name) > > > > int > > rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv, > > - struct rte_pci_device *pci_dev) > > + struct rte_pci_device *pci_dev, > > + size_t private_data_size, > > + eventdev_pmd_pci_callback_t devinit) > > { > > - struct rte_eventdev_driver *eventdrv; > > struct rte_eventdev *eventdev; > > > > char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN]; > > > > int retval; > > > > - eventdrv = (struct rte_eventdev_driver *)pci_drv; > > - if (eventdrv == NULL) > > - return -ENODEV; > > + if (devinit == NULL) > > + return -EINVAL; > > > > rte_pci_device_name(&pci_dev->addr, eventdev_name, > > sizeof(eventdev_name)); > > @@ -1275,7 +1273,7 @@ rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv, > > eventdev->data->dev_private = > > rte_zmalloc_socket( > > "eventdev private structure", > > - eventdrv->dev_private_size, > > + private_data_size, > > RTE_CACHE_LINE_SIZE, > > rte_socket_id()); > > > > @@ -1285,10 +1283,9 @@ rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv, > > } > > > > eventdev->dev = &pci_dev->device; > > - eventdev->driver = eventdrv; > > > > /* Invoke PMD device initialization function */ > > - retval = (*eventdrv->eventdev_init)(eventdev); > > + retval = devinit(eventdev); > > if (retval == 0) > > return 0; > > > > @@ -1307,12 +1304,12 @@ rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv, > > } > > > > int > > -rte_event_pmd_pci_remove(struct rte_pci_device *pci_dev) > > +rte_event_pmd_pci_remove(struct rte_pci_device *pci_dev, > > + eventdev_pmd_pci_callback_t devuninit) > > { > > - const struct rte_eventdev_driver *eventdrv; > > struct rte_eventdev *eventdev; > > char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN]; > > - int ret; > > + int ret = 0; > > > > if (pci_dev == NULL) > > return -EINVAL; > > @@ -1324,22 +1321,16 @@ rte_event_pmd_pci_remove(struct rte_pci_device *pci_dev) > > if (eventdev == NULL) > > return -ENODEV; > > > > - eventdrv = (const struct rte_eventdev_driver *)pci_dev->driver; > > - if (eventdrv == NULL) > > - return -ENODEV; > > - > > /* Invoke PMD device un-init function */ > > - if (*eventdrv->eventdev_uninit) { > > - ret = (*eventdrv->eventdev_uninit)(eventdev); > > - if (ret) > > - return ret; > > - } > > + if (devuninit) > > + ret = devuninit(eventdev); > > + if (ret) > > + return ret; > > > > /* Free event device */ > > rte_event_pmd_release(eventdev); > > > > eventdev->dev = NULL; > > - eventdev->driver = NULL; > > > > return 0; > > } > > diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h > > index 20e7293e0..c5b2b7453 100644 > > --- a/lib/librte_eventdev/rte_eventdev.h > > +++ b/lib/librte_eventdev/rte_eventdev.h > > @@ -1063,8 +1063,6 @@ struct rte_eventdev { > > /**< Functions exported by PMD */ > > struct rte_device *dev; > > /**< Device info. supplied by probing */ > > - const struct rte_eventdev_driver *driver; > > - /**< Driver for this device */ > > > > RTE_STD_C11 > > uint8_t attached : 1; > > diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h > > index 4005b3c98..faa6989b4 100644 > > --- a/lib/librte_eventdev/rte_eventdev_pmd.h > > +++ b/lib/librte_eventdev/rte_eventdev_pmd.h > > @@ -87,60 +87,6 @@ extern "C" { > > #define RTE_EVENTDEV_DETACHED (0) > > #define RTE_EVENTDEV_ATTACHED (1) > > > > -/** > > - * Initialisation function of a event driver invoked for each matching > > - * event PCI device detected during the PCI probing phase. > > - * > > - * @param dev > > - * The dev pointer is the address of the *rte_eventdev* structure associated > > - * with the matching device and which has been [automatically] allocated in > > - * the *rte_event_devices* array. > > - * > > - * @return > > - * - 0: Success, the device is properly initialised by the driver. > > - * In particular, the driver MUST have set up the *dev_ops* pointer > > - * of the *dev* structure. > > - * - <0: Error code of the device initialisation failure. > > - */ > > -typedef int (*eventdev_init_t)(struct rte_eventdev *dev); > > - > > -/** > > - * Finalisation function of a driver invoked for each matching > > - * PCI device detected during the PCI closing phase. > > - * > > - * @param dev > > - * The dev pointer is the address of the *rte_eventdev* structure associated > > - * with the matching device and which has been [automatically] allocated in > > - * the *rte_event_devices* array. > > - * > > - * @return > > - * - 0: Success, the device is properly finalised by the driver. > > - * In particular, the driver MUST free the *dev_ops* pointer > > - * of the *dev* structure. > > - * - <0: Error code of the device initialisation failure. > > - */ > > -typedef int (*eventdev_uninit_t)(struct rte_eventdev *dev); > > - > > -/** > > - * The structure associated with a PMD driver. > > - * > > - * Each driver acts as a PCI driver and is represented by a generic > > - * *event_driver* structure that holds: > > - * > > - * - An *rte_pci_driver* structure (which must be the first field). > > - * > > - * - The *eventdev_init* function invoked for each matching PCI device. > > - * > > - * - The size of the private data to allocate for each matching device. > > - */ > > -struct rte_eventdev_driver { > > - struct rte_pci_driver pci_drv; /**< The PMD is also a PCI driver. */ > > - unsigned int dev_private_size; /**< Size of device private data. */ > > - > > - eventdev_init_t eventdev_init; /**< Device init function. */ > > - eventdev_uninit_t eventdev_uninit; /**< Device uninit function. */ > > -}; > > - > > /** Global structure used for maintaining state of allocated event devices */ > > struct rte_eventdev_global { > > uint8_t nb_devs; /**< Number of devices found */ > > @@ -579,18 +525,23 @@ rte_event_pmd_vdev_init(const char *name, size_t dev_private_size, > > int > > rte_event_pmd_vdev_uninit(const char *name); > > > > +typedef int (*eventdev_pmd_pci_callback_t)(struct rte_eventdev *dev); > > + > > /** > > * Wrapper for use by pci drivers as a .probe function to attach to a event > > * interface. > > */ > > int rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv, > > - struct rte_pci_device *pci_dev); > > + struct rte_pci_device *pci_dev, > > + size_t private_data_size, > > + eventdev_pmd_pci_callback_t devinit); > > > > /** > > * Wrapper for use by pci drivers as a .remove function to detach a event > > * interface. > > */ > > -int rte_event_pmd_pci_remove(struct rte_pci_device *pci_dev); > > +int rte_event_pmd_pci_remove(struct rte_pci_device *pci_dev, > > + eventdev_pmd_pci_callback_t devuninit); > > > > #ifdef __cplusplus > > } > > -- > > 2.13.0 > > > > -- > Gaëtan Rivet > 6WIND