[dpdk-dev] [PATCH v8 1/9] eal/bus: introduce bus abstraction

Shreyansh Jain shreyansh.jain at nxp.com
Wed Jan 18 06:12:15 CET 2017


> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Wednesday, January 18, 2017 4:50 AM
> To: Shreyansh Jain <shreyansh.jain at nxp.com>
> Cc: dev at dpdk.org
> Subject: Re: [PATCH v8 1/9] eal/bus: introduce bus abstraction
> 
> 2017-01-17 19:07, Shreyansh Jain:
> > +void
> > +rte_bus_register(struct rte_bus *bus)
> > +{
> > +	RTE_VERIFY(bus);
> > +	RTE_VERIFY(bus->name && strlen(bus->name));
> > +
> > +	TAILQ_INSERT_TAIL(&rte_bus_list, bus, next);
> > +	RTE_LOG(INFO, EAL, "Registered [%s] bus.\n", bus->name);
> 
> I think it should be a debug log.

I thought it should be visible to user/app which buses exists parallel to the information about the detected devices.

But, no strong opinion on this - I will change in v9.

> 
> > +/* unregister a bus */
> > +void
> > +rte_bus_unregister(struct rte_bus *bus)
> 
> I appreciate the effort for commenting, but I think the function name
> is self describing.

Ok. I will remove the comment. (as well as similar occurences. 

> 
> > +/**
> > + * @file
> > + *
> > + * RTE PMD Bus Abstraction interfaces
> 
> RTE PMD?
> I would say "DPDK device bus interface"

Yes, that is an oversight. PMD is irrelevant here.

> 
> > +DPDK_17.02 {
> > +	global:
> > +
> > +	rte_bus_list;
> 
> Why the bus list is exported?
> If it is for testing purpose, I wonder wether it is worth to do it.

I have modeled the test cases on the lines of test_pci and it worked on actual pci device lists. Though, it is very much possible to not even touch the actual lists (in either, bus or pci test cases).

I can easily remove the usage of actual list in test_bus.


More information about the dev mailing list