Hi Jan, > -----Original Message----- > From: jblu...@gmail.com [mailto:jblu...@gmail.com] On Behalf Of Jan Blunck > Sent: Tuesday, December 20, 2016 6:47 PM > To: Shreyansh Jain <shreyansh.j...@nxp.com> > Cc: dev@dpdk.org; David Marchand <david.march...@6wind.com>; Thomas Monjalon > <thomas.monja...@6wind.com>; Ferruh Yigit <ferruh.yi...@intel.com>; > jianbo....@linaro.org > Subject: Re: [dpdk-dev] [PATCH v3 02/12] eal/bus: introduce bus abstraction >
[...] > > +#endif /* _RTE_BUS_H */ > > diff --git a/lib/librte_eal/common/include/rte_dev.h > b/lib/librte_eal/common/include/rte_dev.h > > index 8840380..4004f9a 100644 > > --- a/lib/librte_eal/common/include/rte_dev.h > > +++ b/lib/librte_eal/common/include/rte_dev.h > > @@ -122,6 +122,7 @@ struct rte_driver; > > */ > > struct rte_device { > > TAILQ_ENTRY(rte_device) next; /**< Next device */ > > + struct rte_bus *bus; /**< Device connected to this bus */ > > Is there a reason why this isn't const? Though initially I thought it should be fine, while creating v4 of Bus patches, I didn't change it. There are cases where the rte_device is used to access the bus and modify the device list within (attaching/detaching the device). Same is the case for rte_driver. Making bus object read-only, prevents that change. So, I will skip this in v4. If need be, I will revisit in v5 (if any). > > > > struct rte_driver *driver; /**< Associated driver */ > > int numa_node; /**< NUMA node connection */ > > struct rte_devargs *devargs; /**< Device user arguments */ > > @@ -148,6 +149,7 @@ void rte_eal_device_remove(struct rte_device *dev); > > */ > > struct rte_driver { > > TAILQ_ENTRY(rte_driver) next; /**< Next in list. */ > > + struct rte_bus *bus; /**< Bus serviced by this driver */ > > Same thing here. > > > const char *name; /**< Driver name. */ > > const char *alias; /**< Driver alias. */ > > }; > > diff --git a/lib/librte_eal/linuxapp/eal/Makefile > b/lib/librte_eal/linuxapp/eal/Makefile > > index 4e206f0..aa874a5 100644 > > --- a/lib/librte_eal/linuxapp/eal/Makefile > > +++ b/lib/librte_eal/linuxapp/eal/Makefile > > @@ -87,6 +87,7 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += > eal_common_cpuflags.c > > SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_string_fns.c > > SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_hexdump.c > > SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_devargs.c > > +SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_bus.c > > SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_dev.c > > SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_options.c > > SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_thread.c > > diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map > b/lib/librte_eal/linuxapp/eal/rte_eal_version.map > > index 83721ba..c873a7f 100644 > > --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map > > +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map > > @@ -178,3 +178,18 @@ DPDK_16.11 { > > rte_eal_vdrv_unregister; > > > > } DPDK_16.07; > > + > > +DPDK_17.02 { > > + global: > > + > > + rte_bus_list; > > + rte_eal_bus_add_device; > > + rte_eal_bus_add_driver; > > + rte_eal_get_bus; > > + rte_eal_bus_dump; > > + rte_eal_bus_register; > > + rte_eal_bus_remove_device; > > + rte_eal_bus_remove_driver; > > + rte_eal_bus_unregister; > > + > > +} DPDK_16.11; > > -- > > 2.7.4 > > - Shreyansh