aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches/nicvf-0007-net-thunderx-disable-PMD-for-old-compilers.patch
blob: 61590496954985d94f5d11f2662ad0a84827baef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
From 0b9ce550c4f60a69da558da6044e1b394256b43c Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 6 Apr 2017 18:05:09 +0100
Subject: [PATCH] net/thunderx: disable PMD for old compilers

Disable for gcc < 4.7 and icc <= 14.0

PMD uses some compiler builtins and new compiler options. Tested with
gcc 4.5.1 and following were not supported:

option:
-Ofast

macros:
_Static_assert

__ORDER_LITTLE_ENDIAN__
__ORDER_BIG_ENDIAN__
__BYTE_ORDER__

__atomic_fetch_add
__ATOMIC_ACQUIRE
__atomic_load_n
__ATOMIC_RELAXED
__atomic_store_n
__ATOMIC_RELEASE

It is not easy to fix all in PMD, disabling PMD for older compilers.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/Makefile                     | 5 +++++
 mk/toolchain/gcc/rte.toolchain-compat.mk | 5 +++++
 mk/toolchain/icc/rte.toolchain-compat.mk | 5 +++++
 3 files changed, 15 insertions(+)

Origin: http://dpdk.org/browse/dpdk/commit/?id=0b9ce550c4f60a69da558da6044e1b394256b43c
Original-Author: Ferruh Yigit <ferruh.yigit@intel.com>
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659
Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Last-Update: 2017-05-18

--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -31,6 +31,11 @@
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
+# set in mk/toolchain/xxx/rte.toolchain-compat.mk
+ifeq ($(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD),d)
+        $(warning thunderx pmd is not supported by old compilers)
+endif
+
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += af_packet
 DIRS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += bnx2x
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += bonding
--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
@@ -89,4 +89,9 @@
 	ifeq ($(shell test $(GCC_VERSION) -lt 42 && echo 1), 1)
 		MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS))
 	endif
+
+	# Disable thunderx PMD for gcc < 4.7
+	ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
+		CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=d
+	endif
 endif
--- a/mk/toolchain/icc/rte.toolchain-compat.mk
+++ b/mk/toolchain/icc/rte.toolchain-compat.mk
@@ -72,4 +72,9 @@
 		# remove march options
 		MACHINE_CFLAGS := $(patsubst -march=%,-xSSE3,$(MACHINE_CFLAGS))
 	endif
+
+	# Disable thunderx PMD for icc <= 14.0
+	ifeq ($(shell test $(ICC_MAJOR_VERSION) -le 14 && echo 1), 1)
+		CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=d
+	endif
 endif