The 10/27/2017 10:25, Maxim Uvarov wrote:
> yes, discovery is done by other tools like lspci, /proc  and /sys
> interfaces. Also udev rules are there to make naming persistent.
>
> For pci it can be:
>
> odp_pktio_open("mdev:eth0")
>
> then you parse /proc/bus/pci/devices to find actual driver used for this
> eth0. And if you have matching mdev pktio driver  - open it.

There is no eth0 because the device is bound to vfio or uio driver.

> That looks like very simply and clear.
>
> Maxim.
>
>
> On 27 October 2017 at 01:03, Bill Fischofer <bill.fischo...@linaro.org>
> wrote:
>
> > I think you've captured the distinction correctly. The larger question is
> > what does ODP itself need to do with this? When an interface name is
> > presented to odp_pktio_open() it is the application's responsibility to
> > provide a name string that can be mapped to the device that should be
> > opened. ODP uses that string to locate / load the driver that's needed to
> > operate that device. The driver is then responsible to make the actual
> > connection to the device.
> >
> > When a driver gets a "device string" is needs to translate that into either
> > an appropriate Linux system call (for mdev) or to a set of PCI Bar or other
> > HW register addresses (for dedicated I/O). So if there is a case of a
> > southbound ODP API, it would be to assist with this latter translation.
> >
> > On Thu, Oct 26, 2017 at 12:38 PM, Honnappa Nagarahalli <
> > honnappa.nagaraha...@linaro.org> wrote:
> >
> > > Hi,
> > >    I created a document to convert our discussion into pictures. I
> > > will update this as we discuss other concepts like devio/driver etc.
> > >
> > > https://docs.google.com/a/linaro.org/document/d/1nzy-Qp6hYZU38DVi7_
> > > ZnPiaf3jRqdMN6IQHmfO80Al4/edit?usp=sharing
> > >
> > > Thanks,
> > > Honnappa
> > >
> >

--
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.

Reply via email to