> Due to complex ways of handling asymmetric cryptography algorithms,
> capabilities may differ between hardware and software PMDs,
> or even between hardware PMDs. One of the examples are algorithms that
> need an additional round of hashing, like SM2.
> 
> Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusz...@intel.com>
> ---
>  lib/cryptodev/rte_cryptodev.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
> index bec947f6d5..c0e816b17f 100644
> --- a/lib/cryptodev/rte_cryptodev.h
> +++ b/lib/cryptodev/rte_cryptodev.h
> @@ -554,6 +554,8 @@ rte_cryptodev_asym_get_xform_string(enum
> rte_crypto_asym_xform_type xform_enum);
>  /**< Support inner checksum computation/verification */
>  #define RTE_CRYPTODEV_FF_SECURITY_RX_INJECT          (1ULL << 28)
>  /**< Support Rx injection after security processing */
> +#define RTE_CRYPTODEV_FF_ASYM_PARTIAL_SM2            (1ULL << 29)
> +/**< Support the elliptic curve part only in SM2 */
> 
This would need an update in doc/guides/cryptodevs/features/default.ini as well.

However, it would be better to use the capability thing.
https://patches.dpdk.org/project/dpdk/patch/20241004181255.916-1-gmuthukri...@marvell.com/

This patch add SM2 op specific capability.
It would be better to add this partial SM2 in the enum rte_crypto_sm2_op_capa 
defined in the above patch.

Reply via email to