From 4d6194db01f51169181c0af6e6dc5fed042265ad Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Thu, 5 Sep 2019 15:53:12 +0100 Subject: [PATCH] compress/octeontx: fix global variable multiple definitions '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 Acked-by: Ashish Gupta --- drivers/compress/octeontx/otx_zip.h | 2 +- drivers/compress/octeontx/otx_zip_pmd.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/compress/octeontx/otx_zip.h b/drivers/compress/octeontx/otx_zip.h index 3abefd1dcd..e43f7f5c3e 100644 --- a/drivers/compress/octeontx/otx_zip.h +++ b/drivers/compress/octeontx/otx_zip.h @@ -17,7 +17,7 @@ #include -int octtx_zip_logtype_driver; +extern int octtx_zip_logtype_driver; /* ZIP VF Control/Status registers (CSRs): */ /* VF_BAR0: */ diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c index a1651b22eb..9e00c86630 100644 --- a/drivers/compress/octeontx/otx_zip_pmd.c +++ b/drivers/compress/octeontx/otx_zip_pmd.c @@ -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, -- 2.20.1