[dpdk-dev] [PATCH v11 00/24] Introducing rte_driver/rte_device generalization

Thomas Monjalon thomas.monjalon at 6wind.com
Tue Oct 4 09:42:12 CEST 2016


2016-10-04 12:21, Shreyansh Jain:
> Hi Thomas,
> 
> On Monday 03 October 2016 07:58 PM, Thomas Monjalon wrote:
> > Applied, thanks everybody for the great (re)work!
> 
> Thanks!
> 
> >
> > 2016-09-20 18:11, Shreyansh Jain:
> >> Future Work/Pending:
> >> ===================
> >>  - Presently eth_driver, rte_eth_dev are not aligned to the rte_driver/
> >>    rte_device model. eth_driver still is a PCI specific entity. This
> >>    has been highlighted by comments from Ferruh in [9].
> >>  - Some variables, like drv_name (as highlighted by Ferruh), are getting
> >>    duplicated across rte_xxx_driver/device and rte_driver/device.
> 
> Both the above are already part of my todo list.
> 
> > What about those pending work?
> >
> > I would add more remaining issues:
> > - probe/remove naming could be applied to vdev for consistency
> 
> Is that for uniformity reasons? I still feel 'probe/remove' are not 
> appropriate for a virtual device. init/deinit are more appropriate. As 
> for PCI, probe/remove are standard parlance and hence suit it better 
> than init/deinit.

PCI probe is "scan + checks + init".
The vdev requires "args parsing + checks + init".
The device will not be initialized if checks fail,
e.g. missing support or name conflict.
I think it could fit in "probe" rather than "init".

The remove word looks appropriate in both cases.

> Nevertheless, uniform naming convention can have its benefits - ease of 
> code understanding being one.

Yes that's the other pro for "probe/remove".

> Change is simple once we come to a conclusion.
> 
> > - rte_eal_device_insert must be called in vdev
> 
> Ok.
> 
> > - REGISTER macros should be prefixed with RTE_
> 
> That would include:
>   DRIVER_REGISTER_VDEV
>   DRIVER_REGISTER_PCI_TABLE
>   DRIVER_REGISTER_PCI
> 
> I will publish a patch soon. This would be fairly straightforward change.
> 
> > - Some functions in EAL does not need eal_ in their prefix:
> > 	rte_eal_pci_   -> rte_pci_
> > 	rte_eal_dev_   -> rte_dev_
> > 	rte_eal_vdev_  -> rte_vdev_
> > 	rte_eal_driver -> rte_drv_
> > 	rte_eal_vdrv   -> rte_vdrv_
> >
> >
> 
> It can be merged with changes for:
>   - drv_name
>   - EAL_ before _REGISTER_ macros
>   - eth_driver => rte_driver naming

Good.
Could you make it this week, please?


More information about the dev mailing list