From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f178.google.com (mail-pf0-f178.google.com [209.85.192.178]) by dpdk.org (Postfix) with ESMTP id 2ECC72C27 for ; Wed, 12 Apr 2017 23:41:14 +0200 (CEST) Received: by mail-pf0-f178.google.com with SMTP id s16so19440189pfs.0 for ; Wed, 12 Apr 2017 14:41:14 -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=Ee4JLU5o1v763SVx+aX2Jj7wqUpB9y9TkKb4eSJ0j9k=; b=dEin/lrrtLOkWY4i2VPuoC4o+EbBDkS4alhI/u4GkE0x09g2EKaWvaJJIU9O1ujgt6 TPAXy3s63EKW7DvvzTbiWBGYFmLQs3ENWqCVMSW+XESLePJhf5CNbse4I2FDG17oiwQm gEMjmvofo0v4K5FBlKzQvHF+PUX9+8RUq/gDAG3i6/rf/bkABh1uKNq/HBOUAQe/u/86 H2LJwaXwE8FjtmIbrP1i/0XK7ENcPQ02MzCDbWkA7irFFCHJ0sx7wjoXqCPcTg1uCQ/O Axg+9YW7rwGYHKio8DVrT9cuUtd3T8zEvu2rRmt29HX4aE/gxvPyqY0E0Hma3LkE1lv+ LKEw== 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=Ee4JLU5o1v763SVx+aX2Jj7wqUpB9y9TkKb4eSJ0j9k=; b=F0T4JCDcg+AYAa+yD1enQbImsQX8PP4SUMdvGuWjNAc4zV8lCw8DjRN91h9f5xPhX9 0OSQ3F6qDU4THmmEv6URpVu8TInwLHeEZdZg2cp3dGNFuDKeUVbGu8B1MamyuPks+vno 81yDyMYARKxFDmSfWJB7ZBrZ+BQ2yl8EqpT9oPDEVqJgUxbP1Monaq5CT8LBa+AhCa8v Jed7bBger6pSZs5jn+E/o7Fr7tlaJAWQNRHvm9c17p69jjgx/j6eQTZgnrVXuOiZVkkX xj6h9ppPZXPsK2tSOfCnHa0GXMvU38FfMuVeoom+vxiMZn5FuFAdplQpRXCr3bB5ol6E Psog== X-Gm-Message-State: AN3rC/5pFgmJ8ocmRBK4nsZ/hGtYDfee69y79arNW/MJn6vDQvweeW5x6LMRL6HSbNoxAw== X-Received: by 10.98.202.157 with SMTP id y29mr7834463pfk.225.1492033273511; Wed, 12 Apr 2017 14:41:13 -0700 (PDT) Received: from xeon-e3 (76-14-206-252.or.wavecable.com. [76.14.206.252]) by smtp.gmail.com with ESMTPSA id y65sm38314099pfd.82.2017.04.12.14.41.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Apr 2017 14:41:13 -0700 (PDT) Date: Wed, 12 Apr 2017 14:41:11 -0700 From: Stephen Hemminger To: Pablo de Lara Cc: olivier.matz@6wind.com, thomas.monjalon@6wind.com, dev@dpdk.org Message-ID: <20170412144111.2d6bb7d8@xeon-e3> In-Reply-To: <1492011332-5846-1-git-send-email-pablo.de.lara.guarch@intel.com> References: <1492006471-114636-1-git-send-email-pablo.de.lara.guarch@intel.com> <1492011332-5846-1-git-send-email-pablo.de.lara.guarch@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] eal: redefine logtype values 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: Wed, 12 Apr 2017 21:41:14 -0000 On Wed, 12 Apr 2017 16:35:32 +0100 Pablo de Lara wrote: > + /* register legacy log types */ > + __rte_log_register("eal", RTE_LOGTYPE_EAL); > + __rte_log_register("malloc", RTE_LOGTYPE_MALLOC); > + __rte_log_register("ring", RTE_LOGTYPE_RING); > + __rte_log_register("mempool", RTE_LOGTYPE_MEMPOOL); > + __rte_log_register("timer", RTE_LOGTYPE_TIMER); > + __rte_log_register("pmd", RTE_LOGTYPE_PMD); > + __rte_log_register("hash", RTE_LOGTYPE_HASH); > + __rte_log_register("lpm", RTE_LOGTYPE_LPM); > + __rte_log_register("kni", RTE_LOGTYPE_KNI); > + __rte_log_register("acl", RTE_LOGTYPE_ACL); > + __rte_log_register("power", RTE_LOGTYPE_POWER); > + __rte_log_register("meter", RTE_LOGTYPE_METER); > + __rte_log_register("sched", RTE_LOGTYPE_SCHED); > + __rte_log_register("port", RTE_LOGTYPE_PORT); > + __rte_log_register("table", RTE_LOGTYPE_TABLE); > + __rte_log_register("pipeline", RTE_LOGTYPE_PIPELINE); > + __rte_log_register("mbuf", RTE_LOGTYPE_MBUF); > + __rte_log_register("cryptodev", RTE_LOGTYPE_CRYPTODEV); > + __rte_log_register("efd", RTE_LOGTYPE_EFD); > + __rte_log_register("eventdev", RTE_LOGTYPE_EVENTDEV); > + __rte_log_register("user1", RTE_LOGTYPE_USER1); > + __rte_log_register("user2", RTE_LOGTYPE_USER2); > + __rte_log_register("user3", RTE_LOGTYPE_USER3); > + __rte_log_register("user4", RTE_LOGTYPE_USER4); > + __rte_log_register("user5", RTE_LOGTYPE_USER5); > + __rte_log_register("user6", RTE_LOGTYPE_USER6); > + __rte_log_register("user7", RTE_LOGTYPE_USER7); > + __rte_log_register("user8", RTE_LOGTYPE_USER8); Why is this not a table rather than code? Data driven design is better.