]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_cryptodev/rte_cryptodev.c
cryptodev: support security APIs
[dpdk.git] / lib / librte_cryptodev / rte_cryptodev.c
index 21da40ee8fe9cddaf19b89c1126815f027c3b171..80632117e088a0d9bd8b7c1b9fb068d2f06ac0b5 100644 (file)
@@ -488,6 +488,16 @@ rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
        return count;
 }
 
+void *
+rte_cryptodev_get_sec_ctx(uint8_t dev_id)
+{
+       if (rte_crypto_devices[dev_id].feature_flags &
+                       RTE_CRYPTODEV_FF_SECURITY)
+               return rte_crypto_devices[dev_id].security_ctx;
+
+       return NULL;
+}
+
 int
 rte_cryptodev_socket_id(uint8_t dev_id)
 {