X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_cryptodev%2Frte_cryptodev.h;h=261a359dc02b0d12b0237867d2435208acc93322;hb=63f4bfd5328b02cbb9746df701672d3eeeeb0cfd;hp=a0d3a12abccc16f870ca79ec3c020064144a9793;hpb=eadb4fa1e1fe3382350082028e05e48541f8a17d;p=dpdk.git diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index a0d3a12abc..261a359dc0 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -49,6 +49,7 @@ extern "C" { #include "rte_crypto.h" #include "rte_dev.h" #include +#include extern const char **rte_cyptodev_names; @@ -110,7 +111,7 @@ extern const char **rte_cyptodev_names; * to calculate address from. */ #define rte_crypto_op_ctophys_offset(c, o) \ - (phys_addr_t)((c)->phys_addr + (o)) + (rte_iova_t)((c)->phys_addr + (o)) /** * Crypto parameters range description @@ -434,23 +435,6 @@ struct rte_cryptodev_stats { #define RTE_CRYPTODEV_NAME_MAX_LEN (64) /**< Max length of name of crypto PMD */ -/** - * @deprecated - * - * Create a virtual crypto device - * - * @param name Cryptodev PMD name of device to be created. - * @param args Options arguments for device. - * - * @return - * - On successful creation of the cryptodev the device index is returned, - * which will be between 0 and rte_cryptodev_count(). - * - In the case of a failure, returns -1. - */ -__rte_deprecated -extern int -rte_cryptodev_create_vdev(const char *name, const char *args); - /** * Get the device identifier for the named crypto device. * @@ -907,7 +891,10 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id, } -/** Cryptodev symmetric crypto session */ +/** Cryptodev symmetric crypto session + * Each session is derived from a fixed xform chain. Therefore each session + * has a fixed algo, key, op-type, digest_len etc. + */ struct rte_cryptodev_sym_session { __extension__ void *sess_private_data[0]; /**< Private session material */ @@ -1050,6 +1037,38 @@ int rte_cryptodev_driver_id_get(const char *name); */ const char *rte_cryptodev_driver_name_get(uint8_t driver_id); +/** + * Set private data for a session. + * + * @param sess Session pointer allocated by + * *rte_cryptodev_sym_session_create*. + * @param data Pointer to the private data. + * @param size Size of the private data. + * + * @return + * - On success, zero. + * - On failure, a negative value. + */ +int __rte_experimental +rte_cryptodev_sym_session_set_private_data( + struct rte_cryptodev_sym_session *sess, + void *data, + uint16_t size); + +/** + * Get private data of a session. + * + * @param sess Session pointer allocated by + * *rte_cryptodev_sym_session_create*. + * + * @return + * - On success return pointer to private data. + * - On failure returns NULL. + */ +void * __rte_experimental +rte_cryptodev_sym_session_get_private_data( + struct rte_cryptodev_sym_session *sess); + #ifdef __cplusplus } #endif