DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Roy Fan" <roy.fan.zhang@intel.com>
To: Matan Azrad <matan@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "akhil.goyal@nxp.com" <akhil.goyal@nxp.com>,
	"Doherty, Declan" <declan.doherty@intel.com>,
	Somalapuram Amaranath <asomalap@amd.com>,
	"Ruifeng Wang" <ruifeng.wang@arm.com>,
	Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Anoob Joseph <anoobj@marvell.com>,
	"Griffin, John" <john.griffin@intel.com>,
	"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
	Michael Shamis <michaelsh@marvell.com>,
	Nagadheeraj Rottela <rnagadheeraj@marvell.com>,
	Ankur Dwivedi <adwivedi@marvell.com>,
	Gagandeep Singh <g.singh@nxp.com>,
	"Jay Zhou" <jianjay.zhou@huawei.com>
Subject: Re: [dpdk-dev] [PATCH] cryptodev: support multiple cipher block sizes
Date: Fri, 5 Feb 2021 16:50:10 +0000	[thread overview]
Message-ID: <BL0PR11MB3043D86F15D15D8170549385B8B29@BL0PR11MB3043.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1612449252-395208-1-git-send-email-matan@nvidia.com>

Hi Matan,

It is a good idea to be able to show the varied block sizes of each PMD/algo.

> -----Original Message-----
> From: Matan Azrad <matan@nvidia.com>
> Sent: Thursday, February 4, 2021 2:34 PM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Doherty, Declan <declan.doherty@intel.com>;
> Somalapuram Amaranath <asomalap@amd.com>; Ruifeng Wang
> <ruifeng.wang@arm.com>; Ajit Khaparde <ajit.khaparde@broadcom.com>;
> Anoob Joseph <anoobj@marvell.com>; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; Griffin, John <john.griffin@intel.com>; De Lara
> Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Michael Shamis
> <michaelsh@marvell.com>; Nagadheeraj Rottela
> <rnagadheeraj@marvell.com>; Ankur Dwivedi <adwivedi@marvell.com>;
> Gagandeep Singh <g.singh@nxp.com>; Jay Zhou <jianjay.zhou@huawei.com>
> Subject: [PATCH] cryptodev: support multiple cipher block sizes

[SNIP] 

> +#define RTE_CRYPTO_CIPHER_BSF_ALL 0x1
> +/* All the sizes from the algorithm standard */
> +#define RTE_CRYPTO_CIPHER_BSF_512_BYTES 0x2
> +#define RTE_CRYPTO_CIPHER_BSF_520_BYTES 0x4
> +#define RTE_CRYPTO_CIPHER_BSF_4048_BYTES 0x8
> +#define RTE_CRYPTO_CIPHER_BSF_4096_BYTES 0x10
> +#define RTE_CRYPTO_CIPHER_BSF_4160_BYTES 0x20
> +#define RTE_CRYPTO_CIPHER_BSF_1M_BYTES 0x40
> +
> +/**
>   * Symmetric Crypto Capability
>   */
>  struct rte_cryptodev_symmetric_capability {
> @@ -122,11 +135,19 @@ struct rte_cryptodev_symmetric_capability {
>  			enum rte_crypto_cipher_algorithm algo;
>  			/**< cipher algorithm */
>  			uint16_t block_size;
> -			/**< algorithm block size */
> +			/**<
> +			 * algorithm block size
> +			 * For algorithms support more than single block size,
> +			 * this is the default block size supported by the
> +			 * driver, all the supported sizes are reflected in the
> +			 * bsf field.
> +			 */
>  			struct rte_crypto_param_range key_size;
>  			/**< cipher key size range */
>  			struct rte_crypto_param_range iv_size;
>  			/**< Initialisation vector data size range */
> +			uint32_t bsf;
> +			/**< Block size flags */

The doubt I have is limited block sizes 32-bit bsf can represents. Although it is good enough now for AES-XTS but it already used 1/4 of all available representation of the different block sizes. If we are to include more block sizes for different algorithms we really don't have much room left.
Also bsf seems to be a duplication to existing block_size. 

There should be a better way to describe varied block sizes in capability.

>  		} cipher;
>  		/**< Symmetric Cipher transform capabilities */
>  		struct {
> --
> 1.8.3.1

Regards,
Fan

  reply	other threads:[~2021-02-05 16:50 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 14:34 Matan Azrad
2021-02-05 16:50 ` Zhang, Roy Fan [this message]
2021-02-08 12:10 ` Kusztal, ArkadiuszX
2021-02-08 13:36   ` Matan Azrad
2021-02-08 15:28     ` Kusztal, ArkadiuszX
2021-02-08 18:23       ` Matan Azrad
2021-02-26  7:50         ` Kusztal, ArkadiuszX
2021-02-26  5:01 ` [dpdk-dev] [EXT] " Anoob Joseph
2021-03-01  7:55   ` Matan Azrad
2021-03-01  9:29     ` Kusztal, ArkadiuszX
2021-03-14 12:18 ` [dpdk-dev] [PATCH] cryptodev: support multiple cipher data-units Matan Azrad
2021-04-04 15:17   ` [dpdk-dev] [PATCH v2] " Matan Azrad
     [not found]   ` <20210404150809.2154241-1-matan@nvidia.com>
2021-04-13 12:02     ` [dpdk-dev] [EXT] " Akhil Goyal
2021-04-13 16:39       ` Thomas Monjalon
2021-04-13 18:19 ` [dpdk-dev] [PATCH v3] " Thomas Monjalon
2021-04-13 19:48   ` Matan Azrad
2021-04-13 20:42 ` [dpdk-dev] [PATCH v4] " Thomas Monjalon
2021-04-14 18:37   ` [dpdk-dev] [EXT] " Akhil Goyal
2021-04-14 19:38     ` Thomas Monjalon
2021-04-14 19:43       ` Akhil Goyal
2021-04-14 20:17         ` Thomas Monjalon
2021-04-14 20:15 ` [dpdk-dev] [PATCH] doc: announce extension of crypto data-unit length Thomas Monjalon
2021-05-17 19:41   ` [dpdk-dev] [EXT] " Akhil Goyal
2021-07-31 17:10     ` Thomas Monjalon
2021-07-31 18:58   ` [dpdk-dev] " Ajit Khaparde
2021-08-02 11:10   ` Matan Azrad
2021-08-02 12:04   ` Thomas Monjalon
2021-04-14 20:21 ` [dpdk-dev] [PATCH v5] cryptodev: support multiple cipher data-units Thomas Monjalon
2021-04-15  8:35   ` [dpdk-dev] [EXT] " Akhil Goyal
2021-04-15 19:01     ` Akhil Goyal
2021-04-15 19:31       ` David Marchand

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=BL0PR11MB3043D86F15D15D8170549385B8B29@BL0PR11MB3043.namprd11.prod.outlook.com \
    --to=roy.fan.zhang@intel.com \
    --cc=adwivedi@marvell.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=akhil.goyal@nxp.com \
    --cc=anoobj@marvell.com \
    --cc=asomalap@amd.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=g.singh@nxp.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=john.griffin@intel.com \
    --cc=matan@nvidia.com \
    --cc=michaelsh@marvell.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=rnagadheeraj@marvell.com \
    --cc=ruifeng.wang@arm.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 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).