summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChunrong Guo <chunrong.guo@nxp.com>2019-07-10 14:21:19 +0800
committerOtavio Salvador <otavio@ossystems.com.br>2019-07-12 17:18:34 -0300
commit63d863c97d2770cab745bbd76734559bb6c8329a (patch)
tree4f959106a38dc4383f167ca651eebd9b293e58f1
parentf8c1d3a8f4518f8032a0a162536c20a5bdc4d412 (diff)
downloadmeta-freescale-63d863c97d2770cab745bbd76734559bb6c8329a.tar.gz
dpdk: Upgrade from version 17.11 to 18.11
*update to lsdk 1906 tag include the following changes: 0123ced - Merge pull request #966 in GITAM/dpdk from 18.11-qoriq-dev to 18.11-qoriq 9e58741 - Merge pull request #965 in GITAM/dpdk from 18.11-qoriq-dev-ppfe to 18.11-qoriq-dev 87b8c52 - net/ppfe: add checksum offload in capability ae172a2 - bus/dpaa: fix incorrect rte_free of malloc memory 866adf5 - Merge pull request #961 in GITAM/dpdk from 18.11-qoriq-dev to 18.11-qoriq 0b36cdd - Merge pull request #953 in GITAM/dpdk from DPDK-1790 to 18.11-qoriq-dev 7dfce10 - PVT: nxp: supress warnings from performance script 4e26967 - PVT: nxp/README: update with loopback and no prefetch devargs option 71f3ebd - PVT: net/dpaa2: add optional non-prefetch rx mode 025c689 - PVT: eth/dpaa2: reset frc and ctrl in sg tx fd 6e8d2fe - net/ppfe: fix no ports available issue 28bfd64 - PVT: examples: l3fwd: Fix spec creation for traffic split scenario 279901c - Merge pull request #946 in GITAM/dpdk from DPDK-1799-pdcp-security to 18.11-qoriq-dev 066ff8d - crypto/dpaa_sec: update dpovrd for hfn override in PDCP 73c6c39 - Merge pull request #947 in GITAM/dpdk from DPDK-1795-ecpri to 18.11-qoriq-dev ef48961 - bus/dpaa: fix static initialization to 0 29235c3 - Merge pull request #948 in GITAM/dpdk from 18.11-qoriq-dev to 18.11-qoriq c3a19c0 - PVT: test: restructure PDCP test cases into new file 627fc3d - Merge pull request #943 in GITAM/dpdk from feature/DPDK-1595-ovs-2.11-migration to 18.11-qoriq-dev 7b9db20 - PVT: examples/l3fwd: add support for ethtype based traffic splitting Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
-rw-r--r--recipes-extended/dpdk/dpdk.inc108
-rw-r--r--recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch26
-rw-r--r--recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch2
-rw-r--r--recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch39
-rw-r--r--recipes-extended/dpdk/dpdk_17.11.bb107
-rw-r--r--recipes-extended/dpdk/dpdk_18.11.bb8
6 files changed, 182 insertions, 108 deletions
diff --git a/recipes-extended/dpdk/dpdk.inc b/recipes-extended/dpdk/dpdk.inc
new file mode 100644
index 00000000..9004acc7
--- /dev/null
+++ b/recipes-extended/dpdk/dpdk.inc
@@ -0,0 +1,108 @@
1DESCRIPTION = "Data Plane Development Kit"
2HOMEPAGE = "http://dpdk.org"
3LICENSE = "BSD-3-Clause & LGPLv2 & GPLv2"
4LIC_FILES_CHKSUM = "file://license/README;md5=3383def2d4c82237df281174e981a492"
5
6SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/dpdk;nobranch=1 \
7 file://add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \
8 file://0001-add-Wno-cast-function-type.patch \
9 file://0001-Add-RTE_KERNELDIR_OUT.patch \
10 file://0004-update-WERROR_FLAGS.patch \
11"
12SRCREV = "0123ced10233e7de8a72f743e2ae7e9791124f07"
13
14RDEPENDS_${PN} += "python-subprocess"
15DEPENDS = "virtual/kernel openssl"
16do_configure[depends] += "virtual/kernel:do_shared_workdir"
17
18inherit module
19
20export RTE_TARGET = "${ARCH}-dpaa-linuxapp-gcc"
21export RTE_OUTPUT = "${S}/${RTE_TARGET}"
22export MODULE_DIR = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/net"
23
24S = "${WORKDIR}/git"
25
26EXTRA_OEMAKE += 'ETHTOOL_LIB_PATH="${S}/examples/ethtool/lib/${RTE_TARGET}" RTE_SDK="${S}" \
27 OPENSSL_PATH="${STAGING_DIR_HOST}" RTE_KERNELDIR="${STAGING_KERNEL_DIR}" \
28 RTE_KERNELDIR_OUT="${STAGING_KERNEL_BUILDDIR}" EXAMPLES_BUILD_DIR="${RTE_TARGET}" \
29'
30do_configure () {
31 #############################################################
32 ### default value for prefix is "usr", unsetting it, so it
33 ### will not be concatenated in ${RTE_TARGET}/Makefile
34 ### which will cause compilation failure
35 #############################################################
36 unset prefix
37 oe_runmake O=$RTE_TARGET T=$RTE_TARGET config
38}
39
40do_compile () {
41 unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS
42
43 cd ${S}/${RTE_TARGET}
44 oe_runmake CONFIG_RTE_EAL_IGB_UIO=n CONFIG_RTE_KNI_KMOD=y \
45 CONFIG_RTE_LIBRTE_PMD_OPENSSL=y \
46 EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" \
47 EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
48 CROSS="${TARGET_PREFIX}" \
49 prefix="" LDFLAGS="${TUNE_LDARGS}" WERROR_FLAGS="-w" V=1
50
51 cd ${S}/examples/
52 for APP in l2fwd l3fwd cmdif l2fwd-qdma l2fwd-crypto ipsec-secgw vhost kni ip_fragmentation ip_reassembly; do
53 temp=`basename ${APP}`
54 if [ ${temp} = "ipsec-secgw" ] || [ ${temp} = "l2fwd-crypto" ]; then
55 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \
56 EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
57 CROSS="${TARGET_PREFIX}" -C ${APP} CONFIG_RTE_LIBRTE_PMD_OPENSSL=y O="${S}/examples/${temp}"
58 else
59 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \
60 EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
61 CROSS="${TARGET_PREFIX}" -C ${APP} CONFIG_RTE_LIBRTE_PMD_OPENSSL=y O="${S}/examples/${temp}/"
62 fi
63 done
64
65}
66
67do_install () {
68 oe_runmake O=${RTE_OUTPUT} T= install-runtime DESTDIR=${D}
69 oe_runmake O=${RTE_OUTPUT} T= install-kmod DESTDIR=${D} kerneldir=${MODULE_DIR}
70 oe_runmake O=${RTE_OUTPUT} T= install-sdk DESTDIR=${D}
71
72 # Install examples
73 install -d 0644 ${D}/${datadir}/dpdk/cmdif/include
74 install -d 0644 ${D}/${datadir}/dpdk/cmdif/lib
75 cp examples/cmdif/lib/client/fsl_cmdif_client.h examples/cmdif/lib/server/fsl_cmdif_server.h \
76 examples/cmdif/lib/shbp/fsl_shbp.h ${D}/${datadir}/dpdk/cmdif/include
77 cp examples/cmdif/lib/${RTE_TARGET}/librte_cmdif.a ${D}/${datadir}/dpdk/cmdif/lib
78 install -d 0644 ${D}/${datadir}/dpdk/examples/ipsec_secgw
79 cp -r ${S}/examples/ipsec-secgw/*.cfg ${D}/${datadir}/dpdk/examples/ipsec_secgw
80 cp -rf ${S}/nxp/* ${D}/${datadir}/dpdk
81}
82
83PACKAGES += "${PN}-examples"
84
85FILES_${PN}-dbg += " \
86 ${datadir}/dpdk/.debug \
87 ${datadir}/dpdk/examples/*/.debug \
88 "
89FILES_${PN}-staticdev += "${datadir}/dpdk/cmdif/lib/*.a \
90"
91FILES_${PN}-dev += " \
92 ${datadir}/dpdk/${RTE_TARGET}/.config \
93 ${includedir} \
94 ${includedir}/exec-env \
95 ${datadir}/dpdk/buildtools/ \
96 ${datadir}/dpdk/${RTE_TARGET}/include \
97 ${datadir}/dpdk/${RTE_TARGET}/lib \
98 ${datadir}/dpdk/mk \
99 "
100
101FILES_${PN} += " ${datadir}/ \
102 ${prefix}/sbin/ \
103 ${prefix}/bin/ \
104 ${libdir}/ \
105 "
106FILES_${PN}-examples += " \
107 ${datadir}/examples/* \
108 "
diff --git a/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch b/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch
new file mode 100644
index 00000000..64a6876f
--- /dev/null
+++ b/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch
@@ -0,0 +1,26 @@
1From 4ea737c1d5a185d56ee1d6da18172b389ea90760 Mon Sep 17 00:00:00 2001
2From: Chunrong Guo <chunrong.guo@nxp.com>
3Date: Wed, 3 Jul 2019 08:50:45 +0200
4Subject: [PATCH] Add RTE_KERNELDIR_OUT
5
6Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com>
7---
8 kernel/linux/kni/Makefile | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile
12index 282be7b..dfbebdc 100644
13--- a/kernel/linux/kni/Makefile
14+++ b/kernel/linux/kni/Makefile
15@@ -20,7 +20,7 @@ MODULE_CFLAGS += -Wall -Werror
16
17 ifeq ($(DISTRIB_ID),Ubuntu)
18 MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(subst .,,$(DISTRIB_RELEASE))
19-UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE $(RTE_KERNELDIR)/include/generated/utsrelease.h \
20+UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE $(RTE_KERNELDIR_OUT)/include/generated/utsrelease.h \
21 | cut -d '"' -f2 | cut -d- -f1,2 | tr .- ,`,1)
22 MODULE_CFLAGS += -D"UBUNTU_KERNEL_CODE=UBUNTU_KERNEL_VERSION($(UBUNTU_KERNEL_CODE))"
23 endif
24--
252.7.4
26
diff --git a/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch b/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch
index 0c846822..c074eac6 100644
--- a/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch
+++ b/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch
@@ -18,7 +18,7 @@ index d28badf..4e9851c 100644
18 18
19 CFLAGS += -O3 19 CFLAGS += -O3
20-CFLAGS += $(WERROR_FLAGS) 20-CFLAGS += $(WERROR_FLAGS)
21+CFLAGS += $(WERROR_FLAGS) -Wno-cast-function-type 21+CFLAGS += $(WERROR_FLAGS) -Wno-cast-function-type -Wno-missing-attributes
22 CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib 22 CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib
23 CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/client 23 CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/client
24 CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/server 24 CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/server
diff --git a/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch b/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch
new file mode 100644
index 00000000..9249b2b5
--- /dev/null
+++ b/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch
@@ -0,0 +1,39 @@
1From 3828a36fa537a187127a1c9b82ce2f5959b88367 Mon Sep 17 00:00:00 2001
2From: Chunrong Guo <chunrong.guo@nxp.com>
3Date: Thu, 4 Jul 2019 08:03:56 +0200
4Subject: [PATCH] update WERROR_FLAGS
5
6Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com>
7---
8 kernel/linux/kni/Makefile | 2 +-
9 mk/toolchain/gcc/rte.vars.mk | 1 +
10 2 files changed, 2 insertions(+), 1 deletion(-)
11
12diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile
13index dfbebdc..8b5c13e 100644
14--- a/kernel/linux/kni/Makefile
15+++ b/kernel/linux/kni/Makefile
16@@ -14,7 +14,7 @@ MODULE = rte_kni
17 MODULE_CFLAGS += -I$(SRCDIR) --param max-inline-insns-single=50
18 MODULE_CFLAGS += -I$(RTE_OUTPUT)/include -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/ethtool/igb
19 MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h
20-MODULE_CFLAGS += -Wall -Werror
21+MODULE_CFLAGS += -Wall -Werror -Wno-missing-attributes
22
23 -include /etc/lsb-release
24
25diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
26index aa94344..81efa1c 100644
27--- a/mk/toolchain/gcc/rte.vars.mk
28+++ b/mk/toolchain/gcc/rte.vars.mk
29@@ -49,6 +49,7 @@ WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual
30 WERROR_FLAGS += -Wformat-nonliteral -Wformat-security
31 WERROR_FLAGS += -Wundef -Wwrite-strings -Wdeprecated
32 WERROR_FLAGS += -Wno-error=pedantic
33+WERROR_FLAGS += -Wno-address-of-packed-member
34
35 ifeq ($(RTE_DEVEL_BUILD),y)
36 WERROR_FLAGS += -Werror
37--
382.7.4
39
diff --git a/recipes-extended/dpdk/dpdk_17.11.bb b/recipes-extended/dpdk/dpdk_17.11.bb
deleted file mode 100644
index 2eceebe4..00000000
--- a/recipes-extended/dpdk/dpdk_17.11.bb
+++ /dev/null
@@ -1,107 +0,0 @@
1DESCRIPTION = "Data Plane Development Kit"
2HOMEPAGE = "http://dpdk.org"
3LICENSE = "BSD-3-Clause & LGPLv2 & GPLv2"
4LIC_FILES_CHKSUM = "file://license/README;md5=3383def2d4c82237df281174e981a492"
5
6DEPENDS += "virtual/kernel openssl"
7RDEPENDS_${PN} = "bash python"
8RDEPENDS_${PN}-examples = "bash python-core"
9
10inherit module
11
12SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/dpdk;nobranch=1 \
13 file://add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \
14 file://0001-add-Wno-cast-function-type.patch \
15"
16SRCREV = "c0fe1b99b562a4015423e8ff748bfb0f55a68c05"
17
18S = "${WORKDIR}/git"
19
20DPAA_VER ?= "dpaa"
21export RTE_TARGET = "${ARCH}-${DPAA_VER}-linuxapp-gcc"
22export ETHTOOL_LIB_PATH = "${S}/examples/ethtool/lib/${RTE_TARGET}/"
23
24EXTRA_OEMAKE += 'ARCH="${ARCH}" CROSS="${TARGET_PREFIX}" \
25 CPU_CFLAGS="-fPIC --sysroot=${STAGING_DIR_HOST}" RTE_SDK="${S}" \
26 OPENSSL_PATH="${STAGING_DIR_HOST}" RTE_KERNELDIR="${STAGING_KERNEL_DIR}" \
27 RTE_KERNELDIR_OUT="${STAGING_KERNEL_BUILDDIR}" \
28'
29
30do_configure[noexec] = "1"
31
32do_compile[depends] += "virtual/kernel:do_shared_workdir"
33do_compile() {
34 oe_runmake O="${RTE_TARGET}" T="${RTE_TARGET}" config
35}
36
37do_install() {
38 unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS
39
40 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" WERROR_FLAGS="-w" V=1 T="${RTE_TARGET}" DESTDIR="${D}" install CONFIG_RTE_EAL_IGB_UIO=n CONFIG_RTE_KNI_KMOD=y CONFIG_RTE_LIBRTE_PMD_OPENSSL=y
41
42 # Build and install the DPDK examples
43 for APP in examples/l2fwd examples/l3fwd examples/l2fwd-qdma examples/l2fwd-crypto examples/ipsec-secgw examples/kni examples/ip_fragmentation examples/ip_reassembly; do
44 temp=`basename ${APP}`
45 if [ ${temp} = "ipsec-secgw" ] || [ ${temp} = "l2fwd-crypto" ]; then
46 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" -C ${APP} CONFIG_RTE_LIBRTE_PMD_OPENSSL=y
47 else
48 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" EXTRA_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" -C ${APP}
49 fi
50
51 [ ! -d ${D}/${bindir}/dpdk-example ] && install -d 0644 ${D}/${bindir}/dpdk-example
52 install -m 0755 ${S}/examples/`basename ${APP}`/build/`basename ${APP}` \
53 ${D}/${bindir}/dpdk-example/
54 done
55 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" -C examples/vhost
56 install -m 0755 ${S}/examples/vhost/build/vhost-switch ${D}/${bindir}/dpdk-example/
57 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" -C examples/cmdif
58
59 install -d 0644 ${D}/usr/share/dpdk/cmdif/include
60 install -d 0644 ${D}/usr/share/dpdk/cmdif/lib
61 cp examples/cmdif/lib/client/fsl_cmdif_client.h examples/cmdif/lib/server/fsl_cmdif_server.h \
62 examples/cmdif/lib/shbp/fsl_shbp.h ${D}/usr/share/dpdk/cmdif/include
63 cp examples/cmdif/lib/${RTE_TARGET}/librte_cmdif.a ${D}/usr/share/dpdk/cmdif/lib
64
65 install -m 0755 ${S}/${RTE_TARGET}/app/testpmd ${D}/${bindir}/dpdk-example/
66 rm -fr ${D}/lib/modules/*
67 install -d ${D}/lib/modules/${KERNEL_VERSION}/dpdk
68 install -m 0755 ${S}/${RTE_TARGET}/kmod/rte_kni.ko ${D}/lib/modules/${KERNEL_VERSION}/dpdk/
69 install -d ${D}/${bindir}/dpdk-example/extras
70 cp -rf ${S}/nxp/* ${D}/${bindir}/dpdk-example/extras/
71 rm ${D}/${datadir}/${RTE_TARGET}/app/dpdk-pmdinfogen
72
73 chown root:root -R ${D}
74}
75
76PACKAGE_ARCH = "${MACHINE_ARCH}"
77
78PACKAGES += "${PN}-examples"
79
80FILES_${PN} += "${datadir}/* ${bindir}/* ${sbindir}/* /usr/share/dpdk/cmdif/include/*"
81FILES_${PN}-dbg += "${bindir}/dpdk-example/.debug \
82 ${datadir}/examples/kni/build/.debug \
83 ${datadir}/examples/kni/build/app/.debug \
84 ${datadir}/examples/l2fwd/build/.debug \
85 ${datadir}/examples/l2fwd/build/app/.debug \
86 ${datadir}/examples/l2fwd-crypto/build/.debug \
87 ${datadir}/examples/l2fwd-crypto/build/app/.debug \
88 ${datadir}/examples/l3fwd/build/.debug \
89 ${datadir}/examples/l3fwd/build/app/.debug \
90 ${datadir}/examples/ipsec-secgw/build/.debug \
91 ${datadir}/examples/ipsec-secgw/build/app/.debug \
92 ${datadir}/examples/ip_fragmentation/build/.debug \
93 ${datadir}/examples/ip_fragmentation/build/app/.debug \
94 ${datadir}/examples/ip_reassembly/build/.debug \
95 ${datadir}/examples/ip_reassembly/build/app/.debug \
96"
97FILES_${PN}-dev += "${datadir}/mk ${datadir}/scripts \
98 ${datadir}/${RTE_TARGET} \
99 ${includedir} \
100"
101FILES_${PN}-examples += "${datadir}/examples"
102
103FILES_${PN}-staticdev += "/usr/share/dpdk/cmdif/lib/*.a \
104 /usr/share/examples/cmdif/lib/arm64-dpaa-linuxapp-gcc/*.a \
105 /usr/share/examples/cmdif/lib/arm64-dpaa-linuxapp-gcc/lib/*.a \
106"
107COMPATIBLE_MACHINE = "(qoriq)"
diff --git a/recipes-extended/dpdk/dpdk_18.11.bb b/recipes-extended/dpdk/dpdk_18.11.bb
new file mode 100644
index 00000000..1a6b927e
--- /dev/null
+++ b/recipes-extended/dpdk/dpdk_18.11.bb
@@ -0,0 +1,8 @@
1include dpdk.inc
2
3
4do_install_append () {
5 # Remove the unneeded dir
6 rm -rf ${D}/${datadir}/${RTE_TARGET}/app
7}
8