From patchwork Thu Jan 30 16:14:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kozyrev X-Patchwork-Id: 65375 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5481CA0524; Thu, 30 Jan 2020 17:15:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 02F7B1C0B3; Thu, 30 Jan 2020 17:14:50 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id E18201C031 for ; Thu, 30 Jan 2020 17:14:44 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from akozyrev@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Jan 2020 18:14:42 +0200 Received: from pegasus02.mtr.labs.mlnx. (pegasus02.mtr.labs.mlnx [10.210.16.122]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 00UGEfJ7009609; Thu, 30 Jan 2020 18:14:41 +0200 From: Alexander Kozyrev To: dev@dpdk.org Cc: rasland@mellanox.com, matan@mellanox.com, viacheslavo@mellanox.com, ferruh.yigit@intel.com, thomas@monjalon.net Date: Thu, 30 Jan 2020 18:14:35 +0200 Message-Id: <1580400880-96628-1-git-send-email-akozyrev@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1579789555-23239-1-git-send-email-akozyrev@mellanox.com> References: <1579789555-23239-1-git-send-email-akozyrev@mellanox.com> Subject: [dpdk-dev] [PATCH v5 0/5] net/mlx: assert cleanup in mlx drivers 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" net/mlx: assert cleanup in mlx drivers The Mellanox PMD uses the NDEBUG definition to control built-in debug features including the asserting one. The DPDK uses a bit different approach and provides RTE_ASSERT macro and appropriate global configuration option: CONFIG_RTE_ENABLE_ASSERT. The patch set introduces the MLX_ASSERT macros that allows to follow the DPDK approach in a unified fashion and, at the same time, provides the opportunity to turn on Mellanox PMD assert feature with dedicated local configuration options: CONFIG_RTE_LIBRTE_MLX_DEBUG. Note that the direct configuration MLX_DEBUG is clearer than double negation "ifndef NDEBUG" used before. This patch set triggers another false positive warning with ICC. To spare future development efforts we disable the treatments of compilation warnings as errors in ICC config. GCC stays as a guard. Signed-off-by: Alexander Kozyrev --- v1: http://patches.dpdk.org/cover/65082/ v2: http://patches.dpdk.org/cover/65089/ - Corrects typos and make commit messages more accurate. - Fixes broken compilation due to an undefined function in debug mode. v3: http://patches.dpdk.org/cover/65145/ - Uses RTE_LIBRTE_MLX_DEBUG directly instead of MLX_DEBUG v4: http://patches.dpdk.org/cover/65364/ - Covers a new mlx5 common library driver v5: - Merges with a new version of mlx5 Alexander Kozyrev (5): mk/icc: disable treatment of warnings as errors net/mlx4: use mlx4 debug flag instead of NDEBUG net/mlx4: introduce the mlx4 version of the assert drivers: use mlx5 debug flag instead of NDEBUG drivers: introduce the mlx5 version of the assert drivers/common/mlx5/Makefile | 2 +- drivers/common/mlx5/meson.build | 4 +- drivers/common/mlx5/mlx5_common.c | 4 +- drivers/common/mlx5/mlx5_common.h | 38 ++-- drivers/common/mlx5/mlx5_devx_cmds.c | 8 +- drivers/common/mlx5/mlx5_nl.c | 14 +- drivers/common/mlx5/mlx5_prm.h | 3 +- drivers/net/mlx4/Makefile | 4 +- drivers/net/mlx4/meson.build | 4 +- drivers/net/mlx4/mlx4.c | 29 ++- drivers/net/mlx4/mlx4_ethdev.c | 5 +- drivers/net/mlx4/mlx4_flow.c | 34 ++-- drivers/net/mlx4/mlx4_intr.c | 3 +- drivers/net/mlx4/mlx4_mp.c | 25 ++- drivers/net/mlx4/mlx4_mr.c | 74 ++++---- drivers/net/mlx4/mlx4_rxq.c | 53 +++--- drivers/net/mlx4/mlx4_rxtx.c | 29 ++- drivers/net/mlx4/mlx4_txq.c | 17 +- drivers/net/mlx4/mlx4_utils.c | 3 +- drivers/net/mlx4/mlx4_utils.h | 15 +- drivers/net/mlx5/Makefile | 4 +- drivers/net/mlx5/meson.build | 4 +- drivers/net/mlx5/mlx5.c | 77 ++++---- drivers/net/mlx5/mlx5_ethdev.c | 69 ++++---- drivers/net/mlx5/mlx5_flow.c | 69 ++++---- drivers/net/mlx5/mlx5_flow_dv.c | 97 ++++++----- drivers/net/mlx5/mlx5_flow_meter.c | 12 +- drivers/net/mlx5/mlx5_flow_verbs.c | 4 +- drivers/net/mlx5/mlx5_mac.c | 5 +- drivers/net/mlx5/mlx5_mp.c | 29 ++- drivers/net/mlx5/mlx5_mr.c | 71 ++++---- drivers/net/mlx5/mlx5_rss.c | 3 +- drivers/net/mlx5/mlx5_rxq.c | 41 +++-- drivers/net/mlx5/mlx5_rxtx.c | 291 ++++++++++++++++--------------- drivers/net/mlx5/mlx5_rxtx.h | 6 +- drivers/net/mlx5/mlx5_rxtx_vec.c | 1 - drivers/net/mlx5/mlx5_rxtx_vec.h | 7 +- drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 11 +- drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 11 +- drivers/net/mlx5/mlx5_rxtx_vec_sse.h | 11 +- drivers/net/mlx5/mlx5_socket.c | 4 +- drivers/net/mlx5/mlx5_stats.c | 2 +- drivers/net/mlx5/mlx5_txq.c | 59 +++---- drivers/net/mlx5/mlx5_utils.c | 8 +- drivers/net/mlx5/mlx5_utils.h | 20 --- drivers/net/mlx5/mlx5_vlan.c | 19 +- mk/toolchain/icc/rte.vars.mk | 4 - 47 files changed, 638 insertions(+), 669 deletions(-)