summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/recipes-graphics/xorg-driver/xorg-driver-common.inc33
-rw-r--r--common/recipes-graphics/xorg-driver/xorg-driver-video.inc4
-rw-r--r--common/recipes-kernel/linux/linux-yocto_4.1.bbappend6
-rw-r--r--common/recipes-multimedia/libva/libva-intel-driver/Use-VMask-instead-of-DMask-in-3DSTATE_PS-on-GEN8.patch54
-rw-r--r--common/recipes-multimedia/libva/libva-intel-driver_1.5.0.bb4
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-and-2.0.0-ixgbe-fix-a-build-warning-being-treated-as-error.patch49
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-kni-fix-build-with-kernel-3.19.patch69
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-mk-rework-gcc-version-detection-to-permit-versions-n.patch155
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-build-with-kernel-4.0.patch58
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-igb-build-with-kernel-4.1.patch70
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-vhost-build-with-kernel-4.1.patch69
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-vhost-build-with-kernels-3.19-and-4.0.patch141
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-net-fix-build-with-kernel-4.1.patch54
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk_1.8.0.bb9
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk_2.0.0.bb6
15 files changed, 739 insertions, 42 deletions
diff --git a/common/recipes-graphics/xorg-driver/xorg-driver-common.inc b/common/recipes-graphics/xorg-driver/xorg-driver-common.inc
deleted file mode 100644
index 1ed2742d..00000000
--- a/common/recipes-graphics/xorg-driver/xorg-driver-common.inc
+++ /dev/null
@@ -1,33 +0,0 @@
1DESCRIPTION = "X driver"
2HOMEPAGE = "http://www.x.org"
3BUGTRACKER = "https://bugs.freedesktop.org"
4SECTION = "x11/drivers"
5LICENSE = "MIT-X"
6
7PE = "2"
8INC_PR = "r0"
9
10DEPENDS = "virtual/xserver xproto randrproto util-macros"
11
12SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}.tar.bz2"
13
14S = "${WORKDIR}/${BPN}-${PV}"
15
16FILES_${PN} += " ${libdir}/xorg/modules/drivers/*.so"
17FILES_${PN}-dbg += " ${libdir}/xorg/modules/drivers/.debug"
18
19inherit autotools pkgconfig
20
21# AC_CHECK_FILE doesn't work when cross compiling, so we create a replacement
22# macro that simply assumes the test succeeds.
23do_configure_prepend () {
24 echo 'AC_DEFUN(CC_AC_CHECK_FILE, $2)' > configure.ac.new
25 sed 's/AC_CHECK_FILE/CC_AC_CHECK_FILE/g' configure.ac >> configure.ac.new
26 mv configure.ac.new configure.ac
27}
28
29# FIXME: We don't want to include the libtool archives (*.la) from modules
30# directory, as they serve no useful purpose. Upstream should fix Makefile.am
31do_install_append() {
32 find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f --
33}
diff --git a/common/recipes-graphics/xorg-driver/xorg-driver-video.inc b/common/recipes-graphics/xorg-driver/xorg-driver-video.inc
deleted file mode 100644
index 57c80d10..00000000
--- a/common/recipes-graphics/xorg-driver/xorg-driver-video.inc
+++ /dev/null
@@ -1,4 +0,0 @@
1include xorg-driver-common.inc
2
3DEPENDS =+ "renderproto videoproto xextproto fontsproto"
4
diff --git a/common/recipes-kernel/linux/linux-yocto_4.1.bbappend b/common/recipes-kernel/linux/linux-yocto_4.1.bbappend
index 0c384745..6c3d784e 100644
--- a/common/recipes-kernel/linux/linux-yocto_4.1.bbappend
+++ b/common/recipes-kernel/linux/linux-yocto_4.1.bbappend
@@ -7,7 +7,7 @@ COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}"
7KMACHINE_core2-32-intel-common = "intel-core2-32" 7KMACHINE_core2-32-intel-common = "intel-core2-32"
8KBRANCH_core2-32-intel-common = "standard/base" 8KBRANCH_core2-32-intel-common = "standard/base"
9SRCREV_meta_core2-32-intel-common ?= "3d8f1378d07dbc052ca8a7c22297339ad7998b5e" 9SRCREV_meta_core2-32-intel-common ?= "3d8f1378d07dbc052ca8a7c22297339ad7998b5e"
10SRCREV_machine_core2-32-intel-common ?= "52a4a9f4a2b408ef3a0745372e44cc362832d86d" 10SRCREV_machine_core2-32-intel-common ?= "dbe692d91c8e55d1430f2c45fd578c8e4e71e482"
11KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" 11KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}"
12 12
13LINUX_VERSION_corei7-64-intel-common = "4.1.8" 13LINUX_VERSION_corei7-64-intel-common = "4.1.8"
@@ -15,7 +15,7 @@ COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}"
15KMACHINE_corei7-64-intel-common = "intel-corei7-64" 15KMACHINE_corei7-64-intel-common = "intel-corei7-64"
16KBRANCH_corei7-64-intel-common = "standard/base" 16KBRANCH_corei7-64-intel-common = "standard/base"
17SRCREV_meta_corei7-64-intel-common ?= "3d8f1378d07dbc052ca8a7c22297339ad7998b5e" 17SRCREV_meta_corei7-64-intel-common ?= "3d8f1378d07dbc052ca8a7c22297339ad7998b5e"
18SRCREV_machine_corei7-64-intel-common ?= "52a4a9f4a2b408ef3a0745372e44cc362832d86d" 18SRCREV_machine_corei7-64-intel-common ?= "dbe692d91c8e55d1430f2c45fd578c8e4e71e482"
19KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" 19KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}"
20 20
21# Quark / X1000 BSP Info 21# Quark / X1000 BSP Info
@@ -24,7 +24,7 @@ COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}"
24KMACHINE_i586-nlp-32-intel-common = "intel-quark" 24KMACHINE_i586-nlp-32-intel-common = "intel-quark"
25KBRANCH_i586-nlp-32-intel-common = "standard/base" 25KBRANCH_i586-nlp-32-intel-common = "standard/base"
26SRCREV_meta_i586-nlp-32-intel-common ?= "3d8f1378d07dbc052ca8a7c22297339ad7998b5e" 26SRCREV_meta_i586-nlp-32-intel-common ?= "3d8f1378d07dbc052ca8a7c22297339ad7998b5e"
27SRCREV_machine_i586-nlp-32-intel-common ?= "52a4a9f4a2b408ef3a0745372e44cc362832d86d" 27SRCREV_machine_i586-nlp-32-intel-common ?= "dbe692d91c8e55d1430f2c45fd578c8e4e71e482"
28KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" 28KERNEL_FEATURES_append_i586-nlp-32-intel-common = ""
29 29
30 30
diff --git a/common/recipes-multimedia/libva/libva-intel-driver/Use-VMask-instead-of-DMask-in-3DSTATE_PS-on-GEN8.patch b/common/recipes-multimedia/libva/libva-intel-driver/Use-VMask-instead-of-DMask-in-3DSTATE_PS-on-GEN8.patch
new file mode 100644
index 00000000..aa98a200
--- /dev/null
+++ b/common/recipes-multimedia/libva/libva-intel-driver/Use-VMask-instead-of-DMask-in-3DSTATE_PS-on-GEN8.patch
@@ -0,0 +1,54 @@
1Upstream-Status: Backport (from git://anongit.freedesktop.org/vaapi/intel-driver with commit id 4307780b648245aba4ff338dcfe0172dec2e12e9)
2Signed-off-by: Azril Ahmad <mohd.azril.ahmad@intel.com>
3
4
5From dff0614a65693bdfbcf8a46ccfb52f036647bb93 Mon Sep 17 00:00:00 2001
6From: "Xiang, Haihao" <haihao.xiang@intel.com>
7Date: Tue, 27 Jan 2015 11:09:02 +0800
8Subject: [PATCH 06/10] Use VMask instead of DMask in 3DSTATE_PS on GEN8+
9
10Mesa uses VMask instead of DMask in 3DSTATE_PS.
11 "Initialize the execution mask with VMask. Otherwise, derivatives are
12 incorrect for subspans where some of the pixels are unlit. We believe
13 the bit just didn't take effect in previous generations."
14
15To avoid potential issue, use VMask in libva too.
16
17Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
18Reviewed-by: Sean V Kelley <sean.v.kelley@intel.com>
19---
20 src/gen8_render.c | 3 ++-
21 src/gen9_render.c | 3 ++-
22 2 files changed, 4 insertions(+), 2 deletions(-)
23
24diff --git a/src/gen8_render.c b/src/gen8_render.c
25index 8a8012d..65a66c5 100644
26--- a/src/gen8_render.c
27+++ b/src/gen8_render.c
28@@ -1447,7 +1447,8 @@ gen8_emit_wm_state(VADriverContextP ctx, int kernel)
29 /* DW3. PS shader flag .Binding table cnt/sample cnt */
30 OUT_BATCH(batch,
31 (1 << GEN7_PS_SAMPLER_COUNT_SHIFT) |
32- (5 << GEN7_PS_BINDING_TABLE_ENTRY_COUNT_SHIFT));
33+ (5 << GEN7_PS_BINDING_TABLE_ENTRY_COUNT_SHIFT) |
34+ GEN7_PS_VECTOR_MASK_ENABLE);
35 /* DW4-5. Scatch space */
36 OUT_BATCH(batch, 0); /* scratch space base offset */
37 OUT_BATCH(batch, 0);
38diff --git a/src/gen9_render.c b/src/gen9_render.c
39index da8950e..89935f2 100644
40--- a/src/gen9_render.c
41+++ b/src/gen9_render.c
42@@ -1449,7 +1449,8 @@ gen9_emit_wm_state(VADriverContextP ctx, int kernel)
43 /* DW3. PS shader flag .Binding table cnt/sample cnt */
44 OUT_BATCH(batch,
45 (1 << GEN7_PS_SAMPLER_COUNT_SHIFT) |
46- (5 << GEN7_PS_BINDING_TABLE_ENTRY_COUNT_SHIFT));
47+ (5 << GEN7_PS_BINDING_TABLE_ENTRY_COUNT_SHIFT) |
48+ GEN7_PS_VECTOR_MASK_ENABLE);
49 /* DW4-5. Scatch space */
50 OUT_BATCH(batch, 0); /* scratch space base offset */
51 OUT_BATCH(batch, 0);
52--
532.1.0
54
diff --git a/common/recipes-multimedia/libva/libva-intel-driver_1.5.0.bb b/common/recipes-multimedia/libva/libva-intel-driver_1.5.0.bb
index ba09c2c6..dfb1ec1a 100644
--- a/common/recipes-multimedia/libva/libva-intel-driver_1.5.0.bb
+++ b/common/recipes-multimedia/libva/libva-intel-driver_1.5.0.bb
@@ -14,7 +14,9 @@ COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
14DEPENDS = "libva libdrm" 14DEPENDS = "libva libdrm"
15 15
16SRC_URI = "http://www.freedesktop.org/software/vaapi/releases/${BPN}/${BPN}-${PV}.tar.bz2" 16SRC_URI = "http://www.freedesktop.org/software/vaapi/releases/${BPN}/${BPN}-${PV}.tar.bz2"
17SRC_URI += "file://wayland-include.patch" 17SRC_URI += "file://wayland-include.patch \
18 file://Use-VMask-instead-of-DMask-in-3DSTATE_PS-on-GEN8.patch \
19 "
18 20
19SRC_URI[md5sum] = "16752f1584398265072129553b7907ce" 21SRC_URI[md5sum] = "16752f1584398265072129553b7907ce"
20SRC_URI[sha256sum] = "d0b448193ab34b622cd14e4db8ca29991a4038b4eb459a8fbbcbd7db843da3dc" 22SRC_URI[sha256sum] = "d0b448193ab34b622cd14e4db8ca29991a4038b4eb459a8fbbcbd7db843da3dc"
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-and-2.0.0-ixgbe-fix-a-build-warning-being-treated-as-error.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-and-2.0.0-ixgbe-fix-a-build-warning-being-treated-as-error.patch
new file mode 100644
index 00000000..fef9108d
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-and-2.0.0-ixgbe-fix-a-build-warning-being-treated-as-error.patch
@@ -0,0 +1,49 @@
1From a635f49a5873a104c8867bd1f6375d7a5064be5e Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anujx.mittal@intel.com>
3Date: Thu, 8 Oct 2015 22:46:13 +0800
4Subject: [PATCH] ixgbe: fix a build warning being treated as error
5
6Upstream-Status: Inappropriate [other]
7
8The change is part of a feature commit upstream (e0ba4e77605ab500518247cb6fab98dd3d87ba97)
9that we don't want to backport.
10
11Initialize the data byte to avoid warnings like:
12
13 lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c: In function 'ixgbe_read_i2c_combined_generic':
14 lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c:2101:9: error: 'low_bits' may be used
15 uninitialized in this function [-Werror=maybe-uninitialized]
16 *data |= bit << i;
17 ^
18 dpdk/2.0.0-r0/dpdk-2.0.0/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c:120:5: note:
19 'low_bits' was declared here
20 u8 low_bits;
21 ^
22 lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c:2101:9: error: 'high_bits' may be used
23 uninitialized in this function [-Werror=maybe-uninitialized]
24 *data |= bit << i;
25 ^
26 lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c:119:5: note: 'high_bits' was declared here
27 u8 high_bits;
28
29Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
30---
31 lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 2 +-
32 1 file changed, 1 insertion(+), 1 deletion(-)
33
34diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c
35index 2305448..ec34753 100644
36--- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c
37+++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c
38@@ -2095,7 +2095,7 @@ STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data)
39 bool bit = 0;
40
41 DEBUGFUNC("ixgbe_clock_in_i2c_byte");
42-
43+ *data = 0;
44 for (i = 7; i >= 0; i--) {
45 ixgbe_clock_in_i2c_bit(hw, &bit);
46 *data |= bit << i;
47--
481.7.9.5
49
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-kni-fix-build-with-kernel-3.19.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-kni-fix-build-with-kernel-3.19.patch
new file mode 100644
index 00000000..014fc63b
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-kni-fix-build-with-kernel-3.19.patch
@@ -0,0 +1,69 @@
1From 4e6326ae5375d55966a5c872f391cf99de373057 Mon Sep 17 00:00:00 2001
2From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
3Date: Sun, 22 Mar 2015 18:02:16 +0000
4Subject: [PATCH] kni: fix build with kernel 3.19
5
6Upstream-Status: Backport [2.1.0]
7
8Due to API changes in functions ndo_dflt_bridge_getlink
9(commit 2c3c031c) and ndo_fdb_add (commit f6f6424b)
10in kernel 3.19, DPDK would not build.
11
12This patch solves the problem, by checking the kernel version
13and adding the necessary new parameters.
14
15Mind that function igb_ndo_fdb_add does not need the extra parameter
16if USE_CONST_DEV_UC_CHAR is not set, since that macro is only defined
17when kernel is greater or equal than 3.7
18
19Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
20Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
21(cherry picked from commit 98f255ed0a4a73bf785e884dc2069405de840546)
22Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
23---
24 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 7 +++++++
25 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 4 ++++
26 2 files changed, 11 insertions(+)
27
28diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
29index a802a02..24b147d 100644
30--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
31+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
32@@ -2103,6 +2103,9 @@ static int igb_set_features(struct net_device *netdev,
33 static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
34 struct net_device *dev,
35 const unsigned char *addr,
36+#ifdef HAVE_NDO_FDB_ADD_VID
37+ u16 vid,
38+#endif
39 u16 flags)
40 #else
41 static int igb_ndo_fdb_add(struct ndmsg *ndm,
42@@ -2259,7 +2262,11 @@ static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
43 else
44 mode = BRIDGE_MODE_VEPA;
45
46+#ifdef HAVE_NDO_FDB_ADD_VID
47+ return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0);
48+#else
49 return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode);
50+#endif /* HAVE_NDO_FDB_ADD_VID */
51 }
52 #endif /* HAVE_BRIDGE_ATTRIBS */
53 #endif /* NTF_SELF */
54diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
55index 1213cc6..2e7e714 100644
56--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
57+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
58@@ -3881,4 +3881,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
59 #define HAVE_VF_MIN_MAX_TXRATE 1
60 #endif /* >= 3.16.0 */
61
62+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) )
63+#define HAVE_NDO_FDB_ADD_VID
64+#endif /* >= 3.19.0 */
65+
66 #endif /* _KCOMPAT_H_ */
67--
681.9.1
69
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-mk-rework-gcc-version-detection-to-permit-versions-n.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-mk-rework-gcc-version-detection-to-permit-versions-n.patch
new file mode 100644
index 00000000..9bd0b66b
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-mk-rework-gcc-version-detection-to-permit-versions-n.patch
@@ -0,0 +1,155 @@
1From ccb0f3b60c1ec84a97698d9699a4b7e5cf074b21 Mon Sep 17 00:00:00 2001
2From: Panu Matilainen <pmatilai@redhat.com>
3Date: Mon, 23 Feb 2015 16:53:56 +0200
4Subject: [PATCH] mk: rework gcc version detection to permit versions newer
5 than 4.x
6
7Upstream-Status: Backport [2.1.0]
8
9Separately comparing major and minor versions becomes seriously clumsy
10when with major version changes, convert the entire version string into
11a numeric value (ie 4.6.0 becomes 460 and 5.0.0 becomes 500) and use
12that for comparisons, eliminate unnecessary negations while at it.
13This makes the comparisons simpler, more obvious and makes gcc 5.0
14naturally recognized at least as capable as newest 4.x.
15
16This three-digit scheme would run into trouble if gcc ever went to
17two-digit version segments, but that hasn't happened in the last 10+
18years so it seems like a safe assumption.
19
20Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
21Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
22(cherry picked from commit 71f0ab1849b4fc3ca928deb566df12ca725ed150)
23Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
24
25Conflicts:
26 lib/librte_pmd_fm10k/Makefile
27Makefile part of fm10k feature enabled as part of
28commit a6061d9e7075b5457a9234117d75a2c05227457d which we ae not
29backporting. Makefile changes not taken.
30---
31 lib/librte_pmd_i40e/Makefile | 2 +-
32 lib/librte_pmd_ixgbe/Makefile | 6 +++---
33 lib/librte_pmd_vmxnet3/Makefile | 2 +-
34 mk/toolchain/gcc/rte.toolchain-compat.mk | 22 ++++++++++------------
35 4 files changed, 15 insertions(+), 17 deletions(-)
36
37diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile
38index 98e4bdf..61c3675 100644
39--- a/lib/librte_pmd_i40e/Makefile
40+++ b/lib/librte_pmd_i40e/Makefile
41@@ -65,7 +65,7 @@ CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast
42 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
43 CFLAGS_BASE_DRIVER += -Wno-format-security
44
45-ifeq ($(shell test $(GCC_MAJOR_VERSION) -ge 4 -a $(GCC_MINOR_VERSION) -ge 4 && echo 1), 1)
46+ifeq ($(shell test $(GCC_VERSION) -ge 440 && echo 1), 1)
47 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
48 endif
49
50diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile
51index 3588047..592fe74 100644
52--- a/lib/librte_pmd_ixgbe/Makefile
53+++ b/lib/librte_pmd_ixgbe/Makefile
54@@ -56,18 +56,18 @@ else
55 #
56 # CFLAGS for gcc
57 #
58-ifneq ($(shell test $(GCC_MAJOR_VERSION) -le 4 -a $(GCC_MINOR_VERSION) -le 3 && echo 1), 1)
59+ifeq ($(shell test $(GCC_VERSION) -ge 440 && echo 1), 1)
60 CFLAGS += -Wno-deprecated
61 endif
62 CFLAGS_BASE_DRIVER = -Wno-unused-parameter -Wno-unused-value
63 CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args
64
65-ifeq ($(shell test $(GCC_MAJOR_VERSION) -ge 4 -a $(GCC_MINOR_VERSION) -ge 6 && echo 1), 1)
66+ifeq ($(shell test $(GCC_VERSION) -ge 460 && echo 1), 1)
67 CFLAGS_ixgbe_common.o += -Wno-unused-but-set-variable
68 CFLAGS_ixgbe_x550.o += -Wno-unused-but-set-variable -Wno-maybe-uninitialized
69 endif
70
71-ifeq ($(shell test $(GCC_MAJOR_VERSION) -le 4 -a $(GCC_MINOR_VERSION) -le 6 && echo 1), 1)
72+ifeq ($(shell test $(GCC_VERSION) -le 460 && echo 1), 1)
73 CFLAGS_ixgbe_x550.o += -Wno-uninitialized
74 CFLAGS_ixgbe_phy.o += -Wno-uninitialized
75 endif
76diff --git a/lib/librte_pmd_vmxnet3/Makefile b/lib/librte_pmd_vmxnet3/Makefile
77index 6872c74..3b7674e 100644
78--- a/lib/librte_pmd_vmxnet3/Makefile
79+++ b/lib/librte_pmd_vmxnet3/Makefile
80@@ -56,7 +56,7 @@ else
81 #
82 # CFLAGS for gcc
83 #
84-ifneq ($(shell test $(GCC_MAJOR_VERSION) -le 4 -a $(GCC_MINOR_VERSION) -le 3 && echo 1), 1)
85+ifeq ($(shell test $(GCC_VERSION) -ge 440 && echo 1), 1)
86 CFLAGS += -Wno-deprecated
87 endif
88 CFLAGS_BASE_DRIVER = -Wno-unused-parameter -Wno-unused-value
89diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
90index e40e103..a867559 100644
91--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
92+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
93@@ -38,17 +38,15 @@
94
95 #find out GCC version
96
97-GCC_MAJOR_VERSION = $(shell $(CC) -dumpversion | cut -f1 -d.)
98+GCC_VERSION = $(subst .,,$(shell $(CC) -dumpversion))
99
100-# if GCC is not 4.x
101-ifneq ($(GCC_MAJOR_VERSION),4)
102+# if GCC is older than 4.x
103+ifeq ($(shell test $(GCC_VERSION) -lt 400 && echo 1), 1)
104 MACHINE_CFLAGS =
105-$(warning You are not using GCC 4.x. This is neither supported, nor tested.)
106+$(warning You are using GCC < 4.x. This is neither supported, nor tested.)
107
108
109 else
110- GCC_MINOR_VERSION = $(shell $(CC) -dumpversion | cut -f2 -d.)
111-
112 # GCC graceful degradation
113 # GCC 4.2.x - added support for generic target
114 # GCC 4.3.x - added support for core2, ssse3, sse4.1, sse4.2
115@@ -57,18 +55,18 @@ else
116 # GCC 4.6.x - added support for corei7, corei7-avx
117 # GCC 4.7.x - added support for fsgsbase, rdrnd, f16c, core-avx-i, core-avx2
118
119- ifeq ($(shell test $(GCC_MINOR_VERSION) -le 7 && echo 1), 1)
120+ ifeq ($(shell test $(GCC_VERSION) -le 470 && echo 1), 1)
121 MACHINE_CFLAGS := $(patsubst -march=core-avx-i,-march=corei7-avx,$(MACHINE_CFLAGS))
122 MACHINE_CFLAGS := $(patsubst -march=core-avx2,-march=core-avx2,$(MACHINE_CFLAGS))
123 endif
124- ifeq ($(shell test $(GCC_MINOR_VERSION) -lt 6 && echo 1), 1)
125+ ifeq ($(shell test $(GCC_VERSION) -lt 460 && echo 1), 1)
126 MACHINE_CFLAGS := $(patsubst -march=corei7-avx,-march=core2 -maes -mpclmul -mavx,$(MACHINE_CFLAGS))
127 MACHINE_CFLAGS := $(patsubst -march=corei7,-march=core2 -maes -mpclmul,$(MACHINE_CFLAGS))
128 endif
129- ifeq ($(shell test $(GCC_MINOR_VERSION) -lt 5 && echo 1), 1)
130+ ifeq ($(shell test $(GCC_VERSION) -lt 450 && echo 1), 1)
131 MACHINE_CFLAGS := $(patsubst -march=atom,-march=core2 -mssse3,$(MACHINE_CFLAGS))
132 endif
133- ifeq ($(shell test $(GCC_MINOR_VERSION) -lt 4 && echo 1), 1)
134+ ifeq ($(shell test $(GCC_VERSION) -lt 440 && echo 1), 1)
135 MACHINE_CFLAGS := $(filter-out -mavx -mpclmul -maes,$(MACHINE_CFLAGS))
136 ifneq ($(findstring SSE4_2, $(CPUFLAGS)),)
137 MACHINE_CFLAGS += -msse4.2
138@@ -77,12 +75,12 @@ else
139 MACHINE_CFLAGS += -msse4.1
140 endif
141 endif
142- ifeq ($(shell test $(GCC_MINOR_VERSION) -lt 3 && echo 1), 1)
143+ ifeq ($(shell test $(GCC_VERSION) -lt 430 && echo 1), 1)
144 MACHINE_CFLAGS := $(filter-out -msse% -mssse%,$(MACHINE_CFLAGS))
145 MACHINE_CFLAGS := $(patsubst -march=core2,-march=generic,$(MACHINE_CFLAGS))
146 MACHINE_CFLAGS += -msse3
147 endif
148- ifeq ($(shell test $(GCC_MINOR_VERSION) -lt 2 && echo 1), 1)
149+ ifeq ($(shell test $(GCC_VERSION) -lt 420 && echo 1), 1)
150 MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS))
151 endif
152 endif
153--
1541.9.1
155
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-build-with-kernel-4.0.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-build-with-kernel-4.0.patch
new file mode 100644
index 00000000..625f0146
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-build-with-kernel-4.0.patch
@@ -0,0 +1,58 @@
1From 54117da1c945c046c6e3959db81511c78f876426 Mon Sep 17 00:00:00 2001
2From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
3Date: Tue, 28 Apr 2015 18:37:42 +0100
4Subject: [PATCH] kni: fix build with kernel 4.0
5
6Upstream-Status: Backport [2.1.0]
7
8Due to API changes in function pointer ndo_bridge_setlink
9(commit ad41faa8) and the rename of functions vlan_tx_*
10(commit df8a39de) in kernel 4.0, DPDK would not build.
11
12This patch adds the properly checks to fix the compilation.
13
14Reported-by: Stephen Hemminger <stephen@networkplumber.org>
15Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
16Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
17---
18 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 6 ++++++
19 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 6 ++++++
20 2 files changed, 12 insertions(+)
21
22diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
23index 24b147d..bc3c6a3 100644
24--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
25+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
26@@ -2198,8 +2198,14 @@ static int igb_ndo_fdb_dump(struct sk_buff *skb,
27 #endif /* USE_DEFAULT_FDB_DEL_DUMP */
28
29 #ifdef HAVE_BRIDGE_ATTRIBS
30+#ifdef HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS
31+static int igb_ndo_bridge_setlink(struct net_device *dev,
32+ struct nlmsghdr *nlh,
33+ u16 flags)
34+#else
35 static int igb_ndo_bridge_setlink(struct net_device *dev,
36 struct nlmsghdr *nlh)
37+#endif /* HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS */
38 {
39 struct igb_adapter *adapter = netdev_priv(dev);
40 struct e1000_hw *hw = &adapter->hw;
41diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
42index 2e7e714..54d1f86 100644
43--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
44+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
45@@ -3885,4 +3885,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
46 #define HAVE_NDO_FDB_ADD_VID
47 #endif /* >= 3.19.0 */
48
49+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) )
50+/* vlan_tx_xx functions got renamed to skb_vlan */
51+#define vlan_tx_tag_get skb_vlan_tag_get
52+#define vlan_tx_tag_present skb_vlan_tag_present
53+#define HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS
54+#endif /* 4.0.0 */
55 #endif /* _KCOMPAT_H_ */
56--
571.7.9.5
58
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-igb-build-with-kernel-4.1.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-igb-build-with-kernel-4.1.patch
new file mode 100644
index 00000000..b76f501e
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-igb-build-with-kernel-4.1.patch
@@ -0,0 +1,70 @@
1From 97ebf687c7a635ac6f1b1e22293ed7405668c66e Mon Sep 17 00:00:00 2001
2From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
3Date: Fri, 26 Jun 2015 17:14:35 -0500
4Subject: [PATCH] kni: fix igb build with kernel 4.1
5
6Upstream-Status: Backport [2.1.0]
7
8ndo_bridge_getlink has changed in kernel release 4.1. It
9adds new parameter which breaks compilation.
10
11This patch add the properly checks to fix it.
12
13Linux: 46c264daaaa5 ("bridge/nl: remove wrong use of NLM_F_MULTI")
14
15Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
16Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
17Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
18---
19 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 10 ++++++++++
20 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 5 +++++
21 2 files changed, 15 insertions(+)
22
23diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
24index bc3c6a3..b99b365 100644
25--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
26+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
27@@ -2250,8 +2250,14 @@ static int igb_ndo_bridge_setlink(struct net_device *dev,
28 }
29
30 #ifdef HAVE_BRIDGE_FILTER
31+#ifdef HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK
32+static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
33+ struct net_device *dev, u32 filter_mask,
34+ int nlflags)
35+#else
36 static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
37 struct net_device *dev, u32 filter_mask)
38+#endif /* HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK */
39 #else
40 static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
41 struct net_device *dev)
42@@ -2269,7 +2275,11 @@ static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
43 mode = BRIDGE_MODE_VEPA;
44
45 #ifdef HAVE_NDO_FDB_ADD_VID
46+#ifdef HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK
47+ return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0, nlflags);
48+#else
49 return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0);
50+#endif /* HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK */
51 #else
52 return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode);
53 #endif /* HAVE_NDO_FDB_ADD_VID */
54diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
55index 54d1f86..2673281 100644
56--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
57+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
58@@ -3891,4 +3891,9 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
59 #define vlan_tx_tag_present skb_vlan_tag_present
60 #define HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS
61 #endif /* 4.0.0 */
62+
63+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) )
64+/* ndo_bridge_getlink adds new nlflags parameter */
65+#define HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK
66+#endif /* >= 4.1.0 */
67 #endif /* _KCOMPAT_H_ */
68--
691.7.9.5
70
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-vhost-build-with-kernel-4.1.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-vhost-build-with-kernel-4.1.patch
new file mode 100644
index 00000000..1fcf12b4
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-vhost-build-with-kernel-4.1.patch
@@ -0,0 +1,69 @@
1From 289840d86ddaec3310ee1d6a85fe6f20384de615 Mon Sep 17 00:00:00 2001
2From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
3Date: Fri, 26 Jun 2015 17:14:37 -0500
4Subject: [PATCH 2/2] kni: fix vhost build with kernel 4.1
5
6Upstream-Status: Backport [2.1.0]
7
8Parameters from sendmsg and recvmsg has been changed in 4.1 kernel.
9The function pointers belong to proto_ops structure were updated removing
10the struct kiocb parameter.
11
12Linux: 1b784140474e ("net: Remove iocb argument from sendmsg and recvmsg")
13
14Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
15Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
16(cherry picked from commit 8d8fb8aa5836e719d5fb896693b16afabd5118b9)
17Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
18---
19 lib/librte_eal/linuxapp/kni/compat.h | 4 ++++
20 lib/librte_eal/linuxapp/kni/kni_vhost.c | 10 ++++++++++
21 2 files changed, 14 insertions(+)
22
23diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
24index 1ad22ba..cf100b6 100644
25--- a/lib/librte_eal/linuxapp/kni/compat.h
26+++ b/lib/librte_eal/linuxapp/kni/compat.h
27@@ -23,3 +23,7 @@
28 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
29 #define HAVE_IOV_ITER_MSGHDR
30 #endif
31+
32+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
33+#define HAVE_KIOCB_MSG_PARAM
34+#endif /* < 4.1.0 */
35diff --git a/lib/librte_eal/linuxapp/kni/kni_vhost.c b/lib/librte_eal/linuxapp/kni/kni_vhost.c
36index 83d3351..4611ff4 100644
37--- a/lib/librte_eal/linuxapp/kni/kni_vhost.c
38+++ b/lib/librte_eal/linuxapp/kni/kni_vhost.c
39@@ -353,8 +353,13 @@ except:
40 }
41
42 static int
43+#ifdef HAVE_KIOCB_MSG_PARAM
44 kni_sock_sndmsg(struct kiocb *iocb, struct socket *sock,
45 struct msghdr *m, size_t total_len)
46+#else
47+kni_sock_sndmsg(struct socket *sock,
48+ struct msghdr *m, size_t total_len)
49+#endif /* HAVE_KIOCB_MSG_PARAM */
50 {
51 struct kni_vhost_queue *q =
52 container_of(sock->sk, struct kni_vhost_queue, sk);
53@@ -387,8 +392,13 @@ kni_sock_sndmsg(struct kiocb *iocb, struct socket *sock,
54 }
55
56 static int
57+#ifdef HAVE_KIOCB_MSG_PARAM
58 kni_sock_rcvmsg(struct kiocb *iocb, struct socket *sock,
59 struct msghdr *m, size_t len, int flags)
60+#else
61+kni_sock_rcvmsg(struct socket *sock,
62+ struct msghdr *m, size_t len, int flags)
63+#endif /* HAVE_KIOCB_MSG_PARAM */
64 {
65 int vnet_hdr_len = 0;
66 int pkt_len = 0;
67--
681.9.1
69
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-vhost-build-with-kernels-3.19-and-4.0.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-vhost-build-with-kernels-3.19-and-4.0.patch
new file mode 100644
index 00000000..a083fb1e
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-fix-vhost-build-with-kernels-3.19-and-4.0.patch
@@ -0,0 +1,141 @@
1From d4903f024ede0e54cc5e025e2cb54309b1164d22 Mon Sep 17 00:00:00 2001
2From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
3Date: Tue, 5 May 2015 15:08:00 +0100
4Subject: [PATCH 1/2] kni: fix vhost build with kernels 3.19 and 4.0
5
6Upstream-Status: Backport [2.1.0]
7
8Due to commit c0371da6 in kernel 3.19, which removed msg_iov
9and msg_iovlen from struct msghdr, DPDK would not build.
10Also, functions memcpy_toiovecend and memcpy_fromiovecend
11were removed in commits ba7438ae and 57dd8a07, being substituted by
12copy_from_iter and copy_to_iter.
13
14This patch makes use of struct iov_iter, which has references
15to msg_iov and msg_iovln, and makes use of copy_from_iter
16and copy_to_iter.
17
18Reported-by: Thomas Monjalon <thomas.monjalon@6wind.com>
19Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
20(cherry picked from commit 45e63ba8db314f75b8c969f3f952dee87f209129)
21Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
22---
23 lib/librte_eal/linuxapp/kni/compat.h | 4 ++++
24 lib/librte_eal/linuxapp/kni/kni_vhost.c | 37 ++++++++++++++++++++++++++-------
25 2 files changed, 33 insertions(+), 8 deletions(-)
26
27diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
28index 1313523..1ad22ba 100644
29--- a/lib/librte_eal/linuxapp/kni/compat.h
30+++ b/lib/librte_eal/linuxapp/kni/compat.h
31@@ -19,3 +19,7 @@
32 #define sk_sleep(s) (s)->sk_sleep
33
34 #endif /* < 2.6.35 */
35+
36+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
37+#define HAVE_IOV_ITER_MSGHDR
38+#endif
39diff --git a/lib/librte_eal/linuxapp/kni/kni_vhost.c b/lib/librte_eal/linuxapp/kni/kni_vhost.c
40index 7141f83..83d3351 100644
41--- a/lib/librte_eal/linuxapp/kni/kni_vhost.c
42+++ b/lib/librte_eal/linuxapp/kni/kni_vhost.c
43@@ -76,7 +76,7 @@ static struct proto kni_raw_proto = {
44 };
45
46 static inline int
47-kni_vhost_net_tx(struct kni_dev *kni, struct iovec *iov,
48+kni_vhost_net_tx(struct kni_dev *kni, struct msghdr *m,
49 unsigned offset, unsigned len)
50 {
51 struct rte_kni_mbuf *pkt_kva = NULL;
52@@ -84,7 +84,11 @@ kni_vhost_net_tx(struct kni_dev *kni, struct iovec *iov,
53 int ret;
54
55 KNI_DBG_TX("tx offset=%d, len=%d, iovlen=%d\n",
56- offset, len, (int)iov->iov_len);
57+#ifdef HAVE_IOV_ITER_MSGHDR
58+ offset, len, (int)m->msg_iter.iov->iov_len);
59+#else
60+ offset, len, (int)m->msg_iov->iov_len);
61+#endif
62
63 /**
64 * Check if it has at least one free entry in tx_q and
65@@ -108,7 +112,12 @@ kni_vhost_net_tx(struct kni_dev *kni, struct iovec *iov,
66 data_kva = pkt_kva->buf_addr + pkt_kva->data_off
67 - kni->mbuf_va + kni->mbuf_kva;
68
69- memcpy_fromiovecend(data_kva, iov, offset, len);
70+#ifdef HAVE_IOV_ITER_MSGHDR
71+ copy_from_iter(data_kva, len, &m->msg_iter);
72+#else
73+ memcpy_fromiovecend(data_kva, m->msg_iov, offset, len);
74+#endif
75+
76 if (unlikely(len < ETH_ZLEN)) {
77 memset(data_kva + len, 0, ETH_ZLEN - len);
78 len = ETH_ZLEN;
79@@ -143,7 +152,7 @@ drop:
80 }
81
82 static inline int
83-kni_vhost_net_rx(struct kni_dev *kni, struct iovec *iov,
84+kni_vhost_net_rx(struct kni_dev *kni, struct msghdr *m,
85 unsigned offset, unsigned len)
86 {
87 uint32_t pkt_len;
88@@ -177,10 +186,18 @@ kni_vhost_net_rx(struct kni_dev *kni, struct iovec *iov,
89 goto drop;
90
91 KNI_DBG_RX("rx offset=%d, len=%d, pkt_len=%d, iovlen=%d\n",
92- offset, len, pkt_len, (int)iov->iov_len);
93+#ifdef HAVE_IOV_ITER_MSGHDR
94+ offset, len, pkt_len, (int)m->msg_iter.iov->iov_len);
95+#else
96+ offset, len, pkt_len, (int)m->msg_iov->iov_len);
97+#endif
98
99 data_kva = kva->buf_addr + kva->data_off - kni->mbuf_va + kni->mbuf_kva;
100- if (unlikely(memcpy_toiovecend(iov, data_kva, offset, pkt_len)))
101+#ifdef HAVE_IOV_ITER_MSGHDR
102+ if (unlikely(copy_to_iter(data_kva, pkt_len, &m->msg_iter)))
103+#else
104+ if (unlikely(memcpy_toiovecend(m->msg_iov, data_kva, offset, pkt_len)))
105+#endif
106 goto drop;
107
108 /* Update statistics */
109@@ -348,7 +365,11 @@ kni_sock_sndmsg(struct kiocb *iocb, struct socket *sock,
110 return 0;
111
112 KNI_DBG_TX("kni_sndmsg len %ld, flags 0x%08x, nb_iov %d\n",
113+#ifdef HAVE_IOV_ITER_MSGHDR
114+ len, q->flags, (int)m->msg_iter.iov->iov_len);
115+#else
116 len, q->flags, (int)m->msg_iovlen);
117+#endif
118
119 #ifdef RTE_KNI_VHOST_VNET_HDR_EN
120 if (likely(q->flags & IFF_VNET_HDR)) {
121@@ -362,7 +383,7 @@ kni_sock_sndmsg(struct kiocb *iocb, struct socket *sock,
122 if (unlikely(len < ETH_HLEN + q->vnet_hdr_sz))
123 return -EINVAL;
124
125- return kni_vhost_net_tx(q->kni, m->msg_iov, vnet_hdr_len, len);
126+ return kni_vhost_net_tx(q->kni, m, vnet_hdr_len, len);
127 }
128
129 static int
130@@ -391,7 +412,7 @@ kni_sock_rcvmsg(struct kiocb *iocb, struct socket *sock,
131 #endif
132
133 if (unlikely(0 == (pkt_len = kni_vhost_net_rx(q->kni,
134- m->msg_iov, vnet_hdr_len, len))))
135+ m, vnet_hdr_len, len))))
136 return 0;
137
138 #ifdef RTE_KNI_VHOST_VNET_HDR_EN
139--
1401.9.1
141
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-net-fix-build-with-kernel-4.1.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-net-fix-build-with-kernel-4.1.patch
new file mode 100644
index 00000000..2a4dd638
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-kni-net-fix-build-with-kernel-4.1.patch
@@ -0,0 +1,54 @@
1From abb59c037a74d822e402f9d9a3d6c4d06ce7c748 Mon Sep 17 00:00:00 2001
2From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
3Date: Fri, 26 Jun 2015 17:14:36 -0500
4Subject: [PATCH] kni: fix build with kernel 4.1
5
6Upstream-Status: Backport [2.1.1]
7
8rebuild member was removed from headers_ops in kernel release
94.1. Therefore kni module compilation breaks.
10
11This patch add the properly checks to fix it.
12
13Linux: d476059e77d1 ("net: Kill dev_rebuild_header")
14
15Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
16Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
17Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
18---
19 lib/librte_eal/linuxapp/kni/kni_net.c | 4 ++++
20 1 file changed, 4 insertions(+)
21
22diff --git a/lib/librte_eal/linuxapp/kni/kni_net.c b/lib/librte_eal/linuxapp/kni/kni_net.c
23index dd95db5..c515870 100644
24--- a/lib/librte_eal/linuxapp/kni/kni_net.c
25+++ b/lib/librte_eal/linuxapp/kni/kni_net.c
26@@ -604,6 +604,7 @@ kni_net_header(struct sk_buff *skb, struct net_device *dev,
27 /*
28 * Re-fill the eth header
29 */
30+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0))
31 static int
32 kni_net_rebuild_header(struct sk_buff *skb)
33 {
34@@ -615,6 +616,7 @@ kni_net_rebuild_header(struct sk_buff *skb)
35
36 return 0;
37 }
38+#endif /* < 4.1.0 */
39
40 /**
41 * kni_net_set_mac - Change the Ethernet Address of the KNI NIC
42@@ -634,7 +636,9 @@ static int kni_net_set_mac(struct net_device *netdev, void *p)
43
44 static const struct header_ops kni_net_header_ops = {
45 .create = kni_net_header,
46+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0))
47 .rebuild = kni_net_rebuild_header,
48+#endif /* < 4.1.0 */
49 .cache = NULL, /* disable caching */
50 };
51
52--
531.7.9.5
54
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk_1.8.0.bb b/meta-isg/common/recipes-extended/dpdk/dpdk_1.8.0.bb
index a6b2aed6..82f801e8 100644
--- a/meta-isg/common/recipes-extended/dpdk/dpdk_1.8.0.bb
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk_1.8.0.bb
@@ -1,6 +1,13 @@
1include dpdk.inc 1include dpdk.inc
2 2
3SRC_URI += "file://dpdk-1.8.0-and-2.0.0-examples-add-config-variable-to-enable-disable-dpdk.patch" 3SRC_URI += "file://dpdk-1.8.0-and-2.0.0-examples-add-config-variable-to-enable-disable-dpdk.patch \
4 file://dpdk-1.8.0-and-2.0.0-ixgbe-fix-a-build-warning-being-treated-as-error.patch \
5 file://dpdk-1.8.0-kni-fix-build-with-kernel-3.19.patch \
6 file://dpdk-2.0.0-kni-fix-build-with-kernel-4.0.patch \
7 file://dpdk-2.0.0-kni-fix-igb-build-with-kernel-4.1.patch \
8 file://dpdk-2.0.0-kni-net-fix-build-with-kernel-4.1.patch \
9 file://dpdk-1.8.0-mk-rework-gcc-version-detection-to-permit-versions-n.patch \
10 "
4 11
5SRC_URI[dpdk.md5sum] = "11ad8785aaa869cc87265bcb8d828f22" 12SRC_URI[dpdk.md5sum] = "11ad8785aaa869cc87265bcb8d828f22"
6SRC_URI[dpdk.sha256sum] = "9f5386830bd999355182e20408f3fc2cfa0802a4497fdded8d43202feede1939" 13SRC_URI[dpdk.sha256sum] = "9f5386830bd999355182e20408f3fc2cfa0802a4497fdded8d43202feede1939"
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk_2.0.0.bb b/meta-isg/common/recipes-extended/dpdk/dpdk_2.0.0.bb
index 33ebaac4..e45d6b8a 100644
--- a/meta-isg/common/recipes-extended/dpdk/dpdk_2.0.0.bb
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk_2.0.0.bb
@@ -2,6 +2,12 @@ include dpdk.inc
2 2
3SRC_URI += "file://dpdk-2.0.0-dpdk-enable-ip_fragmentation-in-common_linuxapp.patch \ 3SRC_URI += "file://dpdk-2.0.0-dpdk-enable-ip_fragmentation-in-common_linuxapp.patch \
4 file://dpdk-1.8.0-and-2.0.0-examples-add-config-variable-to-enable-disable-dpdk.patch \ 4 file://dpdk-1.8.0-and-2.0.0-examples-add-config-variable-to-enable-disable-dpdk.patch \
5 file://dpdk-1.8.0-and-2.0.0-ixgbe-fix-a-build-warning-being-treated-as-error.patch \
6 file://dpdk-2.0.0-kni-fix-build-with-kernel-4.0.patch \
7 file://dpdk-2.0.0-kni-fix-igb-build-with-kernel-4.1.patch \
8 file://dpdk-2.0.0-kni-net-fix-build-with-kernel-4.1.patch \
9 file://dpdk-2.0.0-kni-fix-vhost-build-with-kernels-3.19-and-4.0.patch \
10 file://dpdk-2.0.0-kni-fix-vhost-build-with-kernel-4.1.patch \
5 " 11 "
6 12
7SRC_URI[dpdk.md5sum] = "e9e7935c9eec920841ad373949514934" 13SRC_URI[dpdk.md5sum] = "e9e7935c9eec920841ad373949514934"