From patchwork Mon Mar 15 21:05:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Baum X-Patchwork-Id: 89160 X-Patchwork-Delegate: rasland@nvidia.com Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id EBB09A054F; Mon, 15 Mar 2021 22:06:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6EF5B2427DE; Mon, 15 Mar 2021 22:06:19 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id 8F96E4069F for ; Mon, 15 Mar 2021 22:06:17 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from michaelba@nvidia.com) with SMTP; 15 Mar 2021 23:06:11 +0200 Received: from nvidia.com (pegasus07.mtr.labs.mlnx [10.210.16.112]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 12FL6BJW010339; Mon, 15 Mar 2021 23:06:11 +0200 From: Michael Baum To: dev@dpdk.org Cc: thomas@monjalon.net, viacheslavo@nvidia.com, matan@nvidia.com, rasland@nvidia.com, Asaf Penso Date: Mon, 15 Mar 2021 21:05:54 +0000 Message-Id: <1615842355-10526-1-git-send-email-michaelba@nvidia.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH 1/2] common/mlx5: align driver name logs across pmds X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" From: Asaf Penso Some mlx5 pmds define the log prefix as "mlx5_pmd" while others as "pmd_mlx5". The patch aligns all pmds to use the "mlx5_pmd" format. Signed-off-by: Asaf Penso Acked-by: Viacheslav Ovsiienko --- drivers/common/mlx5/mlx5_common.h | 4 ---- drivers/common/mlx5/mlx5_common_utils.h | 2 +- drivers/net/mlx5/mlx5_utils.h | 4 +++- drivers/regex/mlx5/mlx5_regex_utils.h | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h index 3855582..fc1ac75 100644 --- a/drivers/common/mlx5/mlx5_common.h +++ b/drivers/common/mlx5/mlx5_common.h @@ -65,10 +65,6 @@ RTE_FMT_HEAD(__VA_ARGS__,), \ RTE_FMT_TAIL(__VA_ARGS__,))) -/* - * When debugging is enabled (MLX5_DEBUG not defined), file, line and function - * information replace the driver name (MLX5_DRIVER_NAME) in log messages. - */ #ifdef RTE_LIBRTE_MLX5_DEBUG #define PMD_DRV_LOG__(level, type, name, ...) \ diff --git a/drivers/common/mlx5/mlx5_common_utils.h b/drivers/common/mlx5/mlx5_common_utils.h index 32c3adf..6cba39c 100644 --- a/drivers/common/mlx5/mlx5_common_utils.h +++ b/drivers/common/mlx5/mlx5_common_utils.h @@ -10,7 +10,7 @@ extern int mlx5_common_logtype; -#define MLX5_COMMON_LOG_PREFIX "common_mlx5" +#define MLX5_COMMON_LOG_PREFIX "mlx5_common" /* Generic printf()-like logging macro with automatic line feed. */ #define DRV_LOG(level, ...) \ PMD_DRV_LOG_(level, mlx5_common_logtype, MLX5_COMMON_LOG_PREFIX, \ diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h index 7a62187..5088c95 100644 --- a/drivers/net/mlx5/mlx5_utils.h +++ b/drivers/net/mlx5/mlx5_utils.h @@ -29,9 +29,11 @@ extern int mlx5_logtype; +#define MLX5_NET_LOG_PREFIX "mlx5_net" + /* Generic printf()-like logging macro with automatic line feed. */ #define DRV_LOG(level, ...) \ - PMD_DRV_LOG_(level, mlx5_logtype, MLX5_DRIVER_NAME, \ + PMD_DRV_LOG_(level, mlx5_logtype, MLX5_NET_LOG_PREFIX, \ __VA_ARGS__ PMD_DRV_LOG_STRIP PMD_DRV_LOG_OPAREN, \ PMD_DRV_LOG_CPAREN) diff --git a/drivers/regex/mlx5/mlx5_regex_utils.h b/drivers/regex/mlx5/mlx5_regex_utils.h index adca846..104e794 100644 --- a/drivers/regex/mlx5/mlx5_regex_utils.h +++ b/drivers/regex/mlx5/mlx5_regex_utils.h @@ -9,7 +9,7 @@ extern int mlx5_regex_logtype; -#define MLX5_REGEX_LOG_PREFIX "regex_mlx5" +#define MLX5_REGEX_LOG_PREFIX "mlx5_regex" /* Generic printf()-like logging macro with automatic line feed. */ #define DRV_LOG(level, ...) \ PMD_DRV_LOG_(level, mlx5_regex_logtype, MLX5_REGEX_LOG_PREFIX, \ From patchwork Mon Mar 15 21:05:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Baum X-Patchwork-Id: 89161 X-Patchwork-Delegate: rasland@nvidia.com Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id 19F3DA054F; Mon, 15 Mar 2021 22:06:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D12862427E4; Mon, 15 Mar 2021 22:06:23 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id 3F7942427E3 for ; Mon, 15 Mar 2021 22:06:22 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from michaelba@nvidia.com) with SMTP; 15 Mar 2021 23:06:19 +0200 Received: from nvidia.com (pegasus07.mtr.labs.mlnx [10.210.16.112]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 12FL6BJX010339; Mon, 15 Mar 2021 23:06:18 +0200 From: Michael Baum To: dev@dpdk.org Cc: thomas@monjalon.net, viacheslavo@nvidia.com, matan@nvidia.com, rasland@nvidia.com, Asaf Penso Date: Mon, 15 Mar 2021 21:05:55 +0000 Message-Id: <1615842355-10526-2-git-send-email-michaelba@nvidia.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1615842355-10526-1-git-send-email-michaelba@nvidia.com> References: <1615842355-10526-1-git-send-email-michaelba@nvidia.com> Subject: [dpdk-dev] [PATCH 2/2] common/mlx5: rename driver name to include PCI notation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" From: Asaf Penso The current define for MLX5_DRIVER_NAME refers specially for the PCI driver. The define itself does not mention PCI and this is confusing. Rename from MLX5_DRIVER_NAME to MLX5_PCI_DRIVER_NAME. Signed-off-by: Asaf Penso Acked-by: Viacheslav Ovsiienko --- drivers/common/mlx5/mlx5_common.h | 2 +- drivers/common/mlx5/mlx5_common_pci.c | 2 +- drivers/net/mlx5/mlx5.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h index fc1ac75..84c3960 100644 --- a/drivers/common/mlx5/mlx5_common.h +++ b/drivers/common/mlx5/mlx5_common.h @@ -19,7 +19,7 @@ #include "mlx5_devx_cmds.h" /* Reported driver name. */ -#define MLX5_DRIVER_NAME "mlx5_pci" +#define MLX5_PCI_DRIVER_NAME "mlx5_pci" /* Bit-field manipulation. */ #define BITFIELD_DECLARE(bf, type, size) \ diff --git a/drivers/common/mlx5/mlx5_common_pci.c b/drivers/common/mlx5/mlx5_common_pci.c index 2b65768..3783b0e 100644 --- a/drivers/common/mlx5/mlx5_common_pci.c +++ b/drivers/common/mlx5/mlx5_common_pci.c @@ -415,7 +415,7 @@ class_name_to_value(const char *class_name) static struct rte_pci_driver mlx5_pci_driver = { .driver = { - .name = MLX5_DRIVER_NAME, + .name = MLX5_PCI_DRIVER_NAME, }, .probe = mlx5_common_pci_probe, .remove = mlx5_common_pci_remove, diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index abd7ff70..a22bbc9 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -2094,7 +2094,7 @@ struct mlx5_dev_ctx_shared * (dev->device == &pci_dev->device || (dev->device->driver && dev->device->driver->name && - !strcmp(dev->device->driver->name, MLX5_DRIVER_NAME)))) + !strcmp(dev->device->driver->name, MLX5_PCI_DRIVER_NAME)))) break; port_id++; } @@ -2215,7 +2215,7 @@ struct mlx5_dev_ctx_shared * .driver_class = MLX5_CLASS_NET, .pci_driver = { .driver = { - .name = MLX5_DRIVER_NAME, + .name = MLX5_PCI_DRIVER_NAME, }, .id_table = mlx5_pci_id_map, .probe = mlx5_os_pci_probe,