Hello David, On Thursday 10 November 2016 01:46 PM, David Marchand wrote: > Hello Shreyansh, > > On Thu, Nov 10, 2016 at 8:26 AM, Shreyansh Jain <shreyansh.jain at nxp.com> > wrote: >> I need some help and clarification regarding some changes I am doing to >> cleanup the EAL code. >> >> There are some changes which should be done for eth_driver/rte_eth_device >> structures: >> >> 1. most obvious, eth_driver should be renamed to rte_eth_driver. >> 2. eth_driver currently has rte_pci_driver embedded in it >> - there can be ethernet devices which are _not_ PCI >> - in which case, this structure should be removed. > > Do we really need to keep a eth_driver ?
No. As you have rightly mentioned below (as well as in your Jan'16 post), it is a mere convenience. > As far as I can see, it is only a convenient wrapper for existing pci > drivers, but in the end it is just a pci_driver with ethdev context in > it that could be pushed to each existing driver. Indeed. My problem (or lack of understanding) is that all PMDs rely on it and I don't know in what all pattern they have envisioned using this model of ethdev->pci_dev, the initialization sequences. rte_device->init/uninit would settle most of those worries, I think. > > In my initial description > http://dpdk.org/ml/archives/dev/2016-January/031390.html, what I had > in mind was only having a rte_eth_device pointing to a generic > rte_device. Though I had read it (during the rte_device/driver series) but didn't remember it while posting this. I agree with your point of doing away with eth_driver. > If we need to invoke some generic driver ops from ethdev (I can only > see the ethdev hotplug api, maybe I missed something), then we would > go through rte_eth_device -> rte_device -> rte_driver. Agree with you. > The rte_driver keeps its own bus/private logic in its code, and no > need to expose a type. Agree. > > >> 3. Similarly, rte_eth_dev has rte_pci_device which should be replaced with >> rte_device. > > Yes, that's the main change for me. Indeed. This is a big change. It impacts a lot of EAL code. > > > Thanks. > Intent of this email was to know if I am missing something in assuming that eth_driver is actually not being used much. I will keep the comments from your email in mind while making changes. Thanks. _ Shreyansh