From patchwork Thu Jul 2 11:17:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 72823 X-Patchwork-Delegate: ferruh.yigit@amd.com 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 61ACAA0520; Thu, 2 Jul 2020 13:17:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AD6BA1D979; Thu, 2 Jul 2020 13:17:12 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 0D93E1D977; Thu, 2 Jul 2020 13:17:09 +0200 (CEST) IronPort-SDR: 7vVPvg+uun01LfIantJcmW/LKZtyRkDzGB4Y1+/aHO6wDFVGDqqH4vgw8lDkitCq/pfO8GRBX5 gypiWXbUZKAw== X-IronPort-AV: E=McAfee;i="6000,8403,9669"; a="145015291" X-IronPort-AV: E=Sophos;i="5.75,304,1589266800"; d="scan'208";a="145015291" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2020 04:17:09 -0700 IronPort-SDR: CcxZ6dKJi3JYip6KXeqed1t34IDsRsvxSSUbAObvI02nmJOk/zfwzClDOxUHLmlA2Y0uOF5LVq g3kEVn+i1CGQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,304,1589266800"; d="scan'208";a="425921796" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.180]) by orsmga004.jf.intel.com with ESMTP; 02 Jul 2020 04:17:07 -0700 From: Ferruh Yigit To: Thomas Monjalon , Andrew Rybchenko , Declan Doherty Cc: dev@dpdk.org, Ferruh Yigit , stable@dpdk.org Date: Thu, 2 Jul 2020 12:17:05 +0100 Message-Id: <20200702111705.1150144-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] ethdev: fix log type for some logs 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" Some log macros was using 'EAL' logtype, convert them to 'ethdev'. Also fix missing EOL and fix syntax for some logs. Fixes: 214ed1acd125 ("ethdev: add iterator to match devargs input") Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit Reviewed-by: Andrew Rybchenko --- Cc: thomas@monjalon.net Cc: declan.doherty@intel.com --- lib/librte_ethdev/rte_ethdev.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 8e10a6fc3..a717626ae 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -279,7 +279,7 @@ rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str) error: if (ret == -ENOTSUP) - RTE_LOG(ERR, EAL, "Bus %s does not support iterating.\n", + RTE_ETHDEV_LOG(ERR, "Bus %s does not support iterating.\n", iter->bus->name); free(devargs.args); free(bus_str); @@ -4232,7 +4232,8 @@ rte_eth_dev_create(struct rte_device *device, const char *name, device->numa_node); if (!ethdev->data->dev_private) { - RTE_LOG(ERR, EAL, "failed to allocate private data"); + RTE_ETHDEV_LOG(ERR, + "failed to allocate private data\n"); retval = -ENOMEM; goto probe_failed; } @@ -4240,8 +4241,8 @@ rte_eth_dev_create(struct rte_device *device, const char *name, } else { ethdev = rte_eth_dev_attach_secondary(name); if (!ethdev) { - RTE_LOG(ERR, EAL, "secondary process attach failed, " - "ethdev doesn't exist"); + RTE_ETHDEV_LOG(ERR, + "secondary process attach failed, ethdev doesn't exist\n"); return -ENODEV; } } @@ -4251,15 +4252,15 @@ rte_eth_dev_create(struct rte_device *device, const char *name, if (ethdev_bus_specific_init) { retval = ethdev_bus_specific_init(ethdev, bus_init_params); if (retval) { - RTE_LOG(ERR, EAL, - "ethdev bus specific initialisation failed"); + RTE_ETHDEV_LOG(ERR, + "ethdev bus specific initialisation failed\n"); goto probe_failed; } } retval = ethdev_init(ethdev, init_params); if (retval) { - RTE_LOG(ERR, EAL, "ethdev initialisation failed"); + RTE_ETHDEV_LOG(ERR, "ethdev initialisation failed\n"); goto probe_failed; }