compress/octeontx: fix global variable multiple definitions
authorFerruh Yigit <ferruh.yigit@intel.com>
Thu, 5 Sep 2019 14:53:12 +0000 (15:53 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 25 Oct 2019 21:16:23 +0000 (23:16 +0200)
'octtx_zip_logtype_driver' global variable is defined in a header file
which was causing multiple definitions of the variable, fixed it by
moving it to the .c file.

Issue has been detected by '-fno-common' gcc flag.

Fixes: 43e610bb8565 ("compress/octeontx: introduce octeontx zip PMD")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ashish Gupta <ashishg@marvell.com>
drivers/compress/octeontx/otx_zip.h
drivers/compress/octeontx/otx_zip_pmd.c

index 3abefd1..e43f7f5 100644 (file)
@@ -17,7 +17,7 @@
 
 #include <zip_regs.h>
 
-int octtx_zip_logtype_driver;
+extern int octtx_zip_logtype_driver;
 
 /* ZIP VF Control/Status registers (CSRs): */
 /* VF_BAR0: */
index a1651b2..9e00c86 100644 (file)
@@ -11,6 +11,8 @@
 
 #include "otx_zip.h"
 
+int octtx_zip_logtype_driver;
+
 static const struct rte_compressdev_capabilities
                                octtx_zip_pmd_capabilities[] = {
        {       .algo = RTE_COMP_ALGO_DEFLATE,