From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MG1l6F4H0UyUDP/f+qQqR7jMiyPaiXSYGEFNwVJxbYo=; b=X+U7aq8juukf1n2Nf+QGZGOVbY9yvHGipafVxjUy6L2lzOeA/5js1yijbkEa1rU7FS Jj25DCqShgHByWtX1WDvqBT6L+8cJh99wzlqVj+txT2WJfk5r7B5zqkObJy+5cn2NCL0 dtnZs8kVMvU3BGuUOBKqgu5tr452h8M3ZSbEHTqeiSEAKmOJdD+g9SJuDf1o03K14+ua T73fEyAxi44Fgywvg21jMFllUe/8ovA368Z7HTUBubfADiP7kM5yc4tLmCGK8t1lGycu w0Wg+saC1Z1v5zX1gnwSppJ4OnAgVRmtG6pBj35eNtAgKT2cGESPpK2QMT2J+NMRP5kY no3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MG1l6F4H0UyUDP/f+qQqR7jMiyPaiXSYGEFNwVJxbYo=; b=bXSzZo5KyNZIsKzKsCWPu7EPny03oM7J/ptrakhVsgtCVCMouIGZ/XEuxM6HjKlRJb Okq9MqEgFQfPM8J/ncsd1WmHOk2/skXs7Jg+IwLhjT6yuAsvth+Fag6N3bcDOFZ4MMgU gVxBub+kT7abLEuu2iaEyof2Es0AtIUnKf8EnX+uidkH+zio1p6ZIRnCgWoqG7LOBPwq Hj/jlUMBl//T70g/Zb809E+cFezpWVkzbUDDXm2TeV73bJ0qGf14b4w1PJctyqNTaG8C TMb3mY7lapuItAv+hLkq3FA6Ic/41ScW4Oxk8GUeMYmRErsR7yhviWZRJ+wPHe1qLPNp ndWg== X-Gm-Message-State: AFeK/H0KwGokTXAJW1PPYNmK+srI25SPzXXCnDKUZsBNmcPtsHIkbznIFWTysuHgCYDubCvU X-Received: by 10.223.157.38 with SMTP id k38mr11199785wre.156.1489768818628; Fri, 17 Mar 2017 09:40:18 -0700 (PDT) Received: from platinum (2a01cb0c03c651000226b0fffeed02fc.ipv6.abo.wanadoo.fr. [2a01:cb0c:3c6:5100:226:b0ff:feed:2fc]) by smtp.gmail.com with ESMTPSA id l41sm10497281wre.23.2017.03.17.09.40.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Mar 2017 09:40:18 -0700 (PDT) Date: Fri, 17 Mar 2017 17:40:16 +0100 From: Olivier Matz To: Stephen Hemminger Cc: dev@dpdk.org, thomas.monjalon@6wind.com, david.marchand@6wind.com, bruce.richardson@intel.com, keith.wiles@intel.com Message-ID: <20170317174016.51ca8a10@platinum> In-Reply-To: <20170317091528.5d47b57a@xeon-e3> 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> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/8] eal: support dynamic log types X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2017 16:40:19 -0000 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