From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0042.outbound.protection.outlook.com [104.47.0.42]) by dpdk.org (Postfix) with ESMTP id 0978E374E for ; Mon, 20 Feb 2017 05:48:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=uZxuznGcBLXIQG8+SYJkNMUCTeC2WJrFieHIdSmz+hs=; b=BbCvfwZHsQuc6dPmQd1pVu4X0a/OqgEYwcWNmu/OUNEH3mQadOb+3mMhUFYy9Vr/oaaAMaHtKrhmJjJGLuRst3e5OI44ipmKzaJVmNa9vCKfm4+Kxwiyy6AxBSkcM13A3YRWkJ5TAwHvt1EUIjdLo5+fqWi71gJBlPOZQ6LufrE= Received: from AM5PR0401MB2514.eurprd04.prod.outlook.com (10.169.244.146) by AM4PR04MB1604.eurprd04.prod.outlook.com (10.164.78.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.13; Mon, 20 Feb 2017 04:48:00 +0000 Received: from AM5PR0401MB2514.eurprd04.prod.outlook.com ([10.169.244.146]) by AM5PR0401MB2514.eurprd04.prod.outlook.com ([10.169.244.146]) with mapi id 15.01.0919.015; Mon, 20 Feb 2017 04:48:00 +0000 From: Nipun Gupta To: Stephen Hemminger CC: "dev@dpdk.org" , Hemant Agrawal , "jerin.jacob@caviumnetworks.com" , "bruce.richardson@intel.com" , "gage.eads@intel.com" , "harry.van.haaren@intel.com" Thread-Topic: [dpdk-dev] [PATCH] eventdev: event device to contain rte device holder Thread-Index: AQHSiBAwgKUFr1y300qMInchLlQD8KFtmGwAgAO72rA= Date: Mon, 20 Feb 2017 04:48:00 +0000 Message-ID: References: <1487242349-16801-1-git-send-email-nipun.gupta@nxp.com> <20170217113020.094e7912@plumbers-lap.home.lan> In-Reply-To: <20170217113020.094e7912@plumbers-lap.home.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=nipun.gupta@nxp.com; x-originating-ip: [192.88.169.1] x-microsoft-exchange-diagnostics: 1; AM4PR04MB1604; 7:RVruaVuWxPJ3OpubeFXfs/qcsBhOQ0wrXJRVvMaLLtpjBRI9eSoCATFjztIpBJJUdqLGOPnXsrAtHPXb/DaT3xiJpEipC7nj+2W7nHtxlJw9ACZ26ukZmSOBWS25IlQcFFlXLdC8+FdkezplA0RsIGSJaScToNJOqpUW+cRp4D7FfWjlYA5LxPdE3QY8STMgvVNiYSBY8C2GAL/q2imiOHpbyqUEU8CJXzSd/nrgcCqP2CEL0ZZTJnIRmAIdUCGD993HTR6U8JF0no5RjvUuEklAceXHhMz9jDCxAg7sZh0HRLXcyD/AtFka4BjbD7Msyfgc/Ms5kLgFlppzAXNbBw== x-forefront-antispam-report: SFV:SKI; SCL:-1SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39860400002)(39410400002)(39850400002)(39450400003)(39840400002)(24454002)(189002)(199003)(13464003)(2900100001)(6506006)(102836003)(122556002)(7736002)(305945005)(77096006)(6116002)(3846002)(6436002)(25786008)(229853002)(2906002)(74316002)(4326007)(86362001)(575784001)(50986999)(76176999)(3660700001)(38730400002)(66066001)(7696004)(5660300001)(97736004)(110136004)(3280700002)(33656002)(106116001)(68736007)(189998001)(105586002)(54356999)(53546006)(92566002)(54906002)(99286003)(55016002)(9686003)(106356001)(8676002)(2950100002)(81156014)(6246003)(81166006)(53936002)(8936002)(6916009)(101416001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR04MB1604; H:AM5PR0401MB2514.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-ms-office365-filtering-correlation-id: ee476efb-c797-46fc-c599-08d4594ba5d3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:AM4PR04MB1604; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(278428928389397)(185117386973197)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(20161123558025)(6072148); SRVR:AM4PR04MB1604; BCL:0; PCL:0; RULEID:; SRVR:AM4PR04MB1604; x-forefront-prvs: 02243C58C6 received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2017 04:48:00.4720 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR04MB1604 Subject: Re: [dpdk-dev] [PATCH] 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, 20 Feb 2017 04:48:04 -0000 Hi Stephen, > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Saturday, February 18, 2017 1:00 > To: Nipun Gupta > Cc: dev@dpdk.org; Hemant Agrawal ; > jerin.jacob@caviumnetworks.com; bruce.richardson@intel.com; > gage.eads@intel.com; harry.van.haaren@intel.com > Subject: Re: [dpdk-dev] [PATCH] eventdev: event device to contain rte dev= ice > holder >=20 > On Thu, 16 Feb 2017 16:22:29 +0530 > Nipun Gupta wrote: >=20 > > Signed-off-by: Nipun Gupta > > > > 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. > > --- > > 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() !=3D RTE_PROC_PRIMARY) > > return 0; > > > > - pci_dev =3D eventdev->pci_dev; > > + pci_dev =3D RTE_DEV_TO_PCI(eventdev->dev); >=20 > How will this work when there are more than just PCI devices? > For example, upcoming patches will add rte_vmbus_device. There is no > run time type checking in C. This is within the device driver. AFAIU, a driver will be based on a single= bus and it will get its own device by calling the right conversion function. So, if a new bus like vmbus is there shall be a corresponding RTE_DEV_TO_xy= DEV to get the 'devices on vmbus' from 'rte_device'. Thanks, Nipun