From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH 1/8] eal: support dynamic log types Date: Fri, 17 Mar 2017 17:40:16 +0100 Message-ID: <20170317174016.51ca8a10@platinum> References: <1486387756-16865-1-git-send-email-olivier.matz@6wind.com> <1489765882-30497-1-git-send-email-olivier.matz@6wind.com> <1489765882-30497-2-git-send-email-olivier.matz@6wind.com> <20170317091528.5d47b57a@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, thomas.monjalon@6wind.com, david.marchand@6wind.com, bruce.richardson@intel.com, keith.wiles@intel.com To: Stephen Hemminger Return-path: Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) by dpdk.org (Postfix) with ESMTP id D5606CF9E for ; Fri, 17 Mar 2017 17:40:18 +0100 (CET) Received: by mail-wr0-f175.google.com with SMTP id l37so55693260wrc.1 for ; Fri, 17 Mar 2017 09:40:18 -0700 (PDT) In-Reply-To: <20170317091528.5d47b57a@xeon-e3> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Stephen, On Fri, 17 Mar 2017 09:15:28 -0700, Stephen Hemminger wrote: > On Fri, 17 Mar 2017 16:51:15 +0100 > Olivier Matz 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