[dpdk-dev] [PATCH 2/2] eal: fix dynamic logs failing to print

Pavan Nikhilesh Bhagavatula pbhagavatula at caviumnetworks.com
Tue Nov 21 12:14:17 CET 2017


On Tue, Nov 21, 2017 at 11:55:00AM +0100, Thomas Monjalon wrote:
> 20/11/2017 19:40, Ferruh Yigit:
> > And, since you are touching these files :),
> > for better regex support, it may be good to have log types hierarchical, like
> > "lib.mbuf", "lib.mempool", "lib.eal.malloc", as done in member library but with
> > "lib" prefix instead of "librte", if this makes sense and you have time would
> > you mind sending a patch for this as well?
>
> I am not sure about using eal in the library names.
> I think lib.malloc is enough and it would allow to move malloc
> (and other libraries) outside of EAL if needed.
> We already moved PCI and VDEV outside of EAL. More could be moved.

Does this look good?

static const struct logtype logtype_strings[] = {
    {RTE_LOGTYPE_EAL,        "lib.eal"},
    {RTE_LOGTYPE_MALLOC,     "lib.malloc"},
    {RTE_LOGTYPE_RING,       "lib.ring"},
    {RTE_LOGTYPE_MEMPOOL,    "lib.mempool"},
    {RTE_LOGTYPE_TIMER,      "lib.timer"},
    {RTE_LOGTYPE_PMD,        "pmd"},
    {RTE_LOGTYPE_HASH,       "lib.hash"},
    {RTE_LOGTYPE_LPM,        "lib.lpm"},
    {RTE_LOGTYPE_KNI,        "lib.kni"},
    {RTE_LOGTYPE_ACL,        "lib.acl"},
    {RTE_LOGTYPE_POWER,      "lib.power"},
    {RTE_LOGTYPE_METER,      "lib.meter"},
    {RTE_LOGTYPE_SCHED,      "lib.sched"},
    {RTE_LOGTYPE_PORT,       "lib.port"},
    {RTE_LOGTYPE_TABLE,      "lib.table"},
    {RTE_LOGTYPE_PIPELINE,   "lib.pipeline"},
    {RTE_LOGTYPE_MBUF,       "lib.mbuf"},
    {RTE_LOGTYPE_CRYPTODEV,  "lib.cryptodev"},
    {RTE_LOGTYPE_EFD,        "lib.efd"},
    {RTE_LOGTYPE_EVENTDEV,   "lib.eventdev"},
    {RTE_LOGTYPE_GSO,        "lib.gso"},
    {RTE_LOGTYPE_USER1,      "user1"},
    {RTE_LOGTYPE_USER2,      "user2"},
    {RTE_LOGTYPE_USER3,      "user3"},
    {RTE_LOGTYPE_USER4,      "user4"},
    {RTE_LOGTYPE_USER5,      "user5"},
    {RTE_LOGTYPE_USER6,      "user6"},
    {RTE_LOGTYPE_USER7,      "user7"},
    {RTE_LOGTYPE_USER8,      "user8"}
};

I will be sending out the patch set soon.

Thanks,
Pavan.


More information about the dev mailing list