Skip to content

Commit 2a440e9

Browse files
arekk67Akhil Goyal
authored andcommitted
cryptodev: reorder structures in asym crypto header
Asymmetric-crypto header has a simple structure that allows to keep logically separate blocks together. Therefore, xforms, ops, and generic structs may be appropriately ordered. This patch moves sm2-op structs to be placed along other algorithms-op structs. Signed-off-by: Arkadiusz Kusztal <[email protected]> Acked-by: Akhil Goyal <[email protected]>
1 parent a55675e commit 2a440e9

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

lib/cryptodev/rte_crypto_asym.h

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -642,40 +642,6 @@ struct rte_crypto_ecpm_op_param {
642642
/**< Scalar to multiply the input point */
643643
};
644644

645-
/**
646-
* Asymmetric crypto transform data
647-
*
648-
* Structure describing asym xforms.
649-
*/
650-
struct rte_crypto_asym_xform {
651-
struct rte_crypto_asym_xform *next;
652-
/**< Pointer to next xform to set up xform chain.*/
653-
enum rte_crypto_asym_xform_type xform_type;
654-
/**< Asymmetric crypto transform */
655-
656-
union {
657-
struct rte_crypto_rsa_xform rsa;
658-
/**< RSA xform parameters */
659-
660-
struct rte_crypto_modex_xform modex;
661-
/**< Modular Exponentiation xform parameters */
662-
663-
struct rte_crypto_modinv_xform modinv;
664-
/**< Modular Multiplicative Inverse xform parameters */
665-
666-
struct rte_crypto_dh_xform dh;
667-
/**< DH xform parameters */
668-
669-
struct rte_crypto_dsa_xform dsa;
670-
/**< DSA xform parameters */
671-
672-
struct rte_crypto_ec_xform ec;
673-
/**< EC xform parameters, used by elliptic curve based
674-
* operations.
675-
*/
676-
};
677-
};
678-
679645
/**
680646
* SM2 operation capabilities
681647
*/
@@ -750,6 +716,40 @@ struct rte_crypto_sm2_op_param {
750716
*/
751717
};
752718

719+
/**
720+
* Asymmetric crypto transform data
721+
*
722+
* Structure describing asym xforms.
723+
*/
724+
struct rte_crypto_asym_xform {
725+
struct rte_crypto_asym_xform *next;
726+
/**< Pointer to next xform to set up xform chain.*/
727+
enum rte_crypto_asym_xform_type xform_type;
728+
/**< Asymmetric crypto transform */
729+
730+
union {
731+
struct rte_crypto_rsa_xform rsa;
732+
/**< RSA xform parameters */
733+
734+
struct rte_crypto_modex_xform modex;
735+
/**< Modular Exponentiation xform parameters */
736+
737+
struct rte_crypto_modinv_xform modinv;
738+
/**< Modular Multiplicative Inverse xform parameters */
739+
740+
struct rte_crypto_dh_xform dh;
741+
/**< DH xform parameters */
742+
743+
struct rte_crypto_dsa_xform dsa;
744+
/**< DSA xform parameters */
745+
746+
struct rte_crypto_ec_xform ec;
747+
/**< EC xform parameters, used by elliptic curve based
748+
* operations.
749+
*/
750+
};
751+
};
752+
753753
/**
754754
* Asymmetric Cryptographic Operation.
755755
*

0 commit comments

Comments
 (0)