DPDK patches and discussions
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: Ravi Kumar <Ravi1.kumar@amd.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
	"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>
Subject: Re: [dpdk-dev] [PATCH 2/2] crypto/ccp: change to command line option from compile time
Date: Wed, 9 May 2018 08:34:52 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8976CD04BE2@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <1525327041-128382-2-git-send-email-Ravi1.kumar@amd.com>



> -----Original Message-----
> From: Ravi Kumar [mailto:Ravi1.kumar@amd.com]
> Sent: Thursday, May 3, 2018 6:57 AM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>;
> thomas@monjalon.net; hemant.agrawal@nxp.com
> Subject: [PATCH 2/2] crypto/ccp: change to command line option from compile
> time
> 
> CCP PMD supports authentication offload to either of CCP or CPU. The earlier
> version of patch provided this option as compile time. This patch changes this
> option from compile time to run time. User can pass "ccp_auth_opt=1" as an
> additional argument to vdev parameter to enable authentication operations on
> CPU.
> 
> Signed-off-by: Ravi Kumar <Ravi1.kumar@amd.com>

...

> +++ b/drivers/crypto/ccp/ccp_pmd_ops.c
> @@ -13,7 +13,6 @@
>  #include "ccp_crypto.h"
> 
>  static const struct rte_cryptodev_capabilities ccp_pmd_capabilities[] = { -#ifdef
> RTE_LIBRTE_PMD_CCP_CPU_AUTH
>  	{	/* MD5 HMAC */
>  		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
>  		{.sym = {
> @@ -35,7 +34,6 @@ static const struct rte_cryptodev_capabilities
> ccp_pmd_capabilities[] = {
>  			}, }
>  		}, }
>  	},
> -#endif

MD5 won't be supported unless the auth_opt is enabled.
I would suggest doing something similar to what QAT does.
You can have an array with the base capabilities and another one
for the extended ones (with MD5).
When "auth_opt" is enabled, you can have the combination of both.
When it is not, then you can just have the base capabilities.

>  	{	/* SHA1 */
>  		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
>  		{.sym = {

...

>  	RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n", name,
> -			init_params.socket_id);
> +		init_params.def_p.socket_id);
>  	RTE_LOG(INFO, PMD, "Max number of queue pairs = %d\n",
> -			init_params.max_nb_queue_pairs);
> +		init_params.def_p.max_nb_queue_pairs);
>  	RTE_LOG(INFO, PMD, "Max number of sessions = %d\n",
> -			init_params.max_nb_sessions);
> +		init_params.def_p.max_nb_sessions);
> +	RTE_LOG(INFO, PMD, "Authentication offload to %s\n",
> +		((init_params.auth_opt == 0) ? "CCP" : "CPU"));
> +	snprintf(die_num, 20, "die_num-%d", init_params.die_num);
> +	RTE_LOG(INFO, PMD, "Combining %s CCP devices\n",
> +		((init_params.die_num == -1) ? "all" : die_num));
> 
>  	rc = cryptodev_ccp_create(name, vdev, &init_params);
>  	if (rc)
> --
> 2.7.4

You are adding new parameters, so you should extend the parameters registration at the bottom of this file:

RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CCP_PMD,
        "max_nb_queue_pairs=<int> max_nb_sessions=<int> socket_id=<int>");

  reply	other threads:[~2018-05-09  8:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03  5:57 [dpdk-dev] [PATCH 1/2] crypto/ccp: enable CCP crypto poll mode driver by default Ravi Kumar
2018-05-03  5:57 ` [dpdk-dev] [PATCH 2/2] crypto/ccp: change to command line option from compile time Ravi Kumar
2018-05-09  8:34   ` De Lara Guarch, Pablo [this message]
2018-05-03  7:23 ` [dpdk-dev] [PATCH 1/2] crypto/ccp: enable CCP crypto poll mode driver by default De Lara Guarch, Pablo
2018-05-09  5:53   ` Kumar, Ravi1
2018-05-09  7:58     ` Thomas Monjalon
2018-05-09  8:11       ` Kumar, Ravi1
2018-05-09  8:19         ` Thomas Monjalon
2018-05-09  8:36         ` De Lara Guarch, Pablo
2018-05-09  8:58           ` Kumar, Ravi1
2018-05-09 12:46 ` [dpdk-dev] [PATCH v2] crypto/ccp: support command line option to enable CPU based auth Ravi Kumar
2018-05-09 15:27   ` De Lara Guarch, Pablo
2018-05-10  8:43     ` Kumar, Ravi1
2018-05-10  8:46       ` De Lara Guarch, Pablo
2018-05-10  9:20   ` [dpdk-dev] [PATCH v3] " Ravi Kumar
2018-05-10 12:22     ` De Lara Guarch, Pablo
2018-05-11  5:37       ` Kumar, Ravi1

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=E115CCD9D858EF4F90C690B0DCB4D8976CD04BE2@IRSMSX108.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=Ravi1.kumar@amd.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=thomas@monjalon.net \
    /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).