DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Cc: olivier.matz@6wind.com, thomas.monjalon@6wind.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] eal: redefine logtype values
Date: Wed, 12 Apr 2017 14:41:11 -0700	[thread overview]
Message-ID: <20170412144111.2d6bb7d8@xeon-e3> (raw)
In-Reply-To: <1492011332-5846-1-git-send-email-pablo.de.lara.guarch@intel.com>

On Wed, 12 Apr 2017 16:35:32 +0100
Pablo de Lara <pablo.de.lara.guarch@intel.com> 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.

  parent reply	other threads:[~2017-04-12 21:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-12 14:14 [dpdk-dev] [PATCH] " Pablo de Lara
2017-04-12 15:15 ` Thomas Monjalon
2017-04-12 15:22   ` De Lara Guarch, Pablo
2017-04-12 15:35 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
2017-04-12 19:23   ` Olivier MATZ
2017-04-13  8:32     ` De Lara Guarch, Pablo
2017-04-13  9:09       ` De Lara Guarch, Pablo
2017-04-12 21:41   ` Stephen Hemminger [this message]
2017-04-13 13:43     ` De Lara Guarch, Pablo
2017-04-13 13:42   ` [dpdk-dev] [PATCH v3] " Pablo de Lara
2017-04-18  9:57     ` Olivier MATZ
2017-04-19 11:12       ` De Lara Guarch, Pablo
2017-04-19 11:22     ` [dpdk-dev] [PATCH] " Pablo de Lara
2017-04-19 11:23       ` De Lara Guarch, Pablo
2017-04-19 11:24     ` [dpdk-dev] [PATCH v4] " Pablo de Lara
2017-04-19 12:15       ` Olivier MATZ
2017-04-19 13:46         ` De Lara Guarch, Pablo
2017-04-19 14:06       ` [dpdk-dev] [PATCH v5] " Pablo de Lara
2017-04-19 14:16         ` Olivier MATZ
2017-04-19 22:49           ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170412144111.2d6bb7d8@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).