From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id B36A8201 for ; Sun, 14 Oct 2018 22:47:53 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 613B3217DD; Sun, 14 Oct 2018 16:47:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 14 Oct 2018 16:47:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=6mffvm0zJl BMQxqr5VLR7b2ZioBabdrIOCy1zSzyq50=; b=W0tcDN6qrqx2U7jR526ajUW9mV nk30mTwqsEydGHvXVAc69uK/g4i/KFWxmmUkB2P6HLNPY+h2nM2jGi4ZtXOFRUE8 c7M8hSZJGqSW9/Xhw4IJEQR1dfffr0f1fXJDmKq1BUKGpliawXYQr7KQhG6AavgV NVMNX4yrYW1kO4xKY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=6mffvm0zJlBMQxqr5VLR7b2ZioBabdrIOCy1zSzyq50=; b=CY9nx/1y B48oJ4NJtS+myhkSNpgrC3rjy0xeDoWWhPdrgLDR5R5iqlWilbmzdKPTjof47kPa HUmAgsD2fjoOSx1c36/2SID7rOhD4a3/nxRjaFLfzzmLKEgUub3T+FTCz1Gd+jC8 iF/ZuwmjGK18/48QIZCOfh7VEeLyZbfTSuLMDAxCed2Mv/kZE/hbsgN1q2OLZWn2 VD9TGc2qpOKaL45DU1VnAV+KJ0AGJTtpQqIFvijx9/mqmkd5U7xONPab8bGIkXgq VigJUNAVmzkYaV2nlaRIyq5mXi0uzRoGsp9mBl69gtJjwHn7Ue4P7eGBeHzpatQt oo7uYBTmaz1B5A== X-ME-Sender: X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 581F1E455C; Sun, 14 Oct 2018 16:47:52 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: gaetan.rivet@6wind.com, ophirmu@mellanox.com, qi.z.zhang@intel.com, ferruh.yigit@intel.com Date: Sun, 14 Oct 2018 22:47:43 +0200 Message-Id: <20181014204747.26621-4-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181014204747.26621-1-thomas@monjalon.net> References: <20180907230958.21402-1-thomas@monjalon.net> <20181014204747.26621-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 3/7] cryptodev: remove driver name from 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: , X-List-Received-Date: Sun, 14 Oct 2018 20:47:54 -0000 The logs printed by CDEV_LOG_* were prefixed with the driver name. In order to avoid assigning the driver before the end of the probing, the driver name is removed from the cryptodev library logs. Signed-off-by: Thomas Monjalon --- lib/librte_cryptodev/rte_cryptodev_pmd.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c index 2088ac3f3..f03bdbd5e 100644 --- a/lib/librte_cryptodev/rte_cryptodev_pmd.c +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c @@ -93,24 +93,20 @@ rte_cryptodev_pmd_create(const char *name, struct rte_cryptodev *cryptodev; if (params->name[0] != '\0') { - CDEV_LOG_INFO("[%s] User specified device name = %s\n", - device->driver->name, params->name); + CDEV_LOG_INFO("User specified device name = %s\n", params->name); name = params->name; } - CDEV_LOG_INFO("[%s] - Creating cryptodev %s\n", - device->driver->name, name); + CDEV_LOG_INFO("Creating cryptodev %s\n", name); - CDEV_LOG_INFO("[%s] - Initialisation parameters - name: %s," + CDEV_LOG_INFO("Initialisation parameters - name: %s," "socket id: %d, max queue pairs: %u", - device->driver->name, name, - params->socket_id, params->max_nb_queue_pairs); + name, params->socket_id, params->max_nb_queue_pairs); /* allocate device structure */ cryptodev = rte_cryptodev_pmd_allocate(name, params->socket_id); if (cryptodev == NULL) { - CDEV_LOG_ERR("[%s] Failed to allocate crypto device for %s", - device->driver->name, name); + CDEV_LOG_ERR("Failed to allocate crypto device for %s", name); return NULL; } @@ -123,9 +119,8 @@ rte_cryptodev_pmd_create(const char *name, params->socket_id); if (cryptodev->data->dev_private == NULL) { - CDEV_LOG_ERR("[%s] Cannot allocate memory for " - "cryptodev %s private data", - device->driver->name, name); + CDEV_LOG_ERR("Cannot allocate memory for cryptodev %s" + " private data", name); rte_cryptodev_pmd_release_device(cryptodev); return NULL; @@ -145,9 +140,7 @@ rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev) { int retval; - CDEV_LOG_INFO("[%s] Closing crypto device %s", - cryptodev->device->driver->name, - cryptodev->device->name); + CDEV_LOG_INFO("Closing crypto device %s", cryptodev->device->name); /* free crypto device */ retval = rte_cryptodev_pmd_release_device(cryptodev); -- 2.19.0