get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/123639/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 123639,
    "url": "http://patches.dpdk.org/api/patches/123639/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230210010724.890413-15-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230210010724.890413-15-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230210010724.890413-15-stephen@networkplumber.org",
    "date": "2023-02-10T01:07:22",
    "name": "[v3,14/16] table: convert RTE_LOGTYPE_TABLE to dynamic logtype",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d113ccb1e59c986452277f5fbf140901b8bd7cf3",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230210010724.890413-15-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 26935,
            "url": "http://patches.dpdk.org/api/series/26935/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=26935",
            "date": "2023-02-10T01:07:08",
            "name": "Replace use of static logtypes",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/26935/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/123639/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/123639/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id E98E041C58;\n\tFri, 10 Feb 2023 02:09:37 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9CA1E42D9B;\n\tFri, 10 Feb 2023 02:08:25 +0100 (CET)",
            "from mail-pj1-f49.google.com (mail-pj1-f49.google.com\n [209.85.216.49]) by mails.dpdk.org (Postfix) with ESMTP id 534D842D3E\n for <dev@dpdk.org>; Fri, 10 Feb 2023 02:08:19 +0100 (CET)",
            "by mail-pj1-f49.google.com with SMTP id pj3so3756135pjb.1\n for <dev@dpdk.org>; Thu, 09 Feb 2023 17:08:19 -0800 (PST)",
            "from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218])\n by smtp.gmail.com with ESMTPSA id\n jd9-20020a170903260900b0019625428cefsm2103023plb.281.2023.02.09.17.08.16\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 09 Feb 2023 17:08:17 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20210112.gappssmtp.com; s=20210112;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=oUD4untaWq9ClN/tsZ8toVOkAn+YUUKEAaJT0knWzqU=;\n b=SFwBNMohg7kMH9vq3FaOBo6xnoyfVxfchNYOxIhDZWvB3hJda+1c/HjMCSD/6QMlEx\n SJeFjiy/Z3ahix9+I9Wtfw/09n+VjQxd2YJVVQaXjjMTwg7i0LbQKgjCqTgugzDMsIQ7\n mQVhuaLqkhpatcROAOInuvkm1f9P1YYif3nW2dAnnBZ7rY7CqPa380/cpJh7u6nt5Bo6\n 34BZjMmBpxUVs8kWQWniRRhdAsQpJUC23yS6RBCBqrWQWbAeGO8wtD+m9K3pAC+uGDLn\n +lANWJzfRY+6FKg6pIBwef1/1x+5xaeKb27989m/sp4MB2bKo886nvtSTVSEQ6WXVGYm\n lchw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=oUD4untaWq9ClN/tsZ8toVOkAn+YUUKEAaJT0knWzqU=;\n b=iE9Y12Gq9dbnqea/uEZt62m49m7LKJlK58nWhuvSAowa9mSEYlH7WkpaSMsHhR9wtC\n 0aFREnNAnwzaRabXNcfQBs63W3BJVhsURIv8RzYj8cn8Y1rli8Dgf9p2qkytckYnG1Du\n a+RaTn8kza9IvKMK9NWj0Pr9OVxpRoUCKuptRE039qf32o4xtAI6eFLHysfJEjix7ffS\n aGt5d2AZp354aDGa2+L9c0jJTThx4lcypn8XdDXQxjUHAInGdHPQzPZlpwNTuibx0Q2B\n CvHOLjBh+uwskqhUCC2XZlcSfJWJRuHC5S9yYhZegYl0lL6JTWXCBeH6BWkf2OCNfBXk\n V9sA==",
        "X-Gm-Message-State": "AO0yUKVxXE4hBO0eGpdWDcyCy9/gOQRDx79x3TOlA4o3V00YS6BDHX6H\n eYCscP/CNmLFZ0A0EoOa9MaMv7TDGYQPk7io+XI=",
        "X-Google-Smtp-Source": "\n AK7set9dv/mS8Cm/XCU8o8VSdsftskP7N2lywP1vEFzfEVt8gjByj1OaeWtXWG7nmXGbjhc47qu6UA==",
        "X-Received": "by 2002:a17:902:f54f:b0:199:1769:48dc with SMTP id\n h15-20020a170902f54f00b00199176948dcmr13745806plf.65.1675991297662;\n Thu, 09 Feb 2023 17:08:17 -0800 (PST)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Cristian Dumitrescu <cristian.dumitrescu@intel.com>",
        "Subject": "[PATCH v3 14/16] table: convert RTE_LOGTYPE_TABLE to dynamic logtype",
        "Date": "Thu,  9 Feb 2023 17:07:22 -0800",
        "Message-Id": "<20230210010724.890413-15-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.39.1",
        "In-Reply-To": "<20230210010724.890413-1-stephen@networkplumber.org>",
        "References": "<20230207204151.1503491-1-stephen@networkplumber.org>\n <20230210010724.890413-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Use logtype suffixes for various components of this library.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/eal/common/eal_common_log.c   |  1 -\n lib/eal/include/rte_log.h         |  2 +-\n lib/table/rte_table_acl.c         | 90 +++++++++++++------------------\n lib/table/rte_table_array.c       | 23 ++++----\n lib/table/rte_table_hash_cuckoo.c | 30 ++++++-----\n lib/table/rte_table_hash_ext.c    | 34 +++++++-----\n lib/table/rte_table_hash_key16.c  | 56 ++++++++++---------\n lib/table/rte_table_hash_key32.c  | 62 ++++++++++-----------\n lib/table/rte_table_hash_key8.c   | 59 ++++++++++----------\n lib/table/rte_table_hash_lru.c    | 35 ++++++------\n lib/table/rte_table_lpm.c         | 54 +++++++++----------\n lib/table/rte_table_lpm_ipv6.c    | 56 +++++++++----------\n lib/table/rte_table_stub.c        |  9 ++--\n 13 files changed, 257 insertions(+), 254 deletions(-)",
    "diff": "diff --git a/lib/eal/common/eal_common_log.c b/lib/eal/common/eal_common_log.c\nindex 7002e267be37..a4e718e51d12 100644\n--- a/lib/eal/common/eal_common_log.c\n+++ b/lib/eal/common/eal_common_log.c\n@@ -350,7 +350,6 @@ struct logtype {\n static const struct logtype logtype_strings[] = {\n \t{RTE_LOGTYPE_EAL,        \"lib.eal\"},\n \t{RTE_LOGTYPE_PMD,        \"pmd\"},\n-\t{RTE_LOGTYPE_TABLE,      \"lib.table\"},\n \t{RTE_LOGTYPE_PIPELINE,   \"lib.pipeline\"},\n \t{RTE_LOGTYPE_CRYPTODEV,  \"lib.cryptodev\"},\n \t{RTE_LOGTYPE_EVENTDEV,   \"lib.eventdev\"},\ndiff --git a/lib/eal/include/rte_log.h b/lib/eal/include/rte_log.h\nindex ff714a703be7..af87eb42ddb3 100644\n--- a/lib/eal/include/rte_log.h\n+++ b/lib/eal/include/rte_log.h\n@@ -40,7 +40,7 @@ extern \"C\" {\n \t\t\t\t /* was RTE_LOGTYPE_METER */\n \t\t\t\t /* was RTE_LOGTYPE_SCHED */\n \t\t\t\t /* was RTE_LOGTYPE_PORT */\n-#define RTE_LOGTYPE_TABLE     14 /**< Log related to table. */\n+\t\t\t\t /* was RTE_LOGTYPE_TABLE */\n #define RTE_LOGTYPE_PIPELINE  15 /**< Log related to pipeline. */\n \t\t\t\t /* was RTE_LOGTYPE_MBUF */\n #define RTE_LOGTYPE_CRYPTODEV 17 /**< Log related to cryptodev. */\ndiff --git a/lib/table/rte_table_acl.c b/lib/table/rte_table_acl.c\nindex 53fd5c66adb5..87081f183862 100644\n--- a/lib/table/rte_table_acl.c\n+++ b/lib/table/rte_table_acl.c\n@@ -11,6 +11,11 @@\n \n #include \"rte_table_acl.h\"\n \n+RTE_LOG_REGISTER_SUFFIX(table_logtype_acl, acl, INFO);\n+#define TABLE_ACL_LOG(level, fmt, args...)\t\t\\\n+\trte_log(RTE_LOG_ ## level, table_logtype_acl,\t\\\n+\t\t\"%s(): \" fmt \"\\n\", __func__, ##args)\n+\n #ifdef RTE_TABLE_STATS_COLLECT\n \n #define RTE_TABLE_ACL_STATS_PKTS_IN_ADD(table, val) \\\n@@ -65,22 +70,20 @@ rte_table_acl_create(\n \n \t/* Check input parameters */\n \tif (p == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Invalid value for params\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"Invalid value for params\");\n \t\treturn NULL;\n \t}\n \tif (p->name == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Invalid value for name\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"Invalid value for name\");\n \t\treturn NULL;\n \t}\n \tif (p->n_rules == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Invalid value for n_rules\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_ACL_LOG(ERR, \"Invalid value for n_rules\");\n \t\treturn NULL;\n \t}\n \tif ((p->n_rule_fields == 0) ||\n \t    (p->n_rule_fields > RTE_ACL_MAX_FIELDS)) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Invalid value for n_rule_fields\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_ACL_LOG(ERR, \"Invalid value for n_rule_fields\");\n \t\treturn NULL;\n \t}\n \n@@ -98,9 +101,7 @@ rte_table_acl_create(\n \tacl = rte_zmalloc_socket(\"TABLE\", total_size, RTE_CACHE_LINE_SIZE,\n \t\tsocket_id);\n \tif (acl == NULL) {\n-\t\tRTE_LOG(ERR, TABLE,\n-\t\t\t\"%s: Cannot allocate %u bytes for ACL table\\n\",\n-\t\t\t__func__, total_size);\n+\t\tTABLE_ACL_LOG(ERR,\"Cannot allocate %u bytes for ACL table\", total_size);\n \t\treturn NULL;\n \t}\n \n@@ -140,7 +141,7 @@ rte_table_acl_free(void *table)\n \n \t/* Check input parameters */\n \tif (table == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -164,8 +165,7 @@ rte_table_acl_build(struct rte_table_acl *acl, struct rte_acl_ctx **acl_ctx)\n \t/* Create low level ACL table */\n \tctx = rte_acl_create(&acl->acl_params);\n \tif (ctx == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Cannot create low level ACL table\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_ACL_LOG(ERR, \"Cannot create low level ACL table\");\n \t\treturn -1;\n \t}\n \n@@ -176,9 +176,7 @@ rte_table_acl_build(struct rte_table_acl *acl, struct rte_acl_ctx **acl_ctx)\n \t\t\tstatus = rte_acl_add_rules(ctx, acl->acl_rule_list[i],\n \t\t\t\t1);\n \t\t\tif (status != 0) {\n-\t\t\t\tRTE_LOG(ERR, TABLE,\n-\t\t\t\t\"%s: Cannot add rule to low level ACL table\\n\",\n-\t\t\t\t\t__func__);\n+\t\t\t\tTABLE_ACL_LOG(ERR, \"Cannot add rule to low level ACL table\");\n \t\t\t\trte_acl_free(ctx);\n \t\t\t\treturn -1;\n \t\t\t}\n@@ -196,9 +194,7 @@ rte_table_acl_build(struct rte_table_acl *acl, struct rte_acl_ctx **acl_ctx)\n \t/* Build low level ACl table */\n \tstatus = rte_acl_build(ctx, &acl->cfg);\n \tif (status != 0) {\n-\t\tRTE_LOG(ERR, TABLE,\n-\t\t\t\"%s: Cannot build the low level ACL table\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_ACL_LOG(ERR, \"Cannot build the low level ACL table\");\n \t\trte_acl_free(ctx);\n \t\treturn -1;\n \t}\n@@ -226,29 +222,27 @@ rte_table_acl_entry_add(\n \n \t/* Check input parameters */\n \tif (table == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (key == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: key parameter is NULL\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"key parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (entry == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: entry parameter is NULL\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"entry parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (key_found == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: key_found parameter is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_ACL_LOG(ERR, \"key_found parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (entry_ptr == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: entry_ptr parameter is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_ACL_LOG(ERR, \"entry_ptr parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (rule->priority > RTE_ACL_MAX_PRIORITY) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Priority is too high\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"Priority is too high\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -291,8 +285,7 @@ rte_table_acl_entry_add(\n \n \t/* Return if max rules */\n \tif (free_pos_valid == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Max number of rules reached\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_ACL_LOG(ERR, \"Max number of rules reached\");\n \t\treturn -ENOSPC;\n \t}\n \n@@ -342,16 +335,15 @@ rte_table_acl_entry_delete(\n \n \t/* Check input parameters */\n \tif (table == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (key == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: key parameter is NULL\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"key parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (key_found == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: key_found parameter is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_ACL_LOG(ERR, \"key_found parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -424,29 +416,27 @@ rte_table_acl_entry_add_bulk(\n \n \t/* Check input parameters */\n \tif (table == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (keys == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: keys parameter is NULL\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"keys parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (entries == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: entries parameter is NULL\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"entries parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (n_keys == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: 0 rules to add\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"0 rules to add\");\n \t\treturn -EINVAL;\n \t}\n \tif (key_found == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: key_found parameter is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_ACL_LOG(ERR, \"key_found parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (entries_ptr == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: entries_ptr parameter is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_ACL_LOG(ERR, \"entries_ptr parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -455,20 +445,18 @@ rte_table_acl_entry_add_bulk(\n \t\tstruct rte_table_acl_rule_add_params *rule;\n \n \t\tif (keys[i] == NULL) {\n-\t\t\tRTE_LOG(ERR, TABLE, \"%s: keys[%\" PRIu32 \"] parameter is NULL\\n\",\n-\t\t\t\t\t__func__, i);\n+\t\t\tTABLE_ACL_LOG(ERR, \"keys[%\" PRIu32 \"] parameter is NULL\\n\", i);\n \t\t\treturn -EINVAL;\n \t\t}\n \n \t\tif (entries[i] == NULL) {\n-\t\t\tRTE_LOG(ERR, TABLE, \"%s: entries[%\" PRIu32 \"] parameter is NULL\\n\",\n-\t\t\t\t\t__func__, i);\n+\t\t\tTABLE_ACL_LOG(ERR, \"entries[%\" PRIu32 \"] parameter is NULL\\n\", i);\n \t\t\treturn -EINVAL;\n \t\t}\n \n \t\trule = keys[i];\n \t\tif (rule->priority > RTE_ACL_MAX_PRIORITY) {\n-\t\t\tRTE_LOG(ERR, TABLE, \"%s: Priority is too high\\n\", __func__);\n+\t\t\tTABLE_ACL_LOG(ERR, \"Priority is too high\");\n \t\t\treturn -EINVAL;\n \t\t}\n \t}\n@@ -604,27 +592,25 @@ rte_table_acl_entry_delete_bulk(\n \n \t/* Check input parameters */\n \tif (table == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (keys == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: key parameter is NULL\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"key parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (n_keys == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: 0 rules to delete\\n\", __func__);\n+\t\tTABLE_ACL_LOG(ERR, \"0 rules to delete\");\n \t\treturn -EINVAL;\n \t}\n \tif (key_found == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: key_found parameter is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_ACL_LOG(ERR, \"key_found parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n \tfor (i = 0; i < n_keys; i++) {\n \t\tif (keys[i] == NULL) {\n-\t\t\tRTE_LOG(ERR, TABLE, \"%s: keys[%\" PRIu32 \"] parameter is NULL\\n\",\n-\t\t\t\t\t__func__, i);\n+\t\t\tTABLE_ACL_LOG(ERR, \"keys[%\" PRIu32 \"] parameter is NULL\", i);\n \t\t\treturn -EINVAL;\n \t\t}\n \t}\ndiff --git a/lib/table/rte_table_array.c b/lib/table/rte_table_array.c\nindex 54a0c42f7dd2..47b5a2b15b2b 100644\n--- a/lib/table/rte_table_array.c\n+++ b/lib/table/rte_table_array.c\n@@ -11,6 +11,11 @@\n \n #include \"rte_table_array.h\"\n \n+RTE_LOG_REGISTER_SUFFIX(table_logtype_array, array, INFO);\n+#define TABLE_ARRAY_LOG(level, fmt, args...)\t\t\\\n+\trte_log(RTE_LOG_ ## level, table_logtype_array,\t\\\n+\t\t\"%s(): \" fmt \"\\n\", __func__, ##args)\n+\n #ifdef RTE_TABLE_STATS_COLLECT\n \n #define RTE_TABLE_ARRAY_STATS_PKTS_IN_ADD(table, val) \\\n@@ -61,9 +66,7 @@ rte_table_array_create(void *params, int socket_id, uint32_t entry_size)\n \ttotal_size = total_cl_size * RTE_CACHE_LINE_SIZE;\n \tt = rte_zmalloc_socket(\"TABLE\", total_size, RTE_CACHE_LINE_SIZE, socket_id);\n \tif (t == NULL) {\n-\t\tRTE_LOG(ERR, TABLE,\n-\t\t\t\"%s: Cannot allocate %u bytes for array table\\n\",\n-\t\t\t__func__, total_size);\n+\t\tTABLE_ARRAY_LOG(ERR, \"Cannot allocate %u bytes for array table\\n\", total_size);\n \t\treturn NULL;\n \t}\n \n@@ -83,7 +86,7 @@ rte_table_array_free(void *table)\n \n \t/* Check input parameters */\n \tif (t == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_ARRAY_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -107,25 +110,23 @@ rte_table_array_entry_add(\n \n \t/* Check input parameters */\n \tif (table == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_ARRAY_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (key == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: key parameter is NULL\\n\", __func__);\n+\t\tTABLE_ARRAY_LOG(ERR, \"key parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (entry == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: entry parameter is NULL\\n\", __func__);\n+\t\tTABLE_ARRAY_LOG(ERR, \"entry parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (key_found == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: key_found parameter is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_ARRAY_LOG(ERR, \"key_found parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (entry_ptr == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: entry_ptr parameter is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_ARRAY_LOG(ERR, \"entry_ptr parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \ndiff --git a/lib/table/rte_table_hash_cuckoo.c b/lib/table/rte_table_hash_cuckoo.c\nindex c77eccf52722..7b1f1575e564 100644\n--- a/lib/table/rte_table_hash_cuckoo.c\n+++ b/lib/table/rte_table_hash_cuckoo.c\n@@ -10,6 +10,11 @@\n \n #include \"rte_table_hash_cuckoo.h\"\n \n+RTE_LOG_REGISTER_SUFFIX(table_logtype_hash, hash, INFO);\n+#define TABLE_HASH_LOG(level, fmt, args...)\t\t\\\n+\trte_log(RTE_LOG_ ## level, table_logtype_hash,\t\\\n+\t\t\"%s(): \" fmt \"\\n\", __func__, ##args)\n+\n #ifdef RTE_TABLE_STATS_COLLECT\n \n #define RTE_TABLE_HASH_CUCKOO_STATS_PKTS_IN_ADD(table, val) \\\n@@ -47,27 +52,27 @@ static int\n check_params_create_hash_cuckoo(struct rte_table_hash_cuckoo_params *params)\n {\n \tif (params == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"NULL Input Parameters.\\n\");\n+\t\tTABLE_HASH_LOG(ERR, \"NULL Input Parameters.\");\n \t\treturn -EINVAL;\n \t}\n \n \tif (params->name == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"Table name is NULL.\\n\");\n+\t\tTABLE_HASH_LOG(ERR, \"Table name is NULL.\");\n \t\treturn -EINVAL;\n \t}\n \n \tif (params->key_size == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"Invalid key_size.\\n\");\n+\t\tTABLE_HASH_LOG(ERR, \"Invalid key_size.\");\n \t\treturn -EINVAL;\n \t}\n \n \tif (params->n_keys == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"Invalid n_keys.\\n\");\n+\t\tTABLE_HASH_LOG(ERR, \"Invalid n_keys.\");\n \t\treturn -EINVAL;\n \t}\n \n \tif (params->f_hash == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"f_hash is NULL.\\n\");\n+\t\tTABLE_HASH_LOG(ERR, \"f_hash is NULL.\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -94,9 +99,8 @@ rte_table_hash_cuckoo_create(void *params,\n \n \tt = rte_zmalloc_socket(p->name, total_size, RTE_CACHE_LINE_SIZE, socket_id);\n \tif (t == NULL) {\n-\t\tRTE_LOG(ERR, TABLE,\n-\t\t\t\"%s: Cannot allocate %u bytes for cuckoo hash table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH_LOG(ERR, \"Cannot allocate %u bytes for cuckoo hash table %s\",\n+\t\t\t       total_size, p->name);\n \t\treturn NULL;\n \t}\n \n@@ -114,9 +118,8 @@ rte_table_hash_cuckoo_create(void *params,\n \tif (h_table == NULL) {\n \t\th_table = rte_hash_create(&hash_cuckoo_params);\n \t\tif (h_table == NULL) {\n-\t\t\tRTE_LOG(ERR, TABLE,\n-\t\t\t\t\"%s: failed to create cuckoo hash table %s\\n\",\n-\t\t\t\t__func__, p->name);\n+\t\t\tTABLE_HASH_LOG(ERR, \"failed to create cuckoo hash table %s\",\n+\t\t\t\t       p->name);\n \t\t\trte_free(t);\n \t\t\treturn NULL;\n \t\t}\n@@ -131,9 +134,8 @@ rte_table_hash_cuckoo_create(void *params,\n \tt->key_offset = p->key_offset;\n \tt->h_table = h_table;\n \n-\tRTE_LOG(INFO, TABLE,\n-\t\t\"%s: Cuckoo hash table %s memory footprint is %u bytes\\n\",\n-\t\t__func__, p->name, total_size);\n+\tTABLE_HASH_LOG(INFO, \"Cuckoo hash table %s memory footprint is %u bytes\",\n+\t\t       p->name, total_size);\n \treturn t;\n }\n \ndiff --git a/lib/table/rte_table_hash_ext.c b/lib/table/rte_table_hash_ext.c\nindex 70ea84fa2e51..ca16328c1612 100644\n--- a/lib/table/rte_table_hash_ext.c\n+++ b/lib/table/rte_table_hash_ext.c\n@@ -11,6 +11,11 @@\n \n #include \"rte_table_hash.h\"\n \n+RTE_LOG_REGISTER_SUFFIX(table_logtype_hash_ext, hash.ext, INFO);\n+#define TABLE_HASH_EXT_LOG(level, fmt, args...)\t\t\t\\\n+\trte_log(RTE_LOG_ ## level, table_logtype_hash_ext,\t\\\n+\t\t\"%s(): \" fmt \"\\n\", __func__, ##args)\n+\n #define KEYS_PER_BUCKET\t4\n \n struct bucket {\n@@ -128,33 +133,33 @@ check_params_create(struct rte_table_hash_params *params)\n {\n \t/* name */\n \tif (params->name == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: name invalid value\\n\", __func__);\n+\t\tTABLE_HASH_EXT_LOG(ERR, \"name invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* key_size */\n \tif ((params->key_size < sizeof(uint64_t)) ||\n \t\t(!rte_is_power_of_2(params->key_size))) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: key_size invalid value\\n\", __func__);\n+\t\tTABLE_HASH_EXT_LOG(ERR, \"key_size invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* n_keys */\n \tif (params->n_keys == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: n_keys invalid value\\n\", __func__);\n+\t\tTABLE_HASH_EXT_LOG(ERR, \"n_keys invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* n_buckets */\n \tif ((params->n_buckets == 0) ||\n \t\t(!rte_is_power_of_2(params->n_buckets))) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: n_buckets invalid value\\n\", __func__);\n+\t\tTABLE_HASH_EXT_LOG(ERR, \"n_buckets invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* f_hash */\n \tif (params->f_hash == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: f_hash invalid value\\n\", __func__);\n+\t\tTABLE_HASH_EXT_LOG(ERR, \"f_hash invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -211,9 +216,9 @@ rte_table_hash_ext_create(void *params, int socket_id, uint32_t entry_size)\n \t\tkey_sz + key_stack_sz + bkt_ext_stack_sz + data_sz;\n \n \tif (total_size > SIZE_MAX) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Cannot allocate %\" PRIu64 \" bytes\"\n-\t\t\t\" for hash table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH_EXT_LOG(ERR,\n+\t\t\t\t   \"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\t   total_size, p->name);\n \t\treturn NULL;\n \t}\n \n@@ -222,14 +227,15 @@ rte_table_hash_ext_create(void *params, int socket_id, uint32_t entry_size)\n \t\tRTE_CACHE_LINE_SIZE,\n \t\tsocket_id);\n \tif (t == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Cannot allocate %\" PRIu64 \" bytes\"\n-\t\t\t\" for hash table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH_EXT_LOG(ERR,\n+\t\t\t\t   \"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\t   total_size, p->name);\n \t\treturn NULL;\n \t}\n-\tRTE_LOG(INFO, TABLE, \"%s (%u-byte key): Hash table %s memory \"\n-\t\t\"footprint is %\" PRIu64 \" bytes\\n\",\n-\t\t__func__, p->key_size, p->name, total_size);\n+\n+\tTABLE_HASH_EXT_LOG(INFO,\n+\t\t\t   \"(%u-byte key): Hash table %s memory footprint is %\" PRIu64 \" bytes\",\n+\t\t\t   p->key_size, p->name, total_size);\n \n \t/* Memory initialization */\n \tt->key_size = p->key_size;\ndiff --git a/lib/table/rte_table_hash_key16.c b/lib/table/rte_table_hash_key16.c\nindex 04d7fd64bd97..5501a9c5fc54 100644\n--- a/lib/table/rte_table_hash_key16.c\n+++ b/lib/table/rte_table_hash_key16.c\n@@ -11,6 +11,11 @@\n #include \"rte_table_hash.h\"\n #include \"rte_lru.h\"\n \n+RTE_LOG_REGISTER_SUFFIX(table_logtype_hash16, hash16, INFO);\n+#define TABLE_HASH16_LOG(level, fmt, args...)\t\t\t\\\n+\trte_log(RTE_LOG_ ## level, table_logtype_hash16,\t\\\n+\t\t\"%s(): \" fmt \"\\n\", __func__, ##args)\n+\n #define KEY_SIZE\t\t\t\t\t\t16\n \n #define KEYS_PER_BUCKET\t\t\t\t\t4\n@@ -107,33 +112,32 @@ check_params_create(struct rte_table_hash_params *params)\n {\n \t/* name */\n \tif (params->name == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: name invalid value\\n\", __func__);\n+\t\tTABLE_HASH16_LOG(ERR, \"name invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* key_size */\n \tif (params->key_size != KEY_SIZE) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: key_size invalid value\\n\", __func__);\n+\t\tTABLE_HASH16_LOG(ERR, \"key_size invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* n_keys */\n \tif (params->n_keys == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: n_keys is zero\\n\", __func__);\n+\t\tTABLE_HASH16_LOG(ERR, \"n_keys is zero\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* n_buckets */\n \tif ((params->n_buckets == 0) ||\n \t\t(!rte_is_power_of_2(params->n_buckets))) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: n_buckets invalid value\\n\", __func__);\n+\t\tTABLE_HASH16_LOG(ERR, \"n_buckets invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* f_hash */\n \tif (params->f_hash == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: f_hash function pointer is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_HASH16_LOG(ERR, \"f_hash function pointer is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -181,9 +185,9 @@ rte_table_hash_create_key16_lru(void *params,\n \ttotal_size = sizeof(struct rte_table_hash) + n_buckets * bucket_size;\n \n \tif (total_size > SIZE_MAX) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Cannot allocate %\" PRIu64 \" bytes \"\n-\t\t\"for hash table %s\\n\",\n-\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH16_LOG(ERR,\n+\t\t\t\t \"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\t total_size, p->name);\n \t\treturn NULL;\n \t}\n \n@@ -192,14 +196,14 @@ rte_table_hash_create_key16_lru(void *params,\n \t\tRTE_CACHE_LINE_SIZE,\n \t\tsocket_id);\n \tif (f == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Cannot allocate %\" PRIu64 \" bytes \"\n-\t\t\"for hash table %s\\n\",\n-\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH16_LOG(ERR,\n+\t\t\t\t \"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\t total_size, p->name);\n \t\treturn NULL;\n \t}\n-\tRTE_LOG(INFO, TABLE, \"%s: Hash table %s memory footprint \"\n-\t\t\"is %\" PRIu64 \" bytes\\n\",\n-\t\t__func__, p->name, total_size);\n+\tTABLE_HASH16_LOG(INFO,\n+\t\t\t \"Hash table %s memory footprint is %\" PRIu64 \" bytes\",\n+\t\t\t p->name, total_size);\n \n \t/* Memory initialization */\n \tf->n_buckets = n_buckets;\n@@ -236,7 +240,7 @@ rte_table_hash_free_key16_lru(void *table)\n \n \t/* Check input parameters */\n \tif (f == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_HASH16_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -391,9 +395,9 @@ rte_table_hash_create_key16_ext(void *params,\n \ttotal_size = sizeof(struct rte_table_hash) +\n \t\t(p->n_buckets + n_buckets_ext) * bucket_size + stack_size;\n \tif (total_size > SIZE_MAX) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Cannot allocate %\" PRIu64 \" bytes \"\n-\t\t\t\"for hash table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH16_LOG(ERR,\n+\t\t\t\t \"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\t total_size, p->name);\n \t\treturn NULL;\n \t}\n \n@@ -402,14 +406,14 @@ rte_table_hash_create_key16_ext(void *params,\n \t\tRTE_CACHE_LINE_SIZE,\n \t\tsocket_id);\n \tif (f == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Cannot allocate %\" PRIu64 \" bytes \"\n-\t\t\t\"for hash table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH16_LOG(ERR,\n+\t\t\t\t \"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\t total_size, p->name);\n \t\treturn NULL;\n \t}\n-\tRTE_LOG(INFO, TABLE, \"%s: Hash table %s memory footprint \"\n-\t\t\"is %\" PRIu64 \" bytes\\n\",\n-\t\t__func__, p->name, total_size);\n+\tTABLE_HASH16_LOG(INFO,\n+\t\t\t \"Hash table %s memory footprint is %\" PRIu64 \" bytes\",\n+\t\t\t p->name, total_size);\n \n \t/* Memory initialization */\n \tf->n_buckets = p->n_buckets;\n@@ -446,7 +450,7 @@ rte_table_hash_free_key16_ext(void *table)\n \n \t/* Check input parameters */\n \tif (f == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_HASH16_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \ndiff --git a/lib/table/rte_table_hash_key32.c b/lib/table/rte_table_hash_key32.c\nindex 88d8f69c72ed..d830c6b3784a 100644\n--- a/lib/table/rte_table_hash_key32.c\n+++ b/lib/table/rte_table_hash_key32.c\n@@ -11,11 +11,16 @@\n #include \"rte_table_hash.h\"\n #include \"rte_lru.h\"\n \n-#define KEY_SIZE\t\t\t\t\t\t32\n+RTE_LOG_REGISTER_SUFFIX(table_logtype_hash32, hash32, INFO);\n+#define TABLE_HASH32_LOG(level, fmt, args...)\t\t\t\\\n+\trte_log(RTE_LOG_ ## level, table_logtype_hash32,\t\\\n+\t\t\"%s(): \" fmt \"\\n\", __func__, ##args)\n+\n+#define KEY_SIZE\t\t\t\t\t32\n \n #define KEYS_PER_BUCKET\t\t\t\t\t4\n \n-#define RTE_BUCKET_ENTRY_VALID\t\t\t\t\t\t0x1LLU\n+#define RTE_BUCKET_ENTRY_VALID\t\t\t\t0x1LLU\n \n #ifdef RTE_TABLE_STATS_COLLECT\n \n@@ -111,33 +116,32 @@ check_params_create(struct rte_table_hash_params *params)\n {\n \t/* name */\n \tif (params->name == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: name invalid value\\n\", __func__);\n+\t\tTABLE_HASH32_LOG(ERR, \"name invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* key_size */\n \tif (params->key_size != KEY_SIZE) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: key_size invalid value\\n\", __func__);\n+\t\tTABLE_HASH32_LOG(ERR, \"key_size invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* n_keys */\n \tif (params->n_keys == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: n_keys is zero\\n\", __func__);\n+\t\tTABLE_HASH32_LOG(ERR, \"n_keys is zero\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* n_buckets */\n \tif ((params->n_buckets == 0) ||\n \t\t(!rte_is_power_of_2(params->n_buckets))) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: n_buckets invalid value\\n\", __func__);\n+\t\tTABLE_HASH32_LOG(ERR, \"n_buckets invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* f_hash */\n \tif (params->f_hash == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: f_hash function pointer is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_HASH32_LOG(ERR, \"f_hash function pointer is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -184,9 +188,9 @@ rte_table_hash_create_key32_lru(void *params,\n \t\tKEYS_PER_BUCKET * entry_size);\n \ttotal_size = sizeof(struct rte_table_hash) + n_buckets * bucket_size;\n \tif (total_size > SIZE_MAX) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Cannot allocate %\" PRIu64 \" bytes \"\n-\t\t\t\"for hash table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH32_LOG(ERR,\n+\t\t\t\t \"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\t total_size, p->name);\n \t\treturn NULL;\n \t}\n \n@@ -195,15 +199,14 @@ rte_table_hash_create_key32_lru(void *params,\n \t\tRTE_CACHE_LINE_SIZE,\n \t\tsocket_id);\n \tif (f == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Cannot allocate %\" PRIu64 \" bytes \"\n-\t\t\t\"for hash table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH32_LOG(ERR,\n+\t\t\t\t \"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\t total_size, p->name);\n \t\treturn NULL;\n \t}\n-\tRTE_LOG(INFO, TABLE,\n-\t\t\"%s: Hash table %s memory footprint \"\n-\t\t\"is %\" PRIu64 \" bytes\\n\",\n-\t\t__func__, p->name, total_size);\n+\tTABLE_HASH32_LOG(INFO,\n+\t\t\t \"Hash table %s memory footprint is %\" PRIu64 \" bytes\",\n+\t\t\t p->name, total_size);\n \n \t/* Memory initialization */\n \tf->n_buckets = n_buckets;\n@@ -244,7 +247,7 @@ rte_table_hash_free_key32_lru(void *table)\n \n \t/* Check input parameters */\n \tif (f == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_HASH32_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -400,9 +403,9 @@ rte_table_hash_create_key32_ext(void *params,\n \ttotal_size = sizeof(struct rte_table_hash) +\n \t\t(p->n_buckets + n_buckets_ext) * bucket_size + stack_size;\n \tif (total_size > SIZE_MAX) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Cannot allocate %\" PRIu64 \" bytes \"\n-\t\t\t\"for hash table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH32_LOG(ERR,\n+\t\t\t\t \"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\t total_size, p->name);\n \t\treturn NULL;\n \t}\n \n@@ -411,15 +414,14 @@ rte_table_hash_create_key32_ext(void *params,\n \t\tRTE_CACHE_LINE_SIZE,\n \t\tsocket_id);\n \tif (f == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Cannot allocate %\" PRIu64 \" bytes \"\n-\t\t\t\"for hash table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH32_LOG(ERR,\n+\t\t\t\t \"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\t total_size, p->name);\n \t\treturn NULL;\n \t}\n-\tRTE_LOG(INFO, TABLE,\n-\t\t\"%s: Hash table %s memory footprint \"\n-\t\t\"is %\" PRIu64\" bytes\\n\",\n-\t\t__func__, p->name, total_size);\n+\tTABLE_HASH32_LOG(INFO,\n+\t\t\t \"Hash table %s memory footprint is %\" PRIu64\" bytes\",\n+\t\t\t p->name, total_size);\n \n \t/* Memory initialization */\n \tf->n_buckets = p->n_buckets;\n@@ -460,7 +462,7 @@ rte_table_hash_free_key32_ext(void *table)\n \n \t/* Check input parameters */\n \tif (f == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_HASH32_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \ndiff --git a/lib/table/rte_table_hash_key8.c b/lib/table/rte_table_hash_key8.c\nindex 035d24276946..9678ee0741e5 100644\n--- a/lib/table/rte_table_hash_key8.c\n+++ b/lib/table/rte_table_hash_key8.c\n@@ -11,7 +11,12 @@\n #include \"rte_table_hash.h\"\n #include \"rte_lru.h\"\n \n-#define KEY_SIZE\t\t\t\t\t\t8\n+RTE_LOG_REGISTER_SUFFIX(table_logtype_hash8, hash8, INFO);\n+#define TABLE_HASH8_LOG(level, fmt, args...)\t\t\t\\\n+\trte_log(RTE_LOG_ ## level, table_logtype_hash8,\t\\\n+\t\t\"%s(): \" fmt \"\\n\", __func__, ##args)\n+\n+#define KEY_SIZE\t\t\t\t\t8\n \n #define KEYS_PER_BUCKET\t\t\t\t\t4\n \n@@ -101,33 +106,32 @@ check_params_create(struct rte_table_hash_params *params)\n {\n \t/* name */\n \tif (params->name == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: name invalid value\\n\", __func__);\n+\t\tTABLE_HASH8_LOG(ERR, \"name invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* key_size */\n \tif (params->key_size != KEY_SIZE) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: key_size invalid value\\n\", __func__);\n+\t\tTABLE_HASH8_LOG(ERR, \"key_size invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* n_keys */\n \tif (params->n_keys == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: n_keys is zero\\n\", __func__);\n+\t\tTABLE_HASH8_LOG(ERR, \"n_keys is zero\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* n_buckets */\n \tif ((params->n_buckets == 0) ||\n \t\t(!rte_is_power_of_2(params->n_buckets))) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: n_buckets invalid value\\n\", __func__);\n+\t\tTABLE_HASH8_LOG(ERR, \"n_buckets invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* f_hash */\n \tif (params->f_hash == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: f_hash function pointer is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_HASH8_LOG(ERR, \"f_hash function pointer is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -173,9 +177,9 @@ rte_table_hash_create_key8_lru(void *params, int socket_id, uint32_t entry_size)\n \ttotal_size = sizeof(struct rte_table_hash) + n_buckets * bucket_size;\n \n \tif (total_size > SIZE_MAX) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Cannot allocate %\" PRIu64 \" bytes\"\n-\t\t\t\" for hash table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH8_LOG(ERR,\n+\t\t\t\t\"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\ttotal_size, p->name);\n \t\treturn NULL;\n \t}\n \n@@ -184,15 +188,15 @@ rte_table_hash_create_key8_lru(void *params, int socket_id, uint32_t entry_size)\n \t\tRTE_CACHE_LINE_SIZE,\n \t\tsocket_id);\n \tif (f == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Cannot allocate %\" PRIu64 \" bytes\"\n-\t\t\t\" for hash table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH8_LOG(ERR,\n+\t\t\t\t\"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\ttotal_size, p->name);\n \t\treturn NULL;\n \t}\n \n-\tRTE_LOG(INFO, TABLE, \"%s: Hash table %s memory footprint \"\n-\t\t\"is %\" PRIu64 \" bytes\\n\",\n-\t\t__func__, p->name, total_size);\n+\tTABLE_HASH8_LOG(INFO,\n+\t\t\t\"Hash table %s memory footprint is %\" PRIu64 \" bytes\",\n+\t\t\tp->name, total_size);\n \n \t/* Memory initialization */\n \tf->n_buckets = n_buckets;\n@@ -226,7 +230,7 @@ rte_table_hash_free_key8_lru(void *table)\n \n \t/* Check input parameters */\n \tif (f == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_HASH8_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -377,9 +381,9 @@ rte_table_hash_create_key8_ext(void *params, int socket_id, uint32_t entry_size)\n \t\t(p->n_buckets + n_buckets_ext) * bucket_size + stack_size;\n \n \tif (total_size > SIZE_MAX) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Cannot allocate %\" PRIu64 \" bytes \"\n-\t\t\t\"for hash table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH8_LOG(ERR,\n+\t\t\t\t\"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\ttotal_size, p->name);\n \t\treturn NULL;\n \t}\n \n@@ -388,15 +392,14 @@ rte_table_hash_create_key8_ext(void *params, int socket_id, uint32_t entry_size)\n \t\tRTE_CACHE_LINE_SIZE,\n \t\tsocket_id);\n \tif (f == NULL) {\n-\t\tRTE_LOG(ERR, TABLE,\n-\t\t\t\"%s: Cannot allocate %\" PRIu64 \" bytes \"\n-\t\t\t\"for hash table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH8_LOG(ERR,\n+\t\t\t\t\"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\ttotal_size, p->name);\n \t\treturn NULL;\n \t}\n-\tRTE_LOG(INFO, TABLE, \"%s: Hash table %s memory footprint \"\n-\t\t\"is %\" PRIu64 \" bytes\\n\",\n-\t\t__func__, p->name, total_size);\n+\tTABLE_HASH8_LOG(INFO,\n+\t\t\t\"Hash table %s memory footprint is %\" PRIu64 \" bytes\",\n+\t\t\tp->name, total_size);\n \n \t/* Memory initialization */\n \tf->n_buckets = p->n_buckets;\n@@ -430,7 +433,7 @@ rte_table_hash_free_key8_ext(void *table)\n \n \t/* Check input parameters */\n \tif (f == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_HASH8_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \ndiff --git a/lib/table/rte_table_hash_lru.c b/lib/table/rte_table_hash_lru.c\nindex c31acc11cf23..9bc64f74c922 100644\n--- a/lib/table/rte_table_hash_lru.c\n+++ b/lib/table/rte_table_hash_lru.c\n@@ -14,6 +14,11 @@\n \n #define KEYS_PER_BUCKET\t4\n \n+RTE_LOG_REGISTER_SUFFIX(table_logtype_hash_lru, hash.lru, INFO);\n+#define TABLE_HASH_LRU_LOG(level, fmt, args...)\t\t\t\\\n+\trte_log(RTE_LOG_ ## level, table_logtype_hash_lru,\t\\\n+\t\t\"%s(): \" fmt \"\\n\", __func__, ##args)\n+\n #ifdef RTE_TABLE_STATS_COLLECT\n \n #define RTE_TABLE_HASH_LRU_STATS_PKTS_IN_ADD(table, val) \\\n@@ -105,33 +110,33 @@ check_params_create(struct rte_table_hash_params *params)\n {\n \t/* name */\n \tif (params->name == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: name invalid value\\n\", __func__);\n+\t\tTABLE_HASH_LRU_LOG(ERR, \"name invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* key_size */\n \tif ((params->key_size < sizeof(uint64_t)) ||\n \t\t(!rte_is_power_of_2(params->key_size))) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: key_size invalid value\\n\", __func__);\n+\t\tTABLE_HASH_LRU_LOG(ERR, \"key_size invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* n_keys */\n \tif (params->n_keys == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: n_keys invalid value\\n\", __func__);\n+\t\tTABLE_HASH_LRU_LOG(ERR, \"n_keys invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* n_buckets */\n \tif ((params->n_buckets == 0) ||\n \t\t(!rte_is_power_of_2(params->n_buckets))) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: n_buckets invalid value\\n\", __func__);\n+\t\tTABLE_HASH_LRU_LOG(ERR, \"n_buckets invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* f_hash */\n \tif (params->f_hash == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: f_hash invalid value\\n\", __func__);\n+\t\tTABLE_HASH_LRU_LOG(ERR, \"f_hash invalid value\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -187,10 +192,9 @@ rte_table_hash_lru_create(void *params, int socket_id, uint32_t entry_size)\n \t\tkey_stack_sz + data_sz;\n \n \tif (total_size > SIZE_MAX) {\n-\t\tRTE_LOG(ERR, TABLE,\n-\t\t\t\"%s: Cannot allocate %\" PRIu64 \" bytes for hash \"\n-\t\t\t\"table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH_LRU_LOG(ERR,\n+\t\t\t\t   \"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\t   total_size, p->name);\n \t\treturn NULL;\n \t}\n \n@@ -199,15 +203,14 @@ rte_table_hash_lru_create(void *params, int socket_id, uint32_t entry_size)\n \t\tRTE_CACHE_LINE_SIZE,\n \t\tsocket_id);\n \tif (t == NULL) {\n-\t\tRTE_LOG(ERR, TABLE,\n-\t\t\t\"%s: Cannot allocate %\" PRIu64 \" bytes for hash \"\n-\t\t\t\"table %s\\n\",\n-\t\t\t__func__, total_size, p->name);\n+\t\tTABLE_HASH_LRU_LOG(ERR,\n+\t\t\t\t   \"Cannot allocate %\" PRIu64 \" bytes for hash table %s\",\n+\t\t\t\t   total_size, p->name);\n \t\treturn NULL;\n \t}\n-\tRTE_LOG(INFO, TABLE, \"%s (%u-byte key): Hash table %s memory footprint\"\n-\t\t\" is %\" PRIu64 \" bytes\\n\",\n-\t\t__func__, p->key_size, p->name, total_size);\n+\tTABLE_HASH_LRU_LOG(INFO,\n+\t\t\t   \"(%u-byte key): Hash table %s memory footprint is %\" PRIu64 \" bytes\",\n+\t\t\t   p->key_size, p->name, total_size);\n \n \t/* Memory initialization */\n \tt->key_size = p->key_size;\ndiff --git a/lib/table/rte_table_lpm.c b/lib/table/rte_table_lpm.c\nindex 9de9e8a20d77..653e2604fd34 100644\n--- a/lib/table/rte_table_lpm.c\n+++ b/lib/table/rte_table_lpm.c\n@@ -13,6 +13,11 @@\n \n #include \"rte_table_lpm.h\"\n \n+RTE_LOG_REGISTER_SUFFIX(table_logtype_lpm, lpm, INFO);\n+#define TABLE_LPM_LOG(level, fmt, args...)\t\t\\\n+\trte_log(RTE_LOG_ ## level, table_logtype_lpm,\t\\\n+\t\t\"%s(): \" fmt \"\\n\", __func__, ##args)\n+\n #ifndef RTE_TABLE_LPM_MAX_NEXT_HOPS\n #define RTE_TABLE_LPM_MAX_NEXT_HOPS                        65536\n #endif\n@@ -59,30 +64,27 @@ rte_table_lpm_create(void *params, int socket_id, uint32_t entry_size)\n \n \t/* Check input parameters */\n \tif (p == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: NULL input parameters\\n\", __func__);\n+\t\tTABLE_LPM_LOG(ERR, \"NULL input parameters\");\n \t\treturn NULL;\n \t}\n \tif (p->n_rules == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Invalid n_rules\\n\", __func__);\n+\t\tTABLE_LPM_LOG(ERR, \"Invalid n_rules\");\n \t\treturn NULL;\n \t}\n \tif (p->number_tbl8s == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Invalid number_tbl8s\\n\", __func__);\n+\t\tTABLE_LPM_LOG(ERR, \"Invalid number_tbl8s\");\n \t\treturn NULL;\n \t}\n \tif (p->entry_unique_size == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Invalid entry_unique_size\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_LPM_LOG(ERR, \"Invalid entry_unique_size\");\n \t\treturn NULL;\n \t}\n \tif (p->entry_unique_size > entry_size) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Invalid entry_unique_size\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_LPM_LOG(ERR, \"Invalid entry_unique_size\");\n \t\treturn NULL;\n \t}\n \tif (p->name == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Table name is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_LPM_LOG(ERR, \"Table name is NULL\");\n \t\treturn NULL;\n \t}\n \tentry_size = RTE_ALIGN(entry_size, sizeof(uint64_t));\n@@ -93,9 +95,8 @@ rte_table_lpm_create(void *params, int socket_id, uint32_t entry_size)\n \tlpm = rte_zmalloc_socket(\"TABLE\", total_size, RTE_CACHE_LINE_SIZE,\n \t\tsocket_id);\n \tif (lpm == NULL) {\n-\t\tRTE_LOG(ERR, TABLE,\n-\t\t\t\"%s: Cannot allocate %u bytes for LPM table\\n\",\n-\t\t\t__func__, total_size);\n+\t\tTABLE_LPM_LOG(ERR, \"Cannot allocate %u bytes for LPM table\",\n+\t\t\t      total_size);\n \t\treturn NULL;\n \t}\n \n@@ -107,7 +108,7 @@ rte_table_lpm_create(void *params, int socket_id, uint32_t entry_size)\n \n \tif (lpm->lpm == NULL) {\n \t\trte_free(lpm);\n-\t\tRTE_LOG(ERR, TABLE, \"Unable to create low-level LPM table\\n\");\n+\t\tTABLE_LPM_LOG(ERR, \"Unable to create low-level LPM table\");\n \t\treturn NULL;\n \t}\n \n@@ -127,7 +128,7 @@ rte_table_lpm_free(void *table)\n \n \t/* Check input parameters */\n \tif (lpm == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_LPM_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -187,22 +188,20 @@ rte_table_lpm_entry_add(\n \n \t/* Check input parameters */\n \tif (lpm == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_LPM_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (ip_prefix == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: ip_prefix parameter is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_LPM_LOG(ERR, \"ip_prefix parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (entry == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: entry parameter is NULL\\n\", __func__);\n+\t\tTABLE_LPM_LOG(ERR, \"entry parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n \tif ((ip_prefix->depth == 0) || (ip_prefix->depth > 32)) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: invalid depth (%d)\\n\",\n-\t\t\t__func__, ip_prefix->depth);\n+\t\tTABLE_LPM_LOG(ERR, \"invalid depth (%d)\", ip_prefix->depth);\n \t\treturn -EINVAL;\n \t}\n \n@@ -216,7 +215,7 @@ rte_table_lpm_entry_add(\n \t\tuint8_t *nht_entry;\n \n \t\tif (nht_find_free(lpm, &nht_pos) == 0) {\n-\t\t\tRTE_LOG(ERR, TABLE, \"%s: NHT full\\n\", __func__);\n+\t\t\tTABLE_LPM_LOG(ERR, \"NHT full\");\n \t\t\treturn -1;\n \t\t}\n \n@@ -226,7 +225,7 @@ rte_table_lpm_entry_add(\n \n \t/* Add rule to low level LPM table */\n \tif (rte_lpm_add(lpm->lpm, ip_prefix->ip, ip_prefix->depth, nht_pos) < 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: LPM rule add failed\\n\", __func__);\n+\t\tTABLE_LPM_LOG(ERR, \"LPM rule add failed\");\n \t\treturn -1;\n \t}\n \n@@ -253,16 +252,15 @@ rte_table_lpm_entry_delete(\n \n \t/* Check input parameters */\n \tif (lpm == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_LPM_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (ip_prefix == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: ip_prefix parameter is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_LPM_LOG(ERR, \"ip_prefix parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif ((ip_prefix->depth == 0) || (ip_prefix->depth > 32)) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: invalid depth (%d)\\n\", __func__,\n+\t\tTABLE_LPM_LOG(ERR, \"invalid depth (%d)\",\n \t\t\tip_prefix->depth);\n \t\treturn -EINVAL;\n \t}\n@@ -271,7 +269,7 @@ rte_table_lpm_entry_delete(\n \tstatus = rte_lpm_is_rule_present(lpm->lpm, ip_prefix->ip,\n \t\tip_prefix->depth, &nht_pos);\n \tif (status < 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: LPM algorithmic error\\n\", __func__);\n+\t\tTABLE_LPM_LOG(ERR, \"LPM algorithmic error\");\n \t\treturn -1;\n \t}\n \tif (status == 0) {\n@@ -282,7 +280,7 @@ rte_table_lpm_entry_delete(\n \t/* Delete rule from the low-level LPM table */\n \tstatus = rte_lpm_delete(lpm->lpm, ip_prefix->ip, ip_prefix->depth);\n \tif (status) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: LPM rule delete failed\\n\", __func__);\n+\t\tTABLE_LPM_LOG(ERR, \"LPM rule delete failed\");\n \t\treturn -1;\n \t}\n \ndiff --git a/lib/table/rte_table_lpm_ipv6.c b/lib/table/rte_table_lpm_ipv6.c\nindex 8fde2c012f7c..9f87832ca8f0 100644\n--- a/lib/table/rte_table_lpm_ipv6.c\n+++ b/lib/table/rte_table_lpm_ipv6.c\n@@ -12,6 +12,11 @@\n \n #include \"rte_table_lpm_ipv6.h\"\n \n+RTE_LOG_REGISTER_SUFFIX(table_logtype_lpm6, lpm6, INFO);\n+#define TABLE_LPM6_LOG(level, fmt, args...)\t\t\\\n+\trte_log(RTE_LOG_ ## level, table_logtype_lpm6,\t\\\n+\t\t\"%s(): \" fmt \"\\n\", __func__, ##args)\n+\n #define RTE_TABLE_LPM_MAX_NEXT_HOPS                        256\n \n #ifdef RTE_TABLE_STATS_COLLECT\n@@ -56,30 +61,27 @@ rte_table_lpm_ipv6_create(void *params, int socket_id, uint32_t entry_size)\n \n \t/* Check input parameters */\n \tif (p == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: NULL input parameters\\n\", __func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"NULL input parameters\");\n \t\treturn NULL;\n \t}\n \tif (p->n_rules == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Invalid n_rules\\n\", __func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"Invalid n_rules\");\n \t\treturn NULL;\n \t}\n \tif (p->number_tbl8s == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Invalid n_rules\\n\", __func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"Invalid n_rules\");\n \t\treturn NULL;\n \t}\n \tif (p->entry_unique_size == 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Invalid entry_unique_size\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"Invalid entry_unique_size\");\n \t\treturn NULL;\n \t}\n \tif (p->entry_unique_size > entry_size) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Invalid entry_unique_size\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"Invalid entry_unique_size\");\n \t\treturn NULL;\n \t}\n \tif (p->name == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: Table name is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"Table name is NULL\");\n \t\treturn NULL;\n \t}\n \tentry_size = RTE_ALIGN(entry_size, sizeof(uint64_t));\n@@ -90,9 +92,8 @@ rte_table_lpm_ipv6_create(void *params, int socket_id, uint32_t entry_size)\n \tlpm = rte_zmalloc_socket(\"TABLE\", total_size, RTE_CACHE_LINE_SIZE,\n \t\tsocket_id);\n \tif (lpm == NULL) {\n-\t\tRTE_LOG(ERR, TABLE,\n-\t\t\t\"%s: Cannot allocate %u bytes for LPM IPv6 table\\n\",\n-\t\t\t__func__, total_size);\n+\t\tTABLE_LPM6_LOG(ERR, \"Cannot allocate %u bytes for LPM IPv6 table\",\n+\t\t\t       total_size);\n \t\treturn NULL;\n \t}\n \n@@ -103,8 +104,7 @@ rte_table_lpm_ipv6_create(void *params, int socket_id, uint32_t entry_size)\n \tlpm->lpm = rte_lpm6_create(p->name, socket_id, &lpm6_config);\n \tif (lpm->lpm == NULL) {\n \t\trte_free(lpm);\n-\t\tRTE_LOG(ERR, TABLE,\n-\t\t\t\"Unable to create low-level LPM IPv6 table\\n\");\n+\t\tTABLE_LPM6_LOG(ERR, \"Unable to create low-level LPM IPv6 table\\n\");\n \t\treturn NULL;\n \t}\n \n@@ -124,7 +124,7 @@ rte_table_lpm_ipv6_free(void *table)\n \n \t/* Check input parameters */\n \tif (lpm == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -184,21 +184,20 @@ rte_table_lpm_ipv6_entry_add(\n \n \t/* Check input parameters */\n \tif (lpm == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (ip_prefix == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: ip_prefix parameter is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"ip_prefix parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (entry == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: entry parameter is NULL\\n\", __func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"entry parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \n \tif ((ip_prefix->depth == 0) || (ip_prefix->depth > 128)) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: invalid depth (%d)\\n\", __func__,\n+\t\tTABLE_LPM6_LOG(ERR, \"invalid depth (%d)\",\n \t\t\tip_prefix->depth);\n \t\treturn -EINVAL;\n \t}\n@@ -213,7 +212,7 @@ rte_table_lpm_ipv6_entry_add(\n \t\tuint8_t *nht_entry;\n \n \t\tif (nht_find_free(lpm, &nht_pos) == 0) {\n-\t\t\tRTE_LOG(ERR, TABLE, \"%s: NHT full\\n\", __func__);\n+\t\t\tTABLE_LPM6_LOG(ERR, \"NHT full\");\n \t\t\treturn -1;\n \t\t}\n \n@@ -224,7 +223,7 @@ rte_table_lpm_ipv6_entry_add(\n \t/* Add rule to low level LPM table */\n \tif (rte_lpm6_add(lpm->lpm, ip_prefix->ip, ip_prefix->depth,\n \t\tnht_pos) < 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: LPM IPv6 rule add failed\\n\", __func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"LPM IPv6 rule add failed\");\n \t\treturn -1;\n \t}\n \n@@ -252,16 +251,15 @@ rte_table_lpm_ipv6_entry_delete(\n \n \t/* Check input parameters */\n \tif (lpm == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: table parameter is NULL\\n\", __func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"table parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif (ip_prefix == NULL) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: ip_prefix parameter is NULL\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"ip_prefix parameter is NULL\");\n \t\treturn -EINVAL;\n \t}\n \tif ((ip_prefix->depth == 0) || (ip_prefix->depth > 128)) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: invalid depth (%d)\\n\", __func__,\n+\t\tTABLE_LPM6_LOG(ERR, \"invalid depth (%d)\",\n \t\t\tip_prefix->depth);\n \t\treturn -EINVAL;\n \t}\n@@ -270,8 +268,7 @@ rte_table_lpm_ipv6_entry_delete(\n \tstatus = rte_lpm6_is_rule_present(lpm->lpm, ip_prefix->ip,\n \t\tip_prefix->depth, &nht_pos);\n \tif (status < 0) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: LPM IPv6 algorithmic error\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"LPM IPv6 algorithmic error\");\n \t\treturn -1;\n \t}\n \tif (status == 0) {\n@@ -282,8 +279,7 @@ rte_table_lpm_ipv6_entry_delete(\n \t/* Delete rule from the low-level LPM table */\n \tstatus = rte_lpm6_delete(lpm->lpm, ip_prefix->ip, ip_prefix->depth);\n \tif (status) {\n-\t\tRTE_LOG(ERR, TABLE, \"%s: LPM IPv6 rule delete failed\\n\",\n-\t\t\t__func__);\n+\t\tTABLE_LPM6_LOG(ERR, \"LPM IPv6 rule delete failed\");\n \t\treturn -1;\n \t}\n \ndiff --git a/lib/table/rte_table_stub.c b/lib/table/rte_table_stub.c\nindex 23d0de5c79b0..6ea978adfe80 100644\n--- a/lib/table/rte_table_stub.c\n+++ b/lib/table/rte_table_stub.c\n@@ -8,6 +8,11 @@\n \n #include \"rte_table_stub.h\"\n \n+RTE_LOG_REGISTER_SUFFIX(table_logtype_stub, stub, INFO);\n+#define TABLE_STUB_LOG(level, fmt, args...)\t\t\\\n+\trte_log(RTE_LOG_ ## level, table_logtype_stub,\t\\\n+\t\t\"%s(): \" fmt \"\\n\", __func__, ##args)\n+\n #ifdef RTE_TABLE_STATS_COLLECT\n \n #define RTE_TABLE_LPM_STATS_PKTS_IN_ADD(table, val) \\\n@@ -38,9 +43,7 @@ rte_table_stub_create(__rte_unused void *params,\n \tstub = rte_zmalloc_socket(\"TABLE\", size, RTE_CACHE_LINE_SIZE,\n \t\tsocket_id);\n \tif (stub == NULL) {\n-\t\tRTE_LOG(ERR, TABLE,\n-\t\t\t\"%s: Cannot allocate %u bytes for stub table\\n\",\n-\t\t\t__func__, size);\n+\t\tTABLE_STUB_LOG(ERR, \"Cannot allocate %u bytes for stub table\", size);\n \t\treturn NULL;\n \t}\n \n",
    "prefixes": [
        "v3",
        "14/16"
    ]
}