cryptodev: remove PMD type
[dpdk.git] / lib / librte_cryptodev / rte_cryptodev_pmd.h
index a16d109..9a9174f 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  *
- *   Copyright(c) 2015 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2015-2016 Intel Corporation. All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
  *   modification, are permitted provided that the following conditions
@@ -52,6 +52,7 @@ extern "C" {
 #include <rte_mbuf.h>
 #include <rte_mempool.h>
 #include <rte_log.h>
+#include <rte_common.h>
 
 #include "rte_crypto.h"
 #include "rte_cryptodev.h"
@@ -61,17 +62,18 @@ extern "C" {
 #define RTE_PMD_DEBUG_TRACE(...) \
        rte_pmd_debug_trace(__func__, __VA_ARGS__)
 #else
-#define RTE_PMD_DEBUG_TRACE(fmt, args...)
+#define RTE_PMD_DEBUG_TRACE(...)
 #endif
 
 struct rte_cryptodev_session {
+       RTE_STD_C11
        struct {
                uint8_t dev_id;
                enum rte_cryptodev_type type;
                struct rte_mempool *mp;
        } __rte_aligned(8);
 
-       char _private[0];
+       __extension__ char _private[0];
 };
 
 struct rte_cryptodev_driver;
@@ -358,7 +360,7 @@ typedef uint32_t (*cryptodev_queue_pair_count_t)(struct rte_cryptodev *dev);
  * - On success returns a pointer to a rte_mempool
  * - On failure returns a NULL pointer
  */
-typedef int (*cryptodev_create_session_pool_t)(
+typedef int (*cryptodev_sym_create_session_pool_t)(
                struct rte_cryptodev *dev, unsigned nb_objs,
                unsigned obj_cache_size, int socket_id);
 
@@ -372,7 +374,7 @@ typedef int (*cryptodev_create_session_pool_t)(
  *  - On success returns the size of the session structure for device
  *  - On failure returns 0
  */
-typedef unsigned (*cryptodev_get_session_private_size_t)(
+typedef unsigned (*cryptodev_sym_get_session_private_size_t)(
                struct rte_cryptodev *dev);
 
 /**
@@ -386,7 +388,7 @@ typedef unsigned (*cryptodev_get_session_private_size_t)(
  *  - Returns private session structure on success.
  *  - Returns NULL on failure.
  */
-typedef void (*cryptodev_initialize_session_t)(struct rte_mempool *mempool,
+typedef void (*cryptodev_sym_initialize_session_t)(struct rte_mempool *mempool,
                void *session_private);
 
 /**
@@ -400,14 +402,14 @@ typedef void (*cryptodev_initialize_session_t)(struct rte_mempool *mempool,
  *  - Returns private session structure on success.
  *  - Returns NULL on failure.
  */
-typedef void * (*cryptodev_configure_session_t)(struct rte_cryptodev *dev,
-               struct rte_crypto_xform *xform, void *session_private);
+typedef void * (*cryptodev_sym_configure_session_t)(struct rte_cryptodev *dev,
+               struct rte_crypto_sym_xform *xform, void *session_private);
 
 /**
  * Free Crypto session.
  * @param      session         Cryptodev session structure to free
  */
-typedef void (*cryptodev_free_session_t)(struct rte_cryptodev *dev,
+typedef void (*cryptodev_sym_free_session_t)(struct rte_cryptodev *dev,
                void *session_private);
 
 
@@ -436,13 +438,13 @@ struct rte_cryptodev_ops {
        cryptodev_queue_pair_count_t queue_pair_count;
        /**< Get count of the queue pairs. */
 
-       cryptodev_get_session_private_size_t session_get_size;
+       cryptodev_sym_get_session_private_size_t session_get_size;
        /**< Return private session. */
-       cryptodev_initialize_session_t session_initialize;
+       cryptodev_sym_initialize_session_t session_initialize;
        /**< Initialization function for private session data */
-       cryptodev_configure_session_t session_configure;
+       cryptodev_sym_configure_session_t session_configure;
        /**< Configure a Crypto session. */
-       cryptodev_free_session_t session_clear;
+       cryptodev_sym_free_session_t session_clear;
        /**< Clear a Crypto sessions private data. */
 };
 
@@ -454,13 +456,12 @@ struct rte_cryptodev_ops {
  * to that slot for the driver to use.
  *
  * @param      name            Unique identifier name for each device
- * @param      type            Device type of this Crypto device
  * @param      socket_id       Socket to allocate resources on.
  * @return
  *   - Slot in the rte_dev_devices array for a new device;
  */
 struct rte_cryptodev *
-rte_cryptodev_pmd_allocate(const char *name, enum pmd_type type, int socket_id);
+rte_cryptodev_pmd_allocate(const char *name, int socket_id);
 
 /**
  * Creates a new virtual crypto device and returns the pointer
@@ -503,7 +504,7 @@ rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
  *             device, by invoking the rte_eal_pci_register() function to
  *             register the *pci_drv* structure embedded in the *crypto_drv*
  *             structure, after having stored the address of the
- *             rte_cryptodev_init() function in the *devinit* field of the
+ *             rte_cryptodev_init() function in the *probe* field of the
  *             *pci_drv* structure.
  *
  *             During the PCI probing phase, the rte_cryptodev_init()