From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id F298F5B1E for ; Mon, 30 Jul 2018 18:15:53 +0200 (CEST) Received: from 1.general.paelzer.uk.vpn ([10.172.196.172] helo=lap.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fkAoq-00009D-Tv; Mon, 30 Jul 2018 16:14:48 +0000 From: Christian Ehrhardt To: Stephen Hemminger Cc: Nelio Laranjeiro , dpdk stable Date: Mon, 30 Jul 2018 18:11:09 +0200 Message-Id: <20180730161342.16566-24-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180730161342.16566-1-christian.ehrhardt@canonical.com> References: <20180730161342.16566-1-christian.ehrhardt@canonical.com> Subject: [dpdk-stable] patch 'net/mlx5: fix log initialization' has been queued to stable release 18.05.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2018 16:15:54 -0000 Hi, FYI, your patch has been queued to stable release 18.05.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/01/18. So please shout if anyone has objections. Thanks. Christian Ehrhardt --- >>From 2dde8975ee5851780a7711db5c77cb0583f8adbc Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 13 Jun 2018 11:46:26 -0700 Subject: [PATCH] net/mlx5: fix log initialization [ upstream commit 3d96644aa3af431ed881b900971b8228e93889a9 ] The mlx5 driver had two init functions, but this could cause log initialization to be done after the other initialization. Also, the name of the function does not match convention (cut/paste error?). Fix by initializing log type first at start of the pmd_init. This also gets rid of having two constructor functions. Fixes: a170a30d22a8 ("net/mlx5: use dynamic logging") Signed-off-by: Stephen Hemminger Acked-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index c7e4b3bf1..bd2a5b9c1 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -1440,6 +1440,11 @@ RTE_INIT(rte_mlx5_pmd_init); static void rte_mlx5_pmd_init(void) { + /* Initialize driver log type. */ + mlx5_logtype = rte_log_register("pmd.net.mlx5"); + if (mlx5_logtype >= 0) + rte_log_set_level(mlx5_logtype, RTE_LOG_NOTICE); + /* Build the static tables for Verbs conversion. */ mlx5_set_ptype_table(); mlx5_set_cksum_table(); @@ -1481,11 +1486,3 @@ rte_mlx5_pmd_init(void) RTE_PMD_EXPORT_NAME(net_mlx5, __COUNTER__); RTE_PMD_REGISTER_PCI_TABLE(net_mlx5, mlx5_pci_id_map); RTE_PMD_REGISTER_KMOD_DEP(net_mlx5, "* ib_uverbs & mlx5_core & mlx5_ib"); - -/** Initialize driver log type. */ -RTE_INIT(vdev_netvsc_init_log) -{ - mlx5_logtype = rte_log_register("pmd.net.mlx5"); - if (mlx5_logtype >= 0) - rte_log_set_level(mlx5_logtype, RTE_LOG_NOTICE); -} -- 2.17.1