X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Flibrte_cryptodev%2Frte_crypto_sym.h;h=d9bd8210c61abaca399ba7ca58650ea0a80ed499;hb=9013c56c640bca63085bfa3bfe8a07c55fa9633a;hp=4461fc3d0bafc1091cbf84da3fba7d59017582b9;hpb=c0f87eb5252b745d29644bb6f405a7560eb67864;p=dpdk.git diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h index 4461fc3d0b..d9bd8210c6 100644 --- a/lib/librte_cryptodev/rte_crypto_sym.h +++ b/lib/librte_cryptodev/rte_crypto_sym.h @@ -101,8 +101,10 @@ enum rte_crypto_cipher_algorithm { RTE_CRYPTO_CIPHER_SNOW3G_UEA2, /**< SNOW3G algorithm in UEA2 mode */ - RTE_CRYPTO_CIPHER_ZUC_EEA3 + RTE_CRYPTO_CIPHER_ZUC_EEA3, /**< ZUC algorithm in EEA3 mode */ + + RTE_CRYPTO_CIPHER_LIST_END }; /** Symmetric Cipher Direction */ @@ -234,6 +236,8 @@ enum rte_crypto_auth_algorithm { RTE_CRYPTO_AUTH_ZUC_EIA3, /**< ZUC algorithm in EIA3 mode */ + + RTE_CRYPTO_AUTH_LIST_END }; /** Symmetric Authentication / Hash Operations */ @@ -365,7 +369,7 @@ struct rte_crypto_sym_op { struct rte_mbuf *m_src; /**< source mbuf */ struct rte_mbuf *m_dst; /**< destination mbuf */ - enum rte_crypto_sym_op_sess_type type; + enum rte_crypto_sym_op_sess_type sess_type; union { struct rte_cryptodev_sym_session *session; @@ -382,6 +386,11 @@ struct rte_crypto_sym_op { * buffer. The result of the cipher operation will be * written back into the output buffer starting at * this location. + * + * @note + * For Snow3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2 + * and KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * this field should be in bits. */ uint32_t length; @@ -402,6 +411,11 @@ struct rte_crypto_sym_op { * @note * For AES-GMAC @ref RTE_CRYPTO_AUTH_AES_GMAC, this * field should be set to 0. + * + * @note + * For Snow3G @ RTE_CRYPTO_AUTH_SNOW3G_UEA2 + * and KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * this field should be in bits. */ } data; /**< Data offsets and length for ciphering */ @@ -470,6 +484,11 @@ struct rte_crypto_sym_op { * @note For AES-GMAC (@ref RTE_CRYPTO_AUTH_AES_GMAC) * mode of operation, this field specifies the start * of the AAD data in the source buffer. + * + * @note + * For Snow3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2 + * and KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * this field should be in bits. */ uint32_t length; @@ -485,6 +504,11 @@ struct rte_crypto_sym_op { * For AES-GMAC @ref RTE_CRYPTO_AUTH_AES_GMAC mode * of operation, this field specifies the length of * the AAD data in the source buffer. + * + * @note + * For Snow3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2 + * and KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * this field should be in bits. */ } data; /**< Data offsets and length for authentication */ @@ -587,7 +611,7 @@ __rte_crypto_sym_op_reset(struct rte_crypto_sym_op *op) { memset(op, 0, sizeof(*op)); - op->type = RTE_CRYPTO_SYM_OP_SESSIONLESS; + op->sess_type = RTE_CRYPTO_SYM_OP_SESSIONLESS; } @@ -629,7 +653,7 @@ __rte_crypto_sym_op_attach_sym_session(struct rte_crypto_sym_op *sym_op, struct rte_cryptodev_sym_session *sess) { sym_op->session = sess; - sym_op->type = RTE_CRYPTO_SYM_OP_WITH_SESSION; + sym_op->sess_type = RTE_CRYPTO_SYM_OP_WITH_SESSION; return 0; }