From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f44.google.com (mail-pg0-f44.google.com [74.125.83.44]) by dpdk.org (Postfix) with ESMTP id 0CB88CF66 for ; Fri, 17 Mar 2017 17:15:36 +0100 (CET) Received: by mail-pg0-f44.google.com with SMTP id b129so44659440pgc.2 for ; Fri, 17 Mar 2017 09:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Yxw3wWFEBfEi6o0hr2FJvWIkNJvY2MuVJmIXag7ZWas=; b=dY2ecY7Edcb9T7n351gxgx4Rc5knS79G+cHPj7qmtsysttLqFLo3eb3y9H9sKem1Vc Npyx+stptUcEdmYf2Ee74nnnlVUfRb6FrnwIyFo2tSiTjofYwzHI3w53UaJtiG2TaupJ 1cehx+rV9p6ySMlycYvQ+jhT5iEeqp6doGtQQiis+v86hEbe4WokI1UK4hqd2vOSg5ea BYfSTfalt0jVdLYde92g/Wn56uB78g7WuT0dmbkjKTnAtVDacI5LshB9UUCE2O+waSA2 B02fyfhyjnThRrbVj1cjfHUFMkS8JyagfiELKXOUZavmTR/rYBDx3WHZvoXZ2eFQ0Dd7 lufQ== 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=Yxw3wWFEBfEi6o0hr2FJvWIkNJvY2MuVJmIXag7ZWas=; b=GAggjdEZ9Qxo+hlXpjQKwzlJSw+BLKbQlkewdw27nJ1upjgrtmC38sOJuGSy1WLjN6 +6BPLYTVwPzGy+IWSY1SykjnBDXJSSlHPDSNSDrkC9hC4h/o2SswcfeW1wemAD6dYrOz uUm/G93KzArH63ignnzyNVDCxViIW/cHsPhoT71ScY5k4jRsQIzu/ivGyWMgKU11gJok Odk0SHqbsNFOlmcTDM7LBD+9L//4xKCXRF9bPaLDaz42OWZ+T5CQ3S3GOaoVIgr1BTtW 5irt+x2riDiqj4/yESOPMt1I+iBBSWROOiQmDSw4b1TLhM/gj+UFvrFK1ejUuwbWuxtf qqYA== X-Gm-Message-State: AFeK/H1sfvLxEArWPHfQmPzo60BSHnrbOYvTdW0ndlfjX58DpF9U/nny5pQuQRyd7R0F7A== X-Received: by 10.99.101.199 with SMTP id z190mr16598574pgb.219.1489767335357; Fri, 17 Mar 2017 09:15:35 -0700 (PDT) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id f3sm17903174pga.34.2017.03.17.09.15.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Mar 2017 09:15:35 -0700 (PDT) Date: Fri, 17 Mar 2017 09:15:28 -0700 From: Stephen Hemminger To: Olivier Matz Cc: dev@dpdk.org, thomas.monjalon@6wind.com, david.marchand@6wind.com, bruce.richardson@intel.com, keith.wiles@intel.com Message-ID: <20170317091528.5d47b57a@xeon-e3> In-Reply-To: <1489765882-30497-2-git-send-email-olivier.matz@6wind.com> 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> 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:15:36 -0000 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?