lib: use C99 syntax for zero-size arrays
[dpdk.git] / lib / librte_cryptodev / rte_cryptodev_pmd.h
index d5fbe44..42e7b79 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
@@ -56,11 +56,6 @@ extern "C" {
 #include "rte_crypto.h"
 #include "rte_cryptodev.h"
 
-struct rte_cryptodev_stats;
-struct rte_cryptodev_info;
-struct rte_cryptodev_qp_conf;
-
-enum rte_cryptodev_event_type;
 
 #ifdef RTE_LIBRTE_CRYPTODEV_DEBUG
 #define RTE_PMD_DEBUG_TRACE(...) \
@@ -76,11 +71,10 @@ struct rte_cryptodev_session {
                struct rte_mempool *mp;
        } __rte_aligned(8);
 
-       char _private[];
+       __extension__ char _private[0];
 };
 
 struct rte_cryptodev_driver;
-struct rte_cryptodev;
 
 /**
  * Initialisation function of a crypto driver invoked for each matching
@@ -364,7 +358,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);
 
@@ -378,7 +372,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);
 
 /**
@@ -392,7 +386,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);
 
 /**
@@ -406,14 +400,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);
 
 
@@ -427,9 +421,9 @@ struct rte_cryptodev_ops {
        cryptodev_info_get_t dev_infos_get;     /**< Get device info. */
 
        cryptodev_stats_get_t stats_get;
-       /**< Get generic device statistics. */
+       /**< Get device statistics. */
        cryptodev_stats_reset_t stats_reset;
-       /**< Reset generic device statistics. */
+       /**< Reset device statistics. */
 
        cryptodev_queue_pair_setup_t queue_pair_setup;
        /**< Set up a device queue pair. */
@@ -442,13 +436,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. */
 };