typedef int (*security_session_update_t)(void *device,
struct rte_security_session *sess,
struct rte_security_session_conf *conf);
+
+/**
+ * Get the size of a security session
+ *
+ * @param device Crypto/eth device pointer
+ *
+ * @return
+ * - On success returns the size of the session structure for device
+ * - On failure returns 0
+ */
+typedef unsigned int (*security_session_get_size)(void *device);
+
/**
* Get stats from the PMD.
*
struct rte_security_session *sess, struct rte_mbuf *m,
void *params);
+/**
+ * Get application specific userdata associated with the security session which
+ * processed the packet. This would be retrieved using the metadata obtained
+ * from packet.
+ *
+ * @param device Crypto/eth device pointer
+ * @param md Metadata
+ * @param userdata Pointer to receive userdata
+ *
+ * @return
+ * - Returns 0 if userdata is retrieved successfully.
+ * - Returns -ve value for errors.
+ */
+typedef int (*security_get_userdata_t)(void *device,
+ uint64_t md, void **userdata);
+
/**
* Get security capabilities of the device.
*
/**< Configure a security session. */
security_session_update_t session_update;
/**< Update a security session. */
+ security_session_get_size session_get_size;
+ /**< Return size of security session. */
security_session_stats_get_t session_stats_get;
/**< Get security session statistics. */
security_session_destroy_t session_destroy;
/**< Clear a security sessions private data. */
security_set_pkt_metadata_t set_pkt_metadata;
/**< Update mbuf metadata. */
+ security_get_userdata_t get_userdata;
+ /**< Get userdata associated with session which processed the packet. */
security_capabilities_get_t capabilities_get;
/**< Get security capabilities. */
};