lib: work around unnamed structs/unions
[dpdk.git] / lib / librte_cryptodev / rte_cryptodev.h
index 7768f0a..cf28541 100644 (file)
@@ -48,18 +48,19 @@ extern "C" {
 #include "rte_kvargs.h"
 #include "rte_crypto.h"
 #include "rte_dev.h"
+#include <rte_common.h>
 
-#define CRYPTODEV_NAME_NULL_PMD                ("cryptodev_null_pmd")
+#define CRYPTODEV_NAME_NULL_PMD                cryptodev_null_pmd
 /**< Null crypto PMD device name */
-#define CRYPTODEV_NAME_AESNI_MB_PMD    ("cryptodev_aesni_mb_pmd")
+#define CRYPTODEV_NAME_AESNI_MB_PMD    cryptodev_aesni_mb_pmd
 /**< AES-NI Multi buffer PMD device name */
-#define CRYPTODEV_NAME_AESNI_GCM_PMD   ("cryptodev_aesni_gcm_pmd")
+#define CRYPTODEV_NAME_AESNI_GCM_PMD   cryptodev_aesni_gcm_pmd
 /**< AES-NI GCM PMD device name */
-#define CRYPTODEV_NAME_QAT_SYM_PMD     ("cryptodev_qat_sym_pmd")
+#define CRYPTODEV_NAME_QAT_SYM_PMD     cryptodev_qat_sym_pmd
 /**< Intel QAT Symmetric Crypto PMD device name */
-#define CRYPTODEV_NAME_SNOW3G_PMD      ("cryptodev_snow3g_pmd")
+#define CRYPTODEV_NAME_SNOW3G_PMD      cryptodev_snow3g_pmd
 /**< SNOW 3G PMD device name */
-#define CRYPTODEV_NAME_KASUMI_PMD      ("cryptodev_kasumi_pmd")
+#define CRYPTODEV_NAME_KASUMI_PMD      cryptodev_kasumi_pmd
 /**< KASUMI PMD device name */
 
 /** Crypto device type */
@@ -67,9 +68,9 @@ enum rte_cryptodev_type {
        RTE_CRYPTODEV_NULL_PMD = 1,     /**< Null crypto PMD */
        RTE_CRYPTODEV_AESNI_GCM_PMD,    /**< AES-NI GCM PMD */
        RTE_CRYPTODEV_AESNI_MB_PMD,     /**< AES-NI multi buffer PMD */
-       RTE_CRYPTODEV_KASUMI_PMD,       /**< KASUMI PMD */
        RTE_CRYPTODEV_QAT_SYM_PMD,      /**< QAT PMD Symmetric Crypto */
        RTE_CRYPTODEV_SNOW3G_PMD,       /**< SNOW 3G PMD */
+       RTE_CRYPTODEV_KASUMI_PMD,       /**< KASUMI PMD */
 };
 
 extern const char **rte_cyptodev_names;
@@ -104,6 +105,7 @@ extern const char **rte_cyptodev_names;
 struct rte_cryptodev_symmetric_capability {
        enum rte_crypto_sym_xform_type xform_type;
        /**< Transform type : Authentication / Cipher */
+       RTE_STD_C11
        union {
                struct {
                        enum rte_crypto_auth_algorithm algo;
@@ -177,6 +179,7 @@ struct rte_cryptodev_capabilities {
        enum rte_crypto_op_type op;
        /**< Operation type */
 
+       RTE_STD_C11
        union {
                struct rte_cryptodev_symmetric_capability sym;
                /**< Symmetric operation capability parameters */
@@ -619,6 +622,7 @@ struct rte_cryptodev {
        struct rte_cryptodev_cb_list link_intr_cbs;
        /**< User application callback for interrupts if present */
 
+       __extension__
        uint8_t attached : 1;
        /**< Flag indicating the device is attached */
 } __rte_cache_aligned;
@@ -642,6 +646,7 @@ struct rte_cryptodev_data {
        char name[RTE_CRYPTODEV_NAME_MAX_LEN];
        /**< Unique identifier name */
 
+       __extension__
        uint8_t dev_started : 1;
        /**< Device state: STARTED(1)/STOPPED(0) */
 
@@ -749,6 +754,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
 
 /** Cryptodev symmetric crypto session */
 struct rte_cryptodev_sym_session {
+       RTE_STD_C11
        struct {
                uint8_t dev_id;
                /**< Device Id */
@@ -759,7 +765,7 @@ struct rte_cryptodev_sym_session {
        } __rte_aligned(8);
        /**< Public symmetric session details */
 
-       char _private[0];
+       char _private[];
        /**< Private session material */
 };