get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 65376,
    "url": "http://patches.dpdk.org/api/patches/65376/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1580400880-96628-5-git-send-email-akozyrev@mellanox.com/",
    "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": "<1580400880-96628-5-git-send-email-akozyrev@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1580400880-96628-5-git-send-email-akozyrev@mellanox.com",
    "date": "2020-01-30T16:14:39",
    "name": "[v5,4/5] drivers: use mlx5 debug flag instead of NDEBUG",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "38c7ffde686efb4096bd02930ffd0c46055298fc",
    "submitter": {
        "id": 1573,
        "url": "http://patches.dpdk.org/api/people/1573/?format=api",
        "name": "Alexander Kozyrev",
        "email": "akozyrev@mellanox.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1580400880-96628-5-git-send-email-akozyrev@mellanox.com/mbox/",
    "series": [
        {
            "id": 8359,
            "url": "http://patches.dpdk.org/api/series/8359/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8359",
            "date": "2020-01-30T16:14:36",
            "name": "net/mlx: assert cleanup in mlx drivers",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/8359/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65376/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/65376/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 382A2A0524;\n\tThu, 30 Jan 2020 17:15:29 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8F7341C0C0;\n\tThu, 30 Jan 2020 17:14:51 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 075AD1C037\n for <dev@dpdk.org>; Thu, 30 Jan 2020 17:14:44 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n akozyrev@mellanox.com)\n with ESMTPS (AES256-SHA encrypted); 30 Jan 2020 18:14:42 +0200",
            "from pegasus02.mtr.labs.mlnx. (pegasus02.mtr.labs.mlnx\n [10.210.16.122])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 00UGEfJB009609;\n Thu, 30 Jan 2020 18:14:42 +0200"
        ],
        "From": "Alexander Kozyrev <akozyrev@mellanox.com>",
        "To": "dev@dpdk.org",
        "Cc": "rasland@mellanox.com, matan@mellanox.com, viacheslavo@mellanox.com,\n ferruh.yigit@intel.com, thomas@monjalon.net",
        "Date": "Thu, 30 Jan 2020 18:14:39 +0200",
        "Message-Id": "<1580400880-96628-5-git-send-email-akozyrev@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1580400880-96628-1-git-send-email-akozyrev@mellanox.com>",
        "References": "<1579789555-23239-1-git-send-email-akozyrev@mellanox.com>\n <1580400880-96628-1-git-send-email-akozyrev@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH v5 4/5] drivers: use mlx5 debug flag instead of\n\tNDEBUG",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Use the RTE_LIBRTE_MLX5_DEBUG configuration flag to get rid of dependency\non the NDEBUG definition. This is a preparation step to switch\nfrom standard assert clauses to DPDK RTE_ASSERT ones in MLX5 driver.\n\nSigned-off-by: Alexander Kozyrev <akozyrev@mellanox.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n---\n drivers/common/mlx5/Makefile      |  2 +-\n drivers/common/mlx5/meson.build   |  4 ++--\n drivers/common/mlx5/mlx5_common.c |  2 +-\n drivers/common/mlx5/mlx5_common.h | 14 +++++++-------\n drivers/common/mlx5/mlx5_nl.c     |  2 +-\n drivers/net/mlx5/Makefile         |  4 ++--\n drivers/net/mlx5/meson.build      |  4 ++--\n drivers/net/mlx5/mlx5.c           |  4 ++--\n drivers/net/mlx5/mlx5_flow_dv.c   |  2 +-\n drivers/net/mlx5/mlx5_mr.c        |  4 ++--\n drivers/net/mlx5/mlx5_rxtx.c      |  8 ++++----\n drivers/net/mlx5/mlx5_rxtx.h      |  6 +++---\n drivers/net/mlx5/mlx5_txq.c       |  2 +-\n 13 files changed, 29 insertions(+), 29 deletions(-)",
    "diff": "diff --git a/drivers/common/mlx5/Makefile b/drivers/common/mlx5/Makefile\nindex 9d4d81f..624d331 100644\n--- a/drivers/common/mlx5/Makefile\n+++ b/drivers/common/mlx5/Makefile\n@@ -45,7 +45,7 @@ endif\n LDLIBS += -lrte_eal -lrte_pci -lrte_kvargs -lrte_net\n \n # A few warnings cannot be avoided in external headers.\n-CFLAGS += -Wno-error=cast-qual -DNDEBUG -UPEDANTIC\n+CFLAGS += -Wno-error=cast-qual -UPEDANTIC\n \n EXPORT_MAP := rte_common_mlx5_version.map\n \ndiff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build\nindex fdd1e85..2b70410 100644\n--- a/drivers/common/mlx5/meson.build\n+++ b/drivers/common/mlx5/meson.build\n@@ -60,9 +60,9 @@ if build\n \t\tendif\n \tendforeach\n \tif get_option('buildtype').contains('debug')\n-\t\tcflags += [ '-pedantic', '-UNDEBUG', '-DPEDANTIC' ]\n+\t\tcflags += [ '-pedantic', '-DPEDANTIC' ]\n \telse\n-\t\tcflags += [ '-DNDEBUG', '-UPEDANTIC' ]\n+\t\tcflags += [ '-UPEDANTIC' ]\n \tendif\n \t# To maintain the compatibility with the make build system\n \t# mlx5_autoconf.h file is still generated.\ndiff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c\nindex 922794e..3ff0172 100644\n--- a/drivers/common/mlx5/mlx5_common.c\n+++ b/drivers/common/mlx5/mlx5_common.c\n@@ -304,7 +304,7 @@ enum mlx5_class\n \t}\n \tmlx5_glue = *sym;\n #endif /* RTE_IBVERBS_LINK_DLOPEN */\n-#ifndef NDEBUG\n+#ifdef RTE_LIBRTE_MLX5_DEBUG\n \t/* Glue structure must not contain any NULL pointers. */\n \t{\n \t\tunsigned int i;\ndiff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h\nindex d9c2d26..884ec02 100644\n--- a/drivers/common/mlx5/mlx5_common.h\n+++ b/drivers/common/mlx5/mlx5_common.h\n@@ -75,10 +75,10 @@\n \t\tRTE_FMT_TAIL(__VA_ARGS__,)))\n \n /*\n- * When debugging is enabled (NDEBUG not defined), file, line and function\n+ * When debugging is enabled (MLX5_DEBUG not defined), file, line and function\n  * information replace the driver name (MLX5_DRIVER_NAME) in log messages.\n  */\n-#ifndef NDEBUG\n+#ifdef RTE_LIBRTE_MLX5_DEBUG\n \n #define PMD_DRV_LOG__(level, type, name, ...) \\\n \tPMD_DRV_LOG___(level, type, name, \"%s:%u: %s(): \" __VA_ARGS__)\n@@ -90,28 +90,28 @@\n \t\t__func__, \\\n \t\t__VA_ARGS__)\n \n-#else /* NDEBUG */\n+#else /* RTE_LIBRTE_MLX5_DEBUG */\n #define PMD_DRV_LOG__(level, type, name, ...) \\\n \tPMD_DRV_LOG___(level, type, name, __VA_ARGS__)\n #define PMD_DRV_LOG_(level, type, name, s, ...) \\\n \tPMD_DRV_LOG__(level, type, name, s \"\\n\", __VA_ARGS__)\n \n-#endif /* NDEBUG */\n+#endif /* RTE_LIBRTE_MLX5_DEBUG */\n \n /* claim_zero() does not perform any check when debugging is disabled. */\n-#ifndef NDEBUG\n+#ifdef RTE_LIBRTE_MLX5_DEBUG\n \n #define DEBUG(...) DRV_LOG(DEBUG, __VA_ARGS__)\n #define claim_zero(...) assert((__VA_ARGS__) == 0)\n #define claim_nonzero(...) assert((__VA_ARGS__) != 0)\n \n-#else /* NDEBUG */\n+#else /* RTE_LIBRTE_MLX5_DEBUG */\n \n #define DEBUG(...) (void)0\n #define claim_zero(...) (__VA_ARGS__)\n #define claim_nonzero(...) (__VA_ARGS__)\n \n-#endif /* NDEBUG */\n+#endif /* RTE_LIBRTE_MLX5_DEBUG */\n \n /* Allocate a buffer on the stack and fill it with a printf format string. */\n #define MKSTR(name, ...) \\\ndiff --git a/drivers/common/mlx5/mlx5_nl.c b/drivers/common/mlx5/mlx5_nl.c\nindex 0d1efd2..26547f4 100644\n--- a/drivers/common/mlx5/mlx5_nl.c\n+++ b/drivers/common/mlx5/mlx5_nl.c\n@@ -418,7 +418,7 @@ struct mlx5_nl_ifindex_data {\n \t\t\t\trte_errno = ENOMEM;\n \t\t\t\treturn -rte_errno;\n \t\t\t}\n-#ifndef NDEBUG\n+#ifdef RTE_LIBRTE_MLX5_DEBUG\n \t\t\tchar m[18];\n \n \t\t\trte_ether_format_addr(m, 18, RTA_DATA(attribute));\ndiff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile\nindex d26afbb..e8ba624 100644\n--- a/drivers/net/mlx5/Makefile\n+++ b/drivers/net/mlx5/Makefile\n@@ -67,13 +67,13 @@ endif\n \n # User-defined CFLAGS.\n ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DEBUG),y)\n-CFLAGS += -pedantic -UNDEBUG\n+CFLAGS += -pedantic\n ifneq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)\n CFLAGS += -DPEDANTIC\n endif\n AUTO_CONFIG_CFLAGS += -Wno-pedantic\n else\n-CFLAGS += -DNDEBUG -UPEDANTIC\n+CFLAGS += -UPEDANTIC\n endif\n \n include $(RTE_SDK)/mk/rte.lib.mk\ndiff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build\nindex d45be00..d418d26 100644\n--- a/drivers/net/mlx5/meson.build\n+++ b/drivers/net/mlx5/meson.build\n@@ -49,7 +49,7 @@ foreach option:cflags_options\n \tendif\n endforeach\n if get_option('buildtype').contains('debug')\n-\tcflags += [ '-pedantic', '-UNDEBUG', '-DPEDANTIC' ]\n+\tcflags += [ '-pedantic', '-DPEDANTIC' ]\n else\n-\tcflags += [ '-DNDEBUG', '-UPEDANTIC' ]\n+\tcflags += [ '-UPEDANTIC' ]\n endif\ndiff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex e5fc1d3..33c0c82 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -661,7 +661,7 @@ struct mlx5_flow_id_pool *\n mlx5_free_shared_ibctx(struct mlx5_ibv_shared *sh)\n {\n \tpthread_mutex_lock(&mlx5_ibv_list_mutex);\n-#ifndef NDEBUG\n+#ifdef RTE_LIBRTE_MLX5_DEBUG\n \t/* Check the object presence in the list. */\n \tstruct mlx5_ibv_shared *lctx;\n \n@@ -2644,7 +2644,7 @@ struct mlx5_flow_id_pool *\n \t\tmac.addr_bytes[0], mac.addr_bytes[1],\n \t\tmac.addr_bytes[2], mac.addr_bytes[3],\n \t\tmac.addr_bytes[4], mac.addr_bytes[5]);\n-#ifndef NDEBUG\n+#ifdef RTE_LIBRTE_MLX5_DEBUG\n \t{\n \t\tchar ifname[IF_NAMESIZE];\n \ndiff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex f82c90e..17d6d7c 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -5118,7 +5118,7 @@ struct field_modify_info modify_tcp[] = {\n \treturn dev_flow;\n }\n \n-#ifndef NDEBUG\n+#ifdef RTE_LIBRTE_MLX5_DEBUG\n /**\n  * Sanity check for match mask and value. Similar to check_valid_spec() in\n  * kernel driver. If unmasked bit is present in value, it returns failure.\ndiff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c\nindex b1cd9f7..764a741 100644\n--- a/drivers/net/mlx5/mlx5_mr.c\n+++ b/drivers/net/mlx5/mlx5_mr.c\n@@ -241,7 +241,7 @@ struct mr_update_mp_data {\n void\n mlx5_mr_btree_dump(struct mlx5_mr_btree *bt __rte_unused)\n {\n-#ifndef NDEBUG\n+#ifdef RTE_LIBRTE_MLX5_DEBUG\n \tint idx;\n \tstruct mlx5_mr_cache *lkp_tbl;\n \n@@ -1552,7 +1552,7 @@ struct mr_update_mp_data {\n void\n mlx5_mr_dump_dev(struct mlx5_ibv_shared *sh __rte_unused)\n {\n-#ifndef NDEBUG\n+#ifdef RTE_LIBRTE_MLX5_DEBUG\n \tstruct mlx5_mr *mr;\n \tint mr_n = 0;\n \tint chunk_n = 0;\ndiff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c\nindex 37a2084..0b94ddc 100644\n--- a/drivers/net/mlx5/mlx5_rxtx.c\n+++ b/drivers/net/mlx5/mlx5_rxtx.c\n@@ -2185,11 +2185,11 @@ enum mlx5_txcmp_code {\n \t\tlast->cseg.flags = RTE_BE32(MLX5_COMP_ALWAYS <<\n \t\t\t\t\t    MLX5_COMP_MODE_OFFSET);\n \t\t/* Save elts_head in dedicated free on completion queue. */\n-#ifdef NDEBUG\n-\t\ttxq->fcqs[txq->cq_pi++ & txq->cqe_m] = head;\n-#else\n+#ifdef RTE_LIBRTE_MLX5_DEBUG\n \t\ttxq->fcqs[txq->cq_pi++ & txq->cqe_m] = head |\n-\t\t\t\t\t(last->cseg.opcode >> 8) << 16;\n+\t\t\t  (last->cseg.opcode >> 8) << 16;\n+#else\n+\t\ttxq->fcqs[txq->cq_pi++ & txq->cqe_m] = head;\n #endif\n \t\t/* A CQE slot must always be available. */\n \t\tassert((txq->cq_pi - txq->cq_ci) <= txq->cqe_s);\ndiff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h\nindex f9b611a..206c5d2 100644\n--- a/drivers/net/mlx5/mlx5_rxtx.h\n+++ b/drivers/net/mlx5/mlx5_rxtx.h\n@@ -300,10 +300,10 @@ struct mlx5_txq_data {\n \tstruct mlx5_mr_ctrl mr_ctrl; /* MR control descriptor. */\n \tstruct mlx5_wqe *wqes; /* Work queue. */\n \tstruct mlx5_wqe *wqes_end; /* Work queue array limit. */\n-#ifdef NDEBUG\n-\tuint16_t *fcqs; /* Free completion queue. */\n-#else\n+#ifdef RTE_LIBRTE_MLX5_DEBUG\n \tuint32_t *fcqs; /* Free completion queue (debug extended). */\n+#else\n+\tuint16_t *fcqs; /* Free completion queue. */\n #endif\n \tvolatile struct mlx5_cqe *cqes; /* Completion queue. */\n \tvolatile uint32_t *qp_db; /* Work queue doorbell. */\ndiff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c\nindex 7bff769..5c91adf 100644\n--- a/drivers/net/mlx5/mlx5_txq.c\n+++ b/drivers/net/mlx5/mlx5_txq.c\n@@ -85,7 +85,7 @@\n \n \t\tassert(elt != NULL);\n \t\trte_pktmbuf_free_seg(elt);\n-#ifndef NDEBUG\n+#ifdef RTE_LIBRTE_MLX5_DEBUG\n \t\t/* Poisoning. */\n \t\tmemset(&(*elts)[elts_tail & elts_m],\n \t\t       0x77,\n",
    "prefixes": [
        "v5",
        "4/5"
    ]
}