[dpdk-dev] [PATCH v3 03/10] drivers/crypto: move aesni-mb PMD to IPsec-mb framework

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Mon Oct 11 13:09:49 CEST 2021



> -----Original Message-----
> From: Power, Ciara <ciara.power at intel.com>
> Sent: Wednesday, September 29, 2021 5:30 PM
> To: dev at dpdk.org
> Cc: Zhang, Roy Fan <roy.fan.zhang at intel.com>; Bronowski, PiotrX
> <piotrx.bronowski at intel.com>; gakhil at marvell.com; Power, Ciara
> <ciara.power at intel.com>; Thomas Monjalon <thomas at monjalon.net>; De Lara
> Guarch, Pablo <pablo.de.lara.guarch at intel.com>; Ray Kinsella
> <mdr at ashroe.eu>
> Subject: [PATCH v3 03/10] drivers/crypto: move aesni-mb PMD to IPsec-mb
> framework
> 
> From: Piotr Bronowski <piotrx.bronowski at intel.com>
> 
> This patch removes the crypto/aesni_mb folder and gathers all
> aesni-mb PMD implementation specific details into a single file,
> pmd_aesni_mb.c in crypto/ipsec_mb.
> 
> Now that intel-ipsec-mb v1.0 is the minimum supported version, old
> macros can be replaced with the newer macros supported by this version.
> 
> Signed-off-by: Piotr Bronowski <piotrx.bronowski at intel.com>
> Signed-off-by: Ciara Power <ciara.power at intel.com>
> 

...

>  deps += ['bus_vdev', 'net', 'security']
> diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c

...

> +			.xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,
> +			{.aead = {
> +				.algo =
> RTE_CRYPTO_AEAD_CHACHA20_POLY1305,
> +				.block_size = 64,
> +				.key_size = {
> +					.min = 32,
> +					.max = 32,
> +					.increment = 0
> +				},
> +				.digest_size = {
> +					.min = 16,
> +					.max = 16,
> +					.increment = 0
> +				},
> +				.aad_size = {
> +					.min = 0,
> +					.max = 240,

We support more than 240 bytes of AAD. I think we can support up to 1024 bytes.
Could you change it here?

> +					.increment = 1
> +				},
> +				.iv_size = {
> +					.min = 12,
> +					.max = 12,
> +					.increment = 0
> +				},
> +			}, }
> +		}, }
> +	},
> +	RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()

...

> +static int
> +aesni_mb_set_session_auth_parameters(const IMB_MGR *mb_mgr,
...

> +		case IMB_KEY_192_BYTES:
> +			IMB_AES192_GCM_PRE(mb_mgr, xform-
> >auth.key.data,
> +				&sess->cipher.gcm_key);
> +			sess->cipher.key_length_in_bytes =
> IMB_KEY_192_BYTES;
> +			break;
> +		case IMB_KEY_256_BYTES:
> +			IMB_AES256_GCM_PRE(mb_mgr, xform-
> >auth.key.data,
> +				&sess->cipher.gcm_key);
> +			sess->cipher.key_length_in_bytes =
> IMB_KEY_256_BYTES;
> +			break;
> +		default:
> +			RTE_LOG(ERR, PMD, "failed to parse test type\n");

Wrong error message. This should say something like "Wrong authentication key length".
Also, the same message is present for the cipher key length, for GCM.

Thanks,
Pablo


More information about the dev mailing list