All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: gaetan.rivet@6wind.com, ophirmu@mellanox.com,
	qi.z.zhang@intel.com, ferruh.yigit@intel.com,
	Declan Doherty <declan.doherty@intel.com>
Subject: Re: [PATCH v5 3/7] cryptodev: remove driver name from logs
Date: Mon, 15 Oct 2018 10:51:04 +0200	[thread overview]
Message-ID: <1708821.o1i3cNID5q@xps> (raw)
In-Reply-To: <20181014204747.26621-4-thomas@monjalon.net>

+Cc Declan

14/10/2018 22:47, Thomas Monjalon:
> 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 <thomas@monjalon.net>
> ---
>  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);
> 

  reply	other threads:[~2018-10-15  8:51 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 23:09 [RFC] eal: allow hotplug to skip an already probed device Thomas Monjalon
2018-09-13  6:29 ` Ophir Munk
2018-09-16 10:14   ` Ophir Munk
2018-09-28 16:40 ` [PATCH v2 0/3] " Thomas Monjalon
2018-09-28 16:40   ` [PATCH v2 1/3] drivers/bus: move driver assignment to end of probing Thomas Monjalon
2018-09-28 16:40   ` [PATCH v2 2/3] eal: add function to query device status Thomas Monjalon
2018-09-28 16:40   ` [PATCH v2 3/3] eal: allow probing a device again Thomas Monjalon
2018-10-04  9:44     ` Doherty, Declan
2018-10-04 14:25       ` Thomas Monjalon
2018-10-07 22:09 ` [PATCH v3 0/3] eal: allow hotplug to skip an already probed device Thomas Monjalon
2018-10-07 22:09   ` [PATCH v3 1/3] drivers/bus: move driver assignment to end of probing Thomas Monjalon
2018-10-08  8:05     ` Andrew Rybchenko
2018-10-11 10:53     ` Andrew Rybchenko
2018-10-11 11:45       ` Thomas Monjalon
2018-10-11 11:54         ` Andrew Rybchenko
2018-10-11 12:59           ` Thomas Monjalon
2018-10-11 13:15             ` Andrew Rybchenko
2018-10-11 15:29               ` Thomas Monjalon
2018-10-11 15:41                 ` Andrew Rybchenko
2018-10-11 16:00                   ` Thomas Monjalon
2018-10-07 22:09   ` [PATCH v3 2/3] eal: add function to query device status Thomas Monjalon
2018-10-08  8:05     ` Andrew Rybchenko
2018-10-07 22:09   ` [PATCH v3 3/3] eal: allow probing a device again Thomas Monjalon
2018-10-08  8:05     ` Andrew Rybchenko
2018-10-11 21:02 ` [PATCH v4 0/4] eal: allow hotplug to skip an already probed device Thomas Monjalon
2018-10-11 21:02   ` [PATCH v4 1/4] ethdev: rename memzones allocated for DMA Thomas Monjalon
2018-10-12  7:53     ` Andrew Rybchenko
2018-10-12 16:40       ` Thomas Monjalon
2018-10-12 16:42         ` Andrew Rybchenko
2018-10-12 16:46           ` Andrew Rybchenko
2018-10-12 17:18             ` Thomas Monjalon
2018-10-12 17:21               ` Thomas Monjalon
2018-10-12 17:51                 ` Andrew Rybchenko
2018-10-11 21:02   ` [PATCH v4 2/4] drivers/bus: move driver assignment to end of probing Thomas Monjalon
2018-10-12  7:44     ` Andrew Rybchenko
2018-10-12  8:32       ` Jan Remeš
2018-10-12 10:45         ` Thomas Monjalon
2018-10-12 15:50       ` Thomas Monjalon
2018-10-11 21:02   ` [PATCH v4 3/4] eal: add function to query device status Thomas Monjalon
2018-10-11 21:02   ` [PATCH v4 4/4] eal: allow probing a device again Thomas Monjalon
2018-10-12  9:26   ` [PATCH v4 0/4] eal: allow hotplug to skip an already probed device Andrew Rybchenko
2018-10-14 20:47 ` [PATCH v5 0/7] " Thomas Monjalon
2018-10-14 20:47   ` [PATCH v5 1/7] net/mlx5: remove useless driver name comparison Thomas Monjalon
2018-10-14 20:49     ` Thomas Monjalon
2018-10-15  5:53       ` Shahaf Shuler
2018-10-14 20:47   ` [PATCH v5 2/7] ethdev: rename memzones allocated for DMA Thomas Monjalon
2018-10-14 20:47   ` [PATCH v5 3/7] cryptodev: remove driver name from logs Thomas Monjalon
2018-10-15  8:51     ` Thomas Monjalon [this message]
2018-10-14 20:47   ` [PATCH v5 4/7] compressdev: " Thomas Monjalon
2018-10-15  8:51     ` Thomas Monjalon
2018-10-14 20:47   ` [PATCH v5 5/7] drivers/bus: move driver assignment to end of probing Thomas Monjalon
2018-10-14 20:53     ` Thomas Monjalon
2018-10-15  6:11       ` Xu, Rosen
2018-10-14 20:47   ` [PATCH v5 6/7] eal: add function to query device status Thomas Monjalon
2018-10-14 20:47   ` [PATCH v5 7/7] eal: allow probing a device again Thomas Monjalon
2018-10-16 10:40     ` Shreyansh Jain
2018-10-17 11:37   ` [PATCH v5 0/7] allow hotplug to skip an already probed device Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1708821.o1i3cNID5q@xps \
    --to=thomas@monjalon.net \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=gaetan.rivet@6wind.com \
    --cc=ophirmu@mellanox.com \
    --cc=qi.z.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.