[dpdk-dev] Compiling DPDK with CentOS6

Shahar Salzman shahar.salzman at kaminario.com
Thu May 3 16:20:36 CEST 2018


Hi experts!


This is my first post on this list, apologize if I am posting in the wrong dpdk list, or if this is not relevant.

I am using spdk, hence dpdk. Following the termination of CentOS6 support, I did some work in order to get dpdk to work on CentOS6 (gcc version 4.4.7).

I had to remove some of the modules due to compilation errors, use -fno-strict-aliasing to avoid non issues dereferencing void* arrays and a single patch in the code which has to do with the way my gcc handles the attribure deprecated.


I did all my work on dpdk tag v18.02. Would you consider taking some of this to dpdk? It would be really helpful for us to maintain support for CentOS6 and its toolchain, at least in the near future, and we would like to use the latest dpdk stable.


Here are the modules I removed (obviously this is only a pointer to others):

shahar.salzman at shahars-vm:~/Kaminario/git/dpdk$ git show dpdk_v18.02~1 | grep "\=n"
@@ -370,7 +370,7 @@ CONFIG_RTE_LIBRTE_PMD_AF_PACKET=n
+CONFIG_RTE_LIBRTE_PMD_BOND=n
 CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB=n
 CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB_L1=n
@@ -441,7 +441,7 @@ CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=n
+CONFIG_RTE_LIBRTE_CRYPTODEV=n
 CONFIG_RTE_LIBRTE_CRYPTODEV_DEBUG=n
@@ -537,7 +537,7 @@ CONFIG_RTE_LIBRTE_PMD_MRVL_CRYPTO_DEBUG=n
+CONFIG_RTE_LIBRTE_SECURITY=n
@@ -556,12 +556,12 @@ CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV_DEBUG=n
+CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV=n
+CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=n
+CONFIG_RTE_LIBRTE_LPM=n
 CONFIG_RTE_LIBRTE_LPM_DEBUG=n
+CONFIG_RTE_LIBRTE_FLOW_CLASSIFY=n
@@ -755,13 +755,13 @@ CONFIG_RTE_PORT_PCAP=n
+CONFIG_RTE_LIBRTE_TABLE=n
 CONFIG_RTE_TABLE_STATS_COLLECT=n
+CONFIG_RTE_LIBRTE_PIPELINE=n
 CONFIG_RTE_PIPELINE_STATS_COLLECT=n
@@ -805,7 +805,7 @@ CONFIG_RTE_PROC_INFO=n
+CONFIG_RTE_TEST_PMD=n
 CONFIG_RTE_TEST_PMD_RECORD_CORE_CYCLES=n
 CONFIG_RTE_TEST_PMD_RECORD_BURST_STATS=n
+CONFIG_RTE_LIBRTE_PMD_TAP=n
+CONFIG_RTE_LIBRTE_AVP_PMD=n



Here is the patch which fixes the deprecated attribute support:


commit f218129f0584f8d94f61071ff5b759605f6cf52e
Author: shahar salzman <shahar.salzman at kaminario.com>
Date:   Tue Apr 24 10:45:34 2018 +0300

    RHEL 6.4 support - use previous 'deprecated' attibute API

    Signed-off-by: shahar salzman <shahar.salzman at kaminario.com>

diff --git a/lib/librte_compat/rte_compat.h b/lib/librte_compat/rte_compat.h
index 92ff28f..f355a1c 100644
--- a/lib/librte_compat/rte_compat.h
+++ b/lib/librte_compat/rte_compat.h
@@ -78,11 +78,15 @@

 #ifndef ALLOW_EXPERIMENTAL_API

+#if (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6, 4))
 #define __rte_experimental \
 __attribute__((deprecated("Symbol is not yet part of stable ABI"), \
 section(".text.experimental")))

 #else
+#define __rte_experimental  __attribute__((deprecated)) __attribute__((section(".text.experimental")))
+#endif
+#else

 #define __rte_experimental \
 __attribute__((section(".text.experimental")))
diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
index c7803e4..5941971 100644
--- a/lib/librte_eal/common/include/rte_common.h
+++ b/lib/librte_eal/common/include/rte_common.h
@@ -453,4 +453,12 @@ rte_exit(int exit_code, const char *format, ...)
 }
 #endif

+#ifndef RHEL_RELEASE_VERSION
+#define RHEL_RELEASE_VERSION(a,b) (((a) << 8) + (b))
+#endif
+
+#ifndef RHEL_RELEASE_CODE
+#define RHEL_RELEASE_CODE (0)
+#endif
+
 #endif

Thanks,

Shahar






More information about the dev mailing list