The four crypto drivers: kasumi, mvsam, snow3g and zuc define logtype
variables in their header file. As the header files are included
in more than one compilation unit, it might cause appearance
of multiple instances of the variable and a linker error.
Such situation can occur, when no common section is allowed
by the compiler settings and tentative definitions are placed
in BSS section.
Fixes:
2cba3814932e ("crypto/kasumi: add dynamic logging")
Fixes:
a05a450f42fd ("crypto/mvsam: add dynamic logging")
Fixes:
f3af5f9d1325 ("crypto/zuc: add dynamic logging")
Fixes:
a3277ad47feb ("cryptodev: remove crypto device driver name")
Cc: stable@dpdk.org
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
/**< KASUMI PMD device name */
/** KASUMI PMD LOGTYPE DRIVER */
-int kasumi_logtype_driver;
+extern int kasumi_logtype_driver;
#define KASUMI_LOG(level, fmt, ...) \
rte_log(RTE_LOG_ ## level, kasumi_logtype_driver, \
#define KASUMI_MAX_BURST 4
#define BYTE_LEN 8
+int kasumi_logtype_driver;
static uint8_t cryptodev_driver_id;
/** Get xform chain order. */
/**< Marvell PMD device name */
/** MRVL PMD LOGTYPE DRIVER */
-int mrvl_logtype_driver;
+extern int mrvl_logtype_driver;
#define MRVL_LOG(level, fmt, ...) \
rte_log(RTE_LOG_ ## level, mrvl_logtype_driver, \
#define MRVL_PMD_MAX_NB_SESS_ARG ("max_nb_sessions")
#define MRVL_PMD_DEFAULT_MAX_NB_SESSIONS 2048
+int mrvl_logtype_driver;
static uint8_t cryptodev_driver_id;
struct mrvl_pmd_init_params {
#define SNOW3G_MAX_BURST 8
#define BYTE_LEN 8
+int snow3g_logtype_driver;
static uint8_t cryptodev_driver_id;
/** Get xform chain order. */
/**< SNOW 3G PMD device name */
/** SNOW 3G PMD LOGTYPE DRIVER */
-int snow3g_logtype_driver;
+extern int snow3g_logtype_driver;
#define SNOW3G_LOG(level, fmt, ...) \
rte_log(RTE_LOG_ ## level, snow3g_logtype_driver, \
#define ZUC_MAX_BURST 16
#define BYTE_LEN 8
+int zuc_logtype_driver;
static uint8_t cryptodev_driver_id;
/** Get xform chain order. */
#include <intel-ipsec-mb.h>
#define CRYPTODEV_NAME_ZUC_PMD crypto_zuc
-/**< KASUMI PMD device name */
+/**< ZUC PMD device name */
/** ZUC PMD LOGTYPE DRIVER */
-int zuc_logtype_driver;
+extern int zuc_logtype_driver;
#define ZUC_LOG(level, fmt, ...) \
rte_log(RTE_LOG_ ## level, zuc_logtype_driver, \
"%s()... line %u: " fmt "\n", __func__, __LINE__, \