From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0040.outbound.protection.outlook.com [104.47.34.40]) by dpdk.org (Postfix) with ESMTP id 0334DA10 for ; Mon, 13 Mar 2017 09:50:28 +0100 (CET) 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=09XdTlMCEfxDe1z6gEGIAgJzSlurXTGmwBzLXTaTzKc=; b=ofvJGCdnPUn0SH0nb0X/KNKDTqEL+1eXQ08beyzXvGUj13M25rVXagBplRyHtk5XcVMbtxLCPwTjWVs1Zj3oNE41cflsV+bIj8891i7c6nGGRcWJx8xcUCHoZ6OaElEv54zeQ5qSgYMlBoj380buKrDLGzg61L6l5UwrGmWbMJA= Authentication-Results: nxp.com; dkim=none (message not signed) header.d=none; nxp.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (111.93.218.67) by BLUPR0701MB1715.namprd07.prod.outlook.com (10.163.85.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Mon, 13 Mar 2017 08:50:23 +0000 Date: Mon, 13 Mar 2017 14:20:06 +0530 From: Jerin Jacob To: Nipun Gupta Cc: dev@dpdk.org, hemant.agrawal@nxp.com, bruce.richardson@intel.com, gage.eads@intel.com, harry.van.haaren@intel.com, shreyansh.jain@nxp.com Message-ID: <20170313085005.nwjzwh3ds2v5ty3h@localhost.localdomain> References: <1488555182-17881-1-git-send-email-nipun.gupta@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1488555182-17881-1-git-send-email-nipun.gupta@nxp.com> User-Agent: NeoMutt/20170306 (1.8.0) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0098.INDPRD01.PROD.OUTLOOK.COM (10.174.208.14) To BLUPR0701MB1715.namprd07.prod.outlook.com (10.163.85.141) X-MS-Office365-Filtering-Correlation-Id: 196af813-b6f6-47d7-a8c7-08d469edfe73 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB1715; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 3:0IyLFQ5TZigSqxb35zmdbb+3Toa06dLY0vWZGP2PCRFZU/9pKAKsFCbIlBhyhbEv11CYx2cxhPm5eYp5Vppe+5tXUJRf4nEd0yvsCTAVBBMFjR/6idZdwFoAQ6uC2Zrul96nq9OPrGgSVLxj4jBbTTyUZHu46QKoQBHBDLbf276f8YjaRD6SxCb00qLz4O1ZojjZ5M4Gp+Y7yClMDyJ29aNHiXHLUTtNg4Nq7m8oom/lZ76xOejFVBWq6laCAmyJ/NBojd5dM6mk4oAfDmPGqg==; 25:MbXQQ6mPdJUNSUEAl1uYvLkouwhAZZl9W5S6b1XDVJbVrYRzyhuJok8ostI3/yzWdz9cUSFpQI7LsUk5Xl4Xtxc2MVwd1OtYZ4Dtf4/bSOI39uxDYUGCOfe5vL+iTZzXITwZ1xKlw/gDyfBBhKlWMu9uE7lb7SeSNde4yeMppSFPTgYWziDxmS7x+1mai0QaXN1xqYg5w1gyuR/89Jyv4TsvlZQejIn5+UV6NydX8dPLcubntcDrBBx6k0ctddu75ieCIDJ1ACHDXtmyckp+67pDtf+Lz00nO0y1Ay9WPxTIZtNQn4Tt4hFJ+r+KM1R5/EnvU2G3yhFS/+Bnk7vRY0qFaF++XJ06nrhSFP+wCMk1TBwTXHoPeEHAy01TwacLRT7AOGXjSvQ3FgzPBII0aH40Aj9xDPlpDQFsY39mRgbZVYaBhWtsWHIX9R9y4Ykyu3WNCzdA2lt+L9sefdhc/g== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 31:P58+Z5TJn1vNiP2XZDdSiuACItOrNp9LTiS9iG9haqSBEpc70fPpSsX0zdSJ2nqMe3Kqs/TljQzsp5P3Iua25+UKNCi1WedkCiHb9gLkTKEyKFytcLIrC6an9DRu5zV+1xJgG0c0c8yUAcDnCHs4oAFGOuMkAXlSQKQhfsWN3XJg3Fj/r9si6z1a9CDGsiVMEurQpm6oW9wUNXozoPBZYhK5UtOxApWqnSVHGypptyL+TpfwhEIOvzq5jD/KQaA3QyIKyVYBzGZvlohTIAfGXQ==; 20:tKemMsNnrK9tUPTCuWqVrz+g2farGBfSpkcOzJERTyhhUFQ3Kthgcy3CdTpm65SsUjOKyWwFMfQp9lG2X0PBtFtHkW0mXCiwoc7ZQZBEY69E4q98Yop6XFmU6S5zooSi2ZjepU6CT2z3vY/oXT9iow3haRLyhpWCCuzkrUn4QBwzVhCKy0tsrCLe9n94xJgw2jrxAd1OIoeYJteMvRF5r2PDjo6j5UIiYmpfjwmmrcjxX9ds0FyKPFFzdNJlea1eTJXS31FzvwWDXeiDdzqc5zFzJouzBZdFFld8PG+oUWM5Ql4rTBEMHjRuTytmO4OwVBd2yEnp/x/wSGvyBTH4FBRVLze+cCTBBEHsYqFJATQYb+exhKIqtO1dWjvYgPmQlXRDgv/buhPcsBBklXxPH0LknQn8OHQa+3ANIZILkdHL9W4FDaQFO7DRIXsaDa9GTNXKKAH8fjMPZtXsN9jRichuzr2Sj35B78BbunYC05HGnIxcnmoW9dDe/UNeSMtjA3P5dYHcOOcu/ljHxYu0KqkVqPyyxvoazXeHnnYtwRE6aNAqyywt8jMK81NGo0fCqaCGYEwJtohqzIvBzrd5g0POL2wjUQHNsyYD65WfSC4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397)(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(20161123558025)(6072148); SRVR:BLUPR0701MB1715; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1715; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 4:j93XFUaXWGqGxus0FfFS0STWIJ49tTivGlYXVOLyRpdMcz6zTlwMBfB9JMXfBqvzwcCok7HM5XlVtfX2Hp2teK8IX82+z0NETOiv/akLJpCZ6229O+YSKizcnR58MXHHxORgEzJqiwxQzxTauYsmLh1qZ/vHeUTBpu2ipuTMpUYqFiutHGLlwfQr3qU5cZ7Flbkr2TNUIxybVIr8ARJ8Cby5f7fXSFD3phN9ZzCdKeOBGc65RK4XnX7Vy+MG1JAEtdqIloIITyAioxpj7YQt0PJIInrgJuPH6Mo1vIpxq02HzKuUd49XRAFjemLXikdXfkvyd0cPSMlH4R4tEKvAPE8IDhkda5v/xRcWN2oK+z0V+O8BbSmy614mf43EabACRPQBi8jOve3TWcITnng211a1CFlhfN05XzYvssuEfmv+jEDcv/V0SguHpGpPlKFFNNUnOepGcM0DlKgtAER7TV8RWAd4E1jR1LSBEclhwUPh8T1kdEiCH8awHh3216s0HdxBgrbXAIkce21Vu4pk088q4WhZFJgN/dthl5GtyweKQ0xr0strhhLkCHcZH0LZgJKYr5Jdn8VoyPMtbQ2DEZ53lHbsdIFbrTEyNfCm2e0ftcXLoF99hEjnjh9nlEalmqKsOBeM2zDf93oHna9yxlQJmiFE1QlxaDVn7+m7Q6z8rf/lYBrvxJeYeEh5r0D2 X-Forefront-PRVS: 0245702D7B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(39450400003)(24454002)(6666003)(42186005)(6916009)(42882006)(2950100002)(33646002)(5009440100003)(5660300001)(76176999)(54356999)(50986999)(61506002)(6116002)(47776003)(66066001)(53936002)(189998001)(229853002)(1076002)(23726003)(110136004)(38730400002)(6246003)(3846002)(2906002)(81166006)(4326008)(575784001)(8676002)(7736002)(305945005)(8656002)(6506006)(55016002)(9686003)(25786008)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1715; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1715; 23:8DedI1RblHYhdTphz00zion9m2eX6kUBX8onaEg?= =?us-ascii?Q?CHTWvMgqhP00psrkcEgEfyudxGR3vJ7pSoxFCYmFT5kO6ayDHA3pOb87sTaB?= =?us-ascii?Q?BZlSnJjRSl7ngj3L4oiy72uBqVTsB9ZIz2azMxg+F7NBsWacPjm0zIi81S93?= =?us-ascii?Q?haU1RIrJsrpW3FVL+6PbpB2fEFPtvjESS2wXZSCGp+L6ByXJ6bVLYtClVOI2?= =?us-ascii?Q?WwwzT1O1n26OodTIrAJqwMPy1TtfvoIIVxSJ9B9Gaz/AVJU/Wo65BJ8GA8oL?= =?us-ascii?Q?0CfEJCB6Y+Kwf0udohx92dLYuge1aoEk+AjfDMx78F7eXYm9TZaFF6OolpVL?= =?us-ascii?Q?58nt+U6otbUfwnhWMWxkBohNY4oqX/IcWOdy9KdA5tyzzC0xdkM8a7K1YMpj?= =?us-ascii?Q?x0XevgSTK56FhHsazrwgt5EB0N6mAmnFdmLsMb6MdynxRsd1AfRB0gNTUVUg?= =?us-ascii?Q?075fKWBD0162Dp0gsgrrn82g36RPTguwJ//Jr7R0NiFGYm0prcsIr2tviaOB?= =?us-ascii?Q?3MdrY7gAiwSbdojGliP90R+yBrK6hSNvqJyIePr/IbkWe8ICiQKHPwUcGc6g?= =?us-ascii?Q?x4p7bOF6p+LTHoDXso/1nLPJMrm+XE1WVl5QXUJi37ij2C87ugmsDgPNrzUG?= =?us-ascii?Q?BMpMapB7toUVGGblUGYKA+ywRvv0gSuDHMz3GJdxpx1l7meY4R5OzivoiEYm?= =?us-ascii?Q?Zn1P41x6FM47Vny/Rl1HFs5Jc/UKijzbaiXnMFVn5DXVeYxawu7irNW00rQ7?= =?us-ascii?Q?8yeeGJUOfjoCVS3V44pgXq6ml7TVHT8/Lb3pr5OB+A2dyJybsKzAI+PKcXb0?= =?us-ascii?Q?n0LJHzyIKY2XIOV78pYuMZsntwxCzXHdnGCRZg3tNAZJF0SEhDVSE3wkyZct?= =?us-ascii?Q?wbkwJYeGaHa9xmLzOVNGwrEACKeNMWsmu0ETPeOx+h8CLNTkp7ACdw9cFtZ2?= =?us-ascii?Q?mDqG7QNqECh4KwdXtKNXH3R1smLS+V8wX9ZWse2rMSHrxx6pD/db3vkGoJNm?= =?us-ascii?Q?mUUsx8cbWmhVvBUT2MF+rBM1vOss+Pc5DUjwmhhb/axbiuA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 6:mJj2oUSgk+HaJsKsvWmxXhlZnbH5X7ZraDR9cBJvk8JMPMaJuPxOJ5Z8mtBROU9I5qRnpEnx6sJGKdOAcEuAPoq3NMOJE26p6mmVu49Ir4WZhQDJkDrinx95XD+1ZDKss70wncD+p2h4FgKKhq1t3kvn+hNcJ3Unm8YPSLIFCGMGzTDo++Ep3NJo2vycFkWdG115/eDO6MRDtqbW6qeSRpQ2QYUmeaRslo8x17KXy0AMlhXKV45ZQ3GGSNfWjfxqoK0zeGJu34SihXV1PctidKbxNPD1yXawiUWV3g1og84KrTrfTSqH4zeCGUwdtbW2M4QmXHusjF5bHg7N7bdze58xBSn2AdaexrP2+XPQVDSFiBq4MxZ6a4e28YWHk3gbccdmDTzLf3GjcAvaf7knVA==; 5:RTbosXjcD+3THjhMaE3+3BUT6yMMPJFN4ZMC/uek4lw2WgDnCYjNOPS1YDzCkbBIQIhtnAYfe8xo/WV8pQLkph0GF9WkS/BSnDScu/o8FtrgUUyYJJG+yrundQhscZUy7QHKjhPCQp/jDP+OKXAkBA==; 24:baXOp25J8pGzZ6snVaFnbz+el80IpFNUBwtSM77N3gb8FwvB/FNkUowb0gHaxceBciV2n+Uo/cZqDic47o67ytkTthMF1SiHtU5ndQxoNYE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 7:FNFSmRgZtq6Bq7+YBBCSweblhCTTsaLXKXBd7ypm5/szcDQveylH+/P+wSBMy1h/guqA9OcZsRzcvRYuXB/U+D7qRWOtyiN8i1xjvcrDdGm9DiAmm0bNPHGA+c8cs/Anc/VsoMeKogPi+EmyD9aE5+Np3O+eXgz8U1+askaNU7mDWEMydusJsyE3sPAxqTfTC6+S+sdIi5ZtXxYXIxH+I9Y0gnFeMML+mHOsDYsz3e56VePv2S6ogndvrdoV1moXRt2woQR5it4Yb4oqS2DeWDF2CyA3NGXBVQ1t8FZUvbZ8D1q4kLSE/d14n7ptJ1bYbvkuUc3+dPvtJwjn0y5p7Q== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2017 08:50:23.3864 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1715 Subject: Re: [dpdk-dev] [PATCH v2] eventdev: event device to contain rte device holder 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, 13 Mar 2017 08:50:28 -0000 On Fri, Mar 03, 2017 at 09:03:02PM +0530, Nipun Gupta wrote: > rte_device is a generic device which is available to the applications > and EAL. This patch replaces rte_pci_device in 'struct rte_eventdev' > and in 'struct rte_event_dev_info' with common rte_device. > > Signed-off-by: Nipun Gupta > Acked-by: Shreyansh Jain Applied to dpdk-next-eventdev/master. Thanks. > --- > drivers/event/skeleton/skeleton_eventdev.c | 2 +- > lib/librte_eventdev/rte_eventdev.c | 6 +++--- > lib/librte_eventdev/rte_eventdev.h | 6 +++--- > 3 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c > index dee0faf..770dce3 100644 > --- a/drivers/event/skeleton/skeleton_eventdev.c > +++ b/drivers/event/skeleton/skeleton_eventdev.c > @@ -383,7 +383,7 @@ > if (rte_eal_process_type() != RTE_PROC_PRIMARY) > return 0; > > - pci_dev = eventdev->pci_dev; > + pci_dev = RTE_DEV_TO_PCI(eventdev->dev); > > skel->reg_base = (uintptr_t)pci_dev->mem_resource[0].addr; > if (!skel->reg_base) { > diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c > index 68bfc3b..b8be5da 100644 > --- a/lib/librte_eventdev/rte_eventdev.c > +++ b/lib/librte_eventdev/rte_eventdev.c > @@ -125,7 +125,7 @@ > > dev_info->dequeue_timeout_ns = dev->data->dev_conf.dequeue_timeout_ns; > > - dev_info->pci_dev = dev->pci_dev; > + dev_info->dev = dev->dev; > if (dev->driver) > dev_info->driver_name = dev->driver->pci_drv.driver.name; > return 0; > @@ -1196,7 +1196,7 @@ struct rte_eventdev * > "device data"); > } > > - eventdev->pci_dev = pci_dev; > + eventdev->dev = &pci_dev->device; > eventdev->driver = eventdrv; > > /* Invoke PMD device initialization function */ > @@ -1250,7 +1250,7 @@ struct rte_eventdev * > /* Free event device */ > rte_event_pmd_release(eventdev); > > - eventdev->pci_dev = NULL; > + 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 7073987..6140078 100644 > --- a/lib/librte_eventdev/rte_eventdev.h > +++ b/lib/librte_eventdev/rte_eventdev.h > @@ -330,7 +330,7 @@ > */ > struct rte_event_dev_info { > const char *driver_name; /**< Event driver name */ > - struct rte_pci_device *pci_dev; /**< PCI information */ > + struct rte_device *dev; /**< Device information */ > uint32_t min_dequeue_timeout_ns; > /**< Minimum supported global dequeue timeout(ns) by this device */ > uint32_t max_dequeue_timeout_ns; > @@ -1059,8 +1059,8 @@ struct rte_eventdev { > /**< Pointer to device data */ > const struct rte_eventdev_ops *dev_ops; > /**< Functions exported by PMD */ > - struct rte_pci_device *pci_dev; > - /**< PCI info. supplied by probing */ > + struct rte_device *dev; > + /**< Device info. supplied by probing */ > const struct rte_eventdev_driver *driver; > /**< Driver for this device */ > > -- > 1.9.1 >