diff options
author | Chunrong Guo <chunrong.guo@nxp.com> | 2019-07-10 16:11:47 +0800 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2019-07-12 17:18:34 -0300 |
commit | 1f2384233d0f51afd9ef88d01b627af4a7b19aea (patch) | |
tree | 9bfb28abff85567304cbb5fe148d80209d04981a | |
parent | b7bf801bf6fc9c7b210602c933bbb8c42b92518d (diff) | |
download | meta-freescale-1f2384233d0f51afd9ef88d01b627af4a7b19aea.tar.gz |
dpdkvpp: add recipes
*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
Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
5 files changed, 252 insertions, 0 deletions
diff --git a/recipes-extended/vpp-core/dpdkvpp.bb b/recipes-extended/vpp-core/dpdkvpp.bb new file mode 100644 index 00000000..09e913e8 --- /dev/null +++ b/recipes-extended/vpp-core/dpdkvpp.bb | |||
@@ -0,0 +1,109 @@ | |||
1 | DESCRIPTION = "Data Plane Development Kit" | ||
2 | HOMEPAGE = "http://dpdk.org" | ||
3 | LICENSE = "BSD-3-Clause & LGPLv2 & GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://license/README;md5=3383def2d4c82237df281174e981a492" | ||
5 | |||
6 | SRC_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 | " | ||
12 | SRCREV = "0123ced10233e7de8a72f743e2ae7e9791124f07" | ||
13 | |||
14 | RDEPENDS_${PN} += "python-subprocess" | ||
15 | DEPENDS = "virtual/kernel openssl" | ||
16 | do_configure[depends] += "virtual/kernel:do_shared_workdir" | ||
17 | |||
18 | inherit module | ||
19 | |||
20 | export RTE_TARGET = "${ARCH}-dpaa-linuxapp-gcc" | ||
21 | export RTE_OUTPUT = "${S}/${RTE_TARGET}" | ||
22 | |||
23 | S = "${WORKDIR}/git" | ||
24 | |||
25 | EXTRA_OEMAKE += 'ETHTOOL_LIB_PATH="${S}/examples/ethtool/lib/${RTE_TARGET}" RTE_SDK="${S}" \ | ||
26 | OPENSSL_PATH="${STAGING_DIR_HOST}" RTE_KERNELDIR="${STAGING_KERNEL_DIR}" \ | ||
27 | RTE_KERNELDIR_OUT="${STAGING_KERNEL_BUILDDIR}" EXAMPLES_BUILD_DIR="${RTE_TARGET}" \ | ||
28 | ' | ||
29 | do_configure () { | ||
30 | ############################################################# | ||
31 | ### default value for prefix is "usr", unsetting it, so it | ||
32 | ### will not be concatenated in ${RTE_TARGET}/Makefile | ||
33 | ### which will cause compilation failure | ||
34 | ############################################################# | ||
35 | unset prefix | ||
36 | oe_runmake O=$RTE_TARGET T=$RTE_TARGET config | ||
37 | } | ||
38 | |||
39 | do_compile () { | ||
40 | unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS | ||
41 | |||
42 | cd ${S}/${RTE_TARGET} | ||
43 | oe_runmake CONFIG_RTE_EAL_IGB_UIO=n CONFIG_RTE_KNI_KMOD=y \ | ||
44 | CONFIG_RTE_LIBRTE_PMD_OPENSSL=y \ | ||
45 | EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" \ | ||
46 | EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR} -fPIC -mtls-dialect=trad" \ | ||
47 | CROSS="${TARGET_PREFIX}" \ | ||
48 | prefix="" LDFLAGS="${TUNE_LDARGS}" WERROR_FLAGS="-w" V=1 | ||
49 | |||
50 | cd ${S}/examples/ | ||
51 | for APP in l2fwd l3fwd cmdif l2fwd-qdma l2fwd-crypto ipsec-secgw vhost kni ip_fragmentation ip_reassembly; do | ||
52 | temp=`basename ${APP}` | ||
53 | if [ ${temp} = "ipsec-secgw" ] || [ ${temp} = "l2fwd-crypto" ]; then | ||
54 | oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \ | ||
55 | EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \ | ||
56 | CROSS="${TARGET_PREFIX}" -C ${APP} CONFIG_RTE_LIBRTE_PMD_OPENSSL=y O="${S}/examples/${temp}" | ||
57 | else | ||
58 | oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \ | ||
59 | EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \ | ||
60 | CROSS="${TARGET_PREFIX}" -C ${APP} CONFIG_RTE_LIBRTE_PMD_OPENSSL=y O="${S}/examples/${temp}/" | ||
61 | fi | ||
62 | done | ||
63 | |||
64 | } | ||
65 | |||
66 | do_install () { | ||
67 | oe_runmake O=${RTE_OUTPUT} T= install-runtime DESTDIR=${D} | ||
68 | oe_runmake O=${RTE_OUTPUT} T= install-sdk DESTDIR=${D} | ||
69 | |||
70 | # Install examples | ||
71 | install -d 0644 ${D}/${datadir}/dpdk/cmdif/include | ||
72 | install -d 0644 ${D}/${datadir}/dpdk/cmdif/lib | ||
73 | cp examples/cmdif/lib/client/fsl_cmdif_client.h examples/cmdif/lib/server/fsl_cmdif_server.h \ | ||
74 | examples/cmdif/lib/shbp/fsl_shbp.h ${D}/${datadir}/dpdk/cmdif/include | ||
75 | cp examples/cmdif/lib/${RTE_TARGET}/librte_cmdif.a ${D}/${datadir}/dpdk/cmdif/lib | ||
76 | install -d 0644 ${D}/${datadir}/dpdk/examples/ipsec_secgw | ||
77 | cp -r ${S}/examples/ipsec-secgw/*.cfg ${D}/${datadir}/dpdk/examples/ipsec_secgw | ||
78 | cp -rf ${S}/nxp/* ${D}/${datadir}/dpdk | ||
79 | |||
80 | # Remove the unneeded dir | ||
81 | rm -rf ${D}/${datadir}/${RTE_TARGET}/app | ||
82 | } | ||
83 | |||
84 | PACKAGES += "${PN}-examples" | ||
85 | |||
86 | FILES_${PN}-dbg += " \ | ||
87 | ${datadir}/dpdk/.debug \ | ||
88 | ${datadir}/dpdk/examples/*/.debug \ | ||
89 | " | ||
90 | FILES_${PN}-staticdev += "${datadir}/dpdk/cmdif/lib/*.a \ | ||
91 | " | ||
92 | FILES_${PN}-dev += " \ | ||
93 | ${datadir}/dpdk/${RTE_TARGET}/.config \ | ||
94 | ${includedir} \ | ||
95 | ${includedir}/exec-env \ | ||
96 | ${datadir}/dpdk/buildtools/ \ | ||
97 | ${datadir}/dpdk/${RTE_TARGET}/include \ | ||
98 | ${datadir}/dpdk/${RTE_TARGET}/lib \ | ||
99 | ${datadir}/dpdk/mk \ | ||
100 | " | ||
101 | |||
102 | FILES_${PN} += " ${datadir}/ \ | ||
103 | ${prefix}/sbin/ \ | ||
104 | ${prefix}/bin/ \ | ||
105 | ${libdir}/ \ | ||
106 | " | ||
107 | FILES_${PN}-examples += " \ | ||
108 | ${datadir}/examples/* \ | ||
109 | " | ||
diff --git a/recipes-extended/vpp-core/dpdkvpp/0001-Add-RTE_KERNELDIR_OUT.patch b/recipes-extended/vpp-core/dpdkvpp/0001-Add-RTE_KERNELDIR_OUT.patch new file mode 100644 index 00000000..64a6876f --- /dev/null +++ b/recipes-extended/vpp-core/dpdkvpp/0001-Add-RTE_KERNELDIR_OUT.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From 4ea737c1d5a185d56ee1d6da18172b389ea90760 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chunrong Guo <chunrong.guo@nxp.com> | ||
3 | Date: Wed, 3 Jul 2019 08:50:45 +0200 | ||
4 | Subject: [PATCH] Add RTE_KERNELDIR_OUT | ||
5 | |||
6 | Signed-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 | |||
11 | diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile | ||
12 | index 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 | -- | ||
25 | 2.7.4 | ||
26 | |||
diff --git a/recipes-extended/vpp-core/dpdkvpp/0001-add-Wno-cast-function-type.patch b/recipes-extended/vpp-core/dpdkvpp/0001-add-Wno-cast-function-type.patch new file mode 100644 index 00000000..c074eac6 --- /dev/null +++ b/recipes-extended/vpp-core/dpdkvpp/0001-add-Wno-cast-function-type.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From beb13be8023beb68499c72e71a79b8f91784e484 Mon Sep 17 00:00:00 2001 | ||
2 | From: "C.r. Guo" <nxa13725@lsv07005.swis.us-cdc01.nxp.com> | ||
3 | Date: Wed, 27 Mar 2019 09:35:43 +0100 | ||
4 | Subject: [PATCH] add -Wno-cast-function-type | ||
5 | |||
6 | Upstream-Status: Inappropriate [configuration] | ||
7 | |||
8 | --- | ||
9 | examples/cmdif/lib/Makefile | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/examples/cmdif/lib/Makefile b/examples/cmdif/lib/Makefile | ||
13 | index d28badf..4e9851c 100644 | ||
14 | --- a/examples/cmdif/lib/Makefile | ||
15 | +++ b/examples/cmdif/lib/Makefile | ||
16 | @@ -28,7 +28,7 @@ SRCS-y += server/cmdif_srv_gpp.c | ||
17 | SRCS-y += shbp/shbp.c | ||
18 | |||
19 | CFLAGS += -O3 | ||
20 | -CFLAGS += $(WERROR_FLAGS) | ||
21 | +CFLAGS += $(WERROR_FLAGS) -Wno-cast-function-type -Wno-missing-attributes | ||
22 | CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib | ||
23 | CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/client | ||
24 | CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/server | ||
25 | -- | ||
26 | 2.7.4 | ||
27 | |||
diff --git a/recipes-extended/vpp-core/dpdkvpp/0004-update-WERROR_FLAGS.patch b/recipes-extended/vpp-core/dpdkvpp/0004-update-WERROR_FLAGS.patch new file mode 100644 index 00000000..9249b2b5 --- /dev/null +++ b/recipes-extended/vpp-core/dpdkvpp/0004-update-WERROR_FLAGS.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 3828a36fa537a187127a1c9b82ce2f5959b88367 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chunrong Guo <chunrong.guo@nxp.com> | ||
3 | Date: Thu, 4 Jul 2019 08:03:56 +0200 | ||
4 | Subject: [PATCH] update WERROR_FLAGS | ||
5 | |||
6 | Signed-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 | |||
12 | diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile | ||
13 | index 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 | |||
25 | diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk | ||
26 | index 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 | -- | ||
38 | 2.7.4 | ||
39 | |||
diff --git a/recipes-extended/vpp-core/dpdkvpp/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch b/recipes-extended/vpp-core/dpdkvpp/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch new file mode 100644 index 00000000..4657f070 --- /dev/null +++ b/recipes-extended/vpp-core/dpdkvpp/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 6c8d348190a8cf6c35111913cbf117ca98137e84 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
3 | Date: Fri, 18 Dec 2015 18:30:47 +0800 | ||
4 | Subject: [PATCH] dpdk v2.2.0: add RTE_KERNELDIR_OUT to split kernel build | ||
5 | artifact | ||
6 | |||
7 | Introduce RTE_KERNELDIR_OUT to be the path to which kernel build | ||
8 | artifacts are located. This is for matching the workflow change | ||
9 | since Yocto Project v1.8 onwards whereby tmp/work-shared contains | ||
10 | separate directories for kernel source and kernel artifacts. | ||
11 | |||
12 | Upstream-Status: Inappropriate [configuration] | ||
13 | |||
14 | Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
15 | --- | ||
16 | mk/rte.module.mk | 6 +++--- | ||
17 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
18 | |||
19 | diff --git a/mk/rte.module.mk b/mk/rte.module.mk | ||
20 | index 53ed4fe..b7a014b 100644 | ||
21 | --- a/mk/rte.module.mk | ||
22 | +++ b/mk/rte.module.mk | ||
23 | @@ -77,7 +77,7 @@ build: _postbuild | ||
24 | # build module | ||
25 | $(MODULE).ko: $(SRCS_LINKS) | ||
26 | @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi | ||
27 | - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ | ||
28 | + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ | ||
29 | CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0) | ||
30 | |||
31 | # install module in $(RTE_OUTPUT)/kmod | ||
32 | @@ -88,7 +88,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko | ||
33 | |||
34 | # install module | ||
35 | modules_install: | ||
36 | - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ | ||
37 | + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ | ||
38 | modules_install | ||
39 | |||
40 | .PHONY: clean | ||
41 | @@ -98,7 +98,7 @@ clean: _postclean | ||
42 | .PHONY: doclean | ||
43 | doclean: | ||
44 | @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi | ||
45 | - $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean | ||
46 | + $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean | ||
47 | @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\ | ||
48 | if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;) | ||
49 | @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fi | ||
50 | -- | ||
51 | 1.9.1 | ||