> From: David Marchand <david.march...@redhat.com> > Sent: Tuesday, July 21, 2020 4:59 PM > > On Tue, Jul 21, 2020 at 1:19 PM Parav Pandit <pa...@mellanox.com> wrote: > > > This way, net/mlx5 and vdpa/mlx5 will pass their id_map to the mlx5 > > > pci driver whether it is registered to the pci bus or not yet. > > > > And here pci_id_table will not be const *. > > Is that ok? > > This is already the case in the current patch. > I see nothing wrong with it. > The pci code expects this pointer to be const and will it treat it as such. > o.k.
Gaetan, Ferruh, Thomas, Can you please ack as well? > > On the other hand, you may remove the pci table exported by the common > driver as it is useless. > pmdinfogen only parses the .o and extracts the table symbol, so it won't load > other mlx drivers to generate the .pmd.c file. > Ok. > I.e. with current patch, > $ ./usertools/dpdk-pmdinfo.py ./build/drivers/librte_bus_mlx5_pci.so > PMD NAME: mlx5_bus_pci > > > > > > Basically mlx5_pci_bus, mlx5_net and mlx5_vdpa will be called with > > same priority RTE_PRIO_LAST. > > driver id table and drv_flags dynamically updated as PMDs register. > > > > Should we have another API after rte_pci_register() to indicate that > > some field of the driver are updated, instead of just silently > > updating it in a PMD? > > All of this happens in constructor context, this is a really early stage used > to > resolve code dependencies. > No big init should happen there. > Right. Only init() is to dynamically build the pci id table to remove duplicates, how its done today. And it requires reallocating new table as part of mlx5_pci_bus_register() and updating new id table pointer in the driver structure. > We can document this use of the existing API but I don't see which API to > add. > Alright. Will wait for ack on pci id table from Ferruh, Gaetan and Thomas to post v8. Thanks a lot David for the review.