* @param dev Crypto device pointer
* @param xform Single or chain of crypto xforms
* @param session Pointer to cryptodev's private session structure
- * @param mp Mempool where the private session is allocated
*
* @return
* - Returns 0 if private session structure have been created successfully.
*/
typedef int (*cryptodev_asym_configure_session_t)(struct rte_cryptodev *dev,
struct rte_crypto_asym_xform *xform,
- struct rte_cryptodev_asym_session *session,
- struct rte_mempool *mp);
+ struct rte_cryptodev_asym_session *session);
/**
* Free driver private session data.
*
typedef void (*cryptodev_sym_free_session_t)(struct rte_cryptodev *dev,
struct rte_cryptodev_sym_session *sess);
/**
- * Free asymmetric session private data.
+ * Clear asymmetric session private data.
*
* @param dev Crypto device pointer
* @param sess Cryptodev session structure
*/
-typedef void (*cryptodev_asym_free_session_t)(struct rte_cryptodev *dev,
+typedef void (*cryptodev_asym_clear_session_t)(struct rte_cryptodev *dev,
struct rte_cryptodev_asym_session *sess);
/**
* Perform actual crypto processing (encrypt/digest or auth/decrypt)
/**< Configure asymmetric Crypto session. */
cryptodev_sym_free_session_t sym_session_clear;
/**< Clear a Crypto sessions private data. */
- cryptodev_asym_free_session_t asym_session_clear;
+ cryptodev_asym_clear_session_t asym_session_clear;
/**< Clear a Crypto sessions private data. */
union {
cryptodev_sym_cpu_crypto_process_t sym_cpu_process;
sess->sess_data[driver_id].data = private_data;
}
-static inline void *
-get_asym_session_private_data(const struct rte_cryptodev_asym_session *sess,
- uint8_t driver_id) {
- return sess->sess_private_data[driver_id];
-}
-
-static inline void
-set_asym_session_private_data(struct rte_cryptodev_asym_session *sess,
- uint8_t driver_id, void *private_data)
-{
- sess->sess_private_data[driver_id] = private_data;
-}
+/**
+ * @internal
+ * Cryptodev asymmetric crypto session.
+ */
+RTE_STD_C11 struct rte_cryptodev_asym_session {
+ uint8_t driver_id;
+ /**< Session driver ID. */
+ uint16_t max_priv_data_sz;
+ /**< Size of private data used when creating mempool */
+ uint16_t user_data_sz;
+ /**< Session user data will be placed after sess_data */
+ uint8_t padding[3];
+ uint8_t sess_private_data[0];
+};
#endif /* _CRYPTODEV_PMD_H_ */