[dpdk-dev] [PATCH 1/8] eal: support dynamic log types

Olivier Matz olivier.matz at 6wind.com
Fri Mar 17 17:40:16 CET 2017


Hi Stephen,

On Fri, 17 Mar 2017 09:15:28 -0700, Stephen Hemminger <stephen at networkplumber.org> wrote:
> On Fri, 17 Mar 2017 16:51:15 +0100
> Olivier Matz <olivier.matz at 6wind.com> wrote:
> 
> > +static int
> > +rte_log_lookup(const char *name)
> > +{
> > +	size_t i;
> > +
> > +	for (i = 0; i < rte_logs.dynamic_types_len; i++) {
> > +		if (rte_logs.dynamic_types[i].name == NULL)
> > +			continue;
> > +		if (strcmp(name, rte_logs.dynamic_types[i].name) == 0)
> > +			return i;
> > +	}
> > +
> > +	return -1;
> > +}  
> 
> Maybe use strcasecmp to allow for compatibility with old upper case names?

There was no upper case name before (just macros), so I don't think
this is needed.


I'll take care of your other remarks (cf other mails).

Thanks for the review
Olivier


More information about the dev mailing list