[v5,02/10] cryptodev: replace zero length array with flex array
Checks
Commit Message
Zero length arrays are GNU extension. Replace with
standard flex array.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
drivers/crypto/cnxk/cnxk_se.h | 5 ++++-
lib/cryptodev/cryptodev_pmd.h | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
@@ -29,8 +29,11 @@ enum cpt_dp_thread_type {
CPT_DP_THREAD_TYPE_PT,
};
+#define SYM_SESS_SIZE sizeof(struct rte_cryptodev_sym_session)
+
struct cnxk_se_sess {
- struct rte_cryptodev_sym_session rte_sess;
+ uint8_t rte_sess[SYM_SESS_SIZE];
+
uint8_t aes_gcm : 1;
uint8_t aes_ccm : 1;
uint8_t aes_ctr : 1;
@@ -153,7 +153,7 @@ struct rte_cryptodev_sym_session {
RTE_MARKER cacheline1 __rte_cache_min_aligned;
/**< Second cache line - start of the driver session data */
- uint8_t driver_priv_data[0];
+ uint8_t driver_priv_data[];
/**< Driver specific session data, variable size */
};