DPDK patches and discussions
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: "Doherty, Declan" <declan.doherty@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Doherty, Declan" <declan.doherty@intel.com>
Subject: Re: [dpdk-dev] [PATCH 1/3] cryptodev: add new APIs to assist PMD	initialisation
Date: Tue, 24 Oct 2017 11:03:06 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8976CC3A8EE@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <20171020212113.4543-2-declan.doherty@intel.com>

Hi Declan,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Declan Doherty
> Sent: Friday, October 20, 2017 10:21 PM
> To: dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>
> Subject: [dpdk-dev] [PATCH 1/3] cryptodev: add new APIs to assist PMD
> initialisation
> 
> Adds new PMD assist functions which are bus independent for driver to
> create and destroy new device instances.
> 
> Also includes function to parse parameters which can be passed to driver
> on device initialisation.
> 
> Signed-off-by: Declan Doherty <declan.doherty@intel.com>

...

> +struct rte_cryptodev *
> +rte_cryptodev_pmd_create(const char *name,
> +		struct rte_device *device,
> +		struct rte_cryptodev_pmd_init_params *params) {
> +	struct rte_cryptodev *cryptodev;
> +
> +	if (params->name[0] != '\0') {
> +		CDEV_LOG_INFO("[%s] User specified device name = %s\n",
> +				device->driver->name, params->name);
> +		name = params->name;
> +	}
> +
> +	CDEV_LOG_INFO("[%s] Creating cryptodev %s\n",
> +			device->driver->name, name);
> +
> +	CDEV_LOG_INFO("[%s] Initialisation parameters [ name: %s, "
> +			"private data size:  %zu, "
> +			"socket id: %d,"
> +			"max queue pairs: %u, "
> +			"max sessions: %u ]\n",
> +			device->driver->name, name, params-
> >private_data_size,
> +			params->socket_id, params->max_nb_queue_pairs,
> +			params->max_nb_sessions);

Testing this, I see the following:

CRYPTODEV: rte_cryptodev_pmd_create() line 140: [crypto_aesni_mb]
Creating cryptodev crypto_aesni_mb

CRYPTODEV: rte_cryptodev_pmd_create() line 149: [crypto_aesni_mb]
Initialisation parameters [ name: crypto_aesni_mb, private data size:  12,
socket id: 1,max queue pairs: 8, max sessions: 2048 ]

It looks too long to me. I would remove the first line (containing the line number),
and also the private data size in the initialization parameters,
as I think they are not giving any useful info for a user.

...

> diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h
...

> +/**
> + * @internal
> + *
> + * PMD assist function to provide boiler plate code for crypto driver
> +to
> + * destroy and free resources associated with a crypto PMD device
> instance.
> + *
> + * @param	name	crypto device name.
> + * @param	device	base device instance
> + * @param	params	PMD initialisation parameters
> + *
> + * @return
> + *  - crypto device instance on success
> + *  - NULL on creation failure
> + */
> +int
> +rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev);

Parameters and return value are wrong here.

  reply	other threads:[~2017-10-24 11:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-20 21:21 [dpdk-dev] [PATCH 0/3] Break dependency on bus infrastructure* Declan Doherty
2017-10-20 21:21 ` [dpdk-dev] [PATCH 1/3] cryptodev: add new APIs to assist PMD initialisation Declan Doherty
2017-10-24 11:03   ` De Lara Guarch, Pablo [this message]
2017-10-24 14:09   ` Tomasz Duszynski
2017-10-25  0:59     ` Gaëtan Rivet
2017-10-20 21:21 ` [dpdk-dev] [PATCH 2/3] cryptodev: break dependency on virtual device bus Declan Doherty
2017-10-24 11:18   ` De Lara Guarch, Pablo
2017-10-24 11:32   ` Akhil Goyal
2017-10-25  6:18   ` Tomasz Duszynski
2017-10-25  7:45     ` De Lara Guarch, Pablo
2017-10-20 21:21 ` [dpdk-dev] [PATCH 3/3] cryptodev: break dependency on rte_pci.h Declan Doherty
2017-10-24 11:23   ` De Lara Guarch, Pablo
2017-10-23  9:21 ` [dpdk-dev] [PATCH 0/3] Break dependency on bus infrastructure* Doherty, Declan
2017-10-25  0:50 ` Gaëtan Rivet
2017-10-25 12:00 ` [dpdk-dev] [PATCH v2 0/3] Break cryptodev dependency on bus infrastructure Declan Doherty
2017-10-25 12:00   ` [dpdk-dev] [PATCH v2 1/3] cryptodev: add new APIs to assist PMD initialisation Declan Doherty
2017-10-25 15:56     ` Trahe, Fiona
2017-10-25 12:00   ` [dpdk-dev] [PATCH v2 2/3] cryptodev: break dependency on virtual device bus Declan Doherty
2017-10-25 12:00   ` [dpdk-dev] [PATCH v2 3/3] cryptodev: break dependency on PCI " Declan Doherty
2017-10-25 15:55     ` Trahe, Fiona
2017-10-25 14:36   ` [dpdk-dev] [PATCH v2 0/3] Break cryptodev dependency on bus infrastructure De Lara Guarch, Pablo
2017-10-25 16:06   ` De Lara Guarch, Pablo

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=E115CCD9D858EF4F90C690B0DCB4D8976CC3A8EE@IRSMSX108.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).