[dpdk-dev] Compiling DPDK with CentOS6

Message ID AM3PR04MB370A12BC7C6BD0231FF78C189870@AM3PR04MB370.eurprd04.prod.outlook.com (mailing list archive)
State Not Applicable, archived
Headers

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation fail apply issues

Commit Message

Shahar Salzman May 3, 2018, 2:20 p.m. UTC
  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@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@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@kaminario.com>


Thanks,

Shahar
  

Comments

Thomas Monjalon May 3, 2018, 3:56 p.m. UTC | #1
Hi

03/05/2018 16:20, Shahar Salzman:
> 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).

CentOS6 is really old.

> 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.

For such an old distribution, we cannot put expectations
on the latest releases of DPDK, unfortunately.
Is there a DPDK package for CentOS6?
If not, better to use old DPDK, or switch to a recent distribution.
  
Shahar Salzman May 7, 2018, 7:15 a.m. UTC | #2
OK, we are building dpdk from sources, used version 16.07, but would like to upgrade to a newer version in order to be inline with spdk master.

On the supported OS page RHEL6.5 is mentioned as supported (uses the 4.4.X gcc collection), is the page outdated?
  
Thomas Monjalon May 7, 2018, 1:43 p.m. UTC | #3
07/05/2018 09:15, Shahar Salzman:
> OK, we are building dpdk from sources, used version 16.07, but would like to upgrade to a newer version in order to be inline with spdk master.
> 
> On the supported OS page RHEL6.5 is mentioned as supported (uses the 4.4.X gcc collection), is the page outdated?

Yes, this page is outdated.
I removed this page last year:
	http://dpdk.org/commit/fc2ffae923d2b


> ________________________________
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Thursday, May 3, 2018 6:56:11 PM
> To: Shahar Salzman
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] Compiling DPDK with CentOS6
> 
> Hi
> 
> 03/05/2018 16:20, Shahar Salzman:
> > 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).
> 
> CentOS6 is really old.
> 
> > 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.
> 
> For such an old distribution, we cannot put expectations
> on the latest releases of DPDK, unfortunately.
> Is there a DPDK package for CentOS6?
> If not, better to use old DPDK, or switch to a recent distribution.
  

Patch

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