DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nipun Gupta <nipun.gupta@nxp.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	"jerin.jacob@caviumnetworks.com" <jerin.jacob@caviumnetworks.com>,
	"bruce.richardson@intel.com" <bruce.richardson@intel.com>,
	"gage.eads@intel.com" <gage.eads@intel.com>,
	"harry.van.haaren@intel.com" <harry.van.haaren@intel.com>
Subject: Re: [dpdk-dev] [PATCH] eventdev: event device to contain rte device holder
Date: Mon, 20 Feb 2017 04:48:00 +0000	[thread overview]
Message-ID: <AM5PR0401MB25146F3764258D9B73ECE135E65E0@AM5PR0401MB2514.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20170217113020.094e7912@plumbers-lap.home.lan>

Hi Stephen,

> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Saturday, February 18, 2017 1:00
> To: Nipun Gupta <nipun.gupta@nxp.com>
> Cc: dev@dpdk.org; Hemant Agrawal <hemant.agrawal@nxp.com>;
> 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 device
> holder
> 
> On Thu, 16 Feb 2017 16:22:29 +0530
> Nipun Gupta <nipun.gupta@nxp.com> wrote:
> 
> > Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> >
> > 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() != RTE_PROC_PRIMARY)
> >  		return 0;
> >
> > -	pci_dev = eventdev->pci_dev;
> > +	pci_dev = RTE_DEV_TO_PCI(eventdev->dev);
> 
> 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_xyDEV
to get the 'devices on vmbus' from 'rte_device'.

Thanks,
Nipun

  reply	other threads:[~2017-02-20  4:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 10:52 Nipun Gupta
2017-02-17 19:30 ` Stephen Hemminger
2017-02-20  4:48   ` Nipun Gupta [this message]
2017-03-03  9:09 ` Shreyansh Jain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM5PR0401MB25146F3764258D9B73ECE135E65E0@AM5PR0401MB2514.eurprd04.prod.outlook.com \
    --to=nipun.gupta@nxp.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).