From 76d81da78421b48cea47d7090855173f87a43a99 Mon Sep 17 00:00:00 2001 From: WU CHIA CHUAN Date: Tue, 28 Jul 2015 16:05:08 +0800 Subject: meta-isg: dpdk: tidy up dpdk.inc & removed unnecessary patches This patch tidy up dpdk.inc and removing unnecessary patches. Integrating common recipe from dpdk_1.8.0.bb and dpdk_2.0.0.bb. Signed-off-by: Ong Boon Leong Signed-off-by: WU CHIA CHUAN Signed-off-by: Darren Hart --- meta-isg/common/recipes-extended/dpdk/dpdk.inc | 20 +++++++++ ....0-dpdk-defconfig-select-RTE_MACHINE-type.patch | 48 --------------------- ...ld-config-VHOST-in-common_linuxapp-config.patch | 43 ------------------- ...T-and-ip_fragmentation-in-common_linuxapp.patch | 50 ---------------------- .../common/recipes-extended/dpdk/dpdk_1.8.0.bb | 22 ---------- .../common/recipes-extended/dpdk/dpdk_2.0.0.bb | 22 ---------- 6 files changed, 20 insertions(+), 185 deletions(-) delete mode 100644 meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-and-2.0.0-dpdk-defconfig-select-RTE_MACHINE-type.patch delete mode 100644 meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-dpdk-enable-build-config-VHOST-in-common_linuxapp-config.patch delete mode 100644 meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-dpdk-enable-VHOST-and-ip_fragmentation-in-common_linuxapp.patch diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk.inc b/meta-isg/common/recipes-extended/dpdk/dpdk.inc index 85b88fa0..59946cfb 100644 --- a/meta-isg/common/recipes-extended/dpdk/dpdk.inc +++ b/meta-isg/common/recipes-extended/dpdk/dpdk.inc @@ -3,6 +3,26 @@ HOMEPAGE = "http://dpdk.org" LICENSE = "BSD & LGPLv2 & GPLv2" LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe" +SRC_URI = "http://dpdk.org/browse/dpdk/snapshot/dpdk-${PV}.tar.gz;name=dpdk \ + file://dpdk-1.8.0-and-2.0.0-examples-add-config-variable-to-enable-disable-dpdk.patch \ + file://dpdk-1.8.0-and-2.0.0-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \ + file://dpdk-1.8.0-and-2.0.0-add-sysroot-option-within-app-makefile.patch \ + " + +# dpdk example apps dpdk_qat and vhost have dependancy on fuse and qat. +# fuse is in meta-filesystems and qat is not yet upstreamed. +# So adding mechanism to explicitly disable the use of fuse and qat. +# To enable, uncomment the below line or include in .bbappend. +# PACKAGECONFIG ?= " dpdk_qat vhost libvirt" + +PACKAGECONFIG[dpdk_qat] = ",,qat" +PACKAGECONFIG[vhost] = ",,fuse" +PACKAGECONFIG[libvirt] = ",,libvirt" + +export CONFIG_EXAMPLE_DPDK_QAT = "${@base_contains('PACKAGECONFIG', 'dpdk_qat', 'y', 'n', d)}" +export CONFIG_EXAMPLE_VM_POWER_MANAGER = "${@base_contains('PACKAGECONFIG', 'libvirt', 'y', 'n', d)}" +export CONFIG_VHOST_ENABLED = "${@base_contains('PACKAGECONFIG', 'vhost', 'y', 'n', d)}" + RDEPENDS_${PN} += "python-subprocess" DEPENDS = "virtual/kernel" do_configure[depends] += "virtual/kernel:do_shared_workdir" diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-and-2.0.0-dpdk-defconfig-select-RTE_MACHINE-type.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-and-2.0.0-dpdk-defconfig-select-RTE_MACHINE-type.patch deleted file mode 100644 index 979541e9..00000000 --- a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-and-2.0.0-dpdk-defconfig-select-RTE_MACHINE-type.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 6eaf6b1a61321acb824f9672c12d0e30a2110f52 Mon Sep 17 00:00:00 2001 -From: Ong Boon Leong -Date: Mon, 16 Mar 2015 11:10:43 +0800 -Subject: [PATCH] DPDK: defconfig: add selectable RTE_MACHINE option - -In order to make sure that DPDK build environment config can handle the -package being built on different build machine for different target machine -which will have different x86 architecture intrinsics than the build machine, -we introduce DPDK_TARGET_MACH to be tunable from dpdk recipe. The machine -type can be under mk/machine folder. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Ong Boon Leong ---- - config/defconfig_i686-native-linuxapp-gcc | 2 +- - config/defconfig_x86_64-native-linuxapp-gcc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/config/defconfig_i686-native-linuxapp-gcc b/config/defconfig_i686-native-linuxapp-gcc -index a90de9b..c9a74a5 100644 ---- a/config/defconfig_i686-native-linuxapp-gcc -+++ b/config/defconfig_i686-native-linuxapp-gcc -@@ -32,7 +32,7 @@ - - #include "common_linuxapp" - --CONFIG_RTE_MACHINE="native" -+CONFIG_RTE_MACHINE=$(DPDK_TARGET_MACH) - - CONFIG_RTE_ARCH="i686" - CONFIG_RTE_ARCH_I686=y -diff --git a/config/defconfig_x86_64-native-linuxapp-gcc b/config/defconfig_x86_64-native-linuxapp-gcc -index 60baf5b..0e4802d 100644 ---- a/config/defconfig_x86_64-native-linuxapp-gcc -+++ b/config/defconfig_x86_64-native-linuxapp-gcc -@@ -32,7 +32,7 @@ - - #include "common_linuxapp" - --CONFIG_RTE_MACHINE="native" -+CONFIG_RTE_MACHINE=$(DPDK_TARGET_MACH) - - CONFIG_RTE_ARCH="x86_64" - CONFIG_RTE_ARCH_X86_64=y --- -1.7.9.5 - diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-dpdk-enable-build-config-VHOST-in-common_linuxapp-config.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-dpdk-enable-build-config-VHOST-in-common_linuxapp-config.patch deleted file mode 100644 index e8ded8d0..00000000 --- a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-dpdk-enable-build-config-VHOST-in-common_linuxapp-config.patch +++ /dev/null @@ -1,43 +0,0 @@ -From c1a59d62f2aa7656060d8ebcc8e45e852d931ff1 Mon Sep 17 00:00:00 2001 -From: Ong Boon Leong -Date: Tue, 17 Feb 2015 00:23:12 +0800 -Subject: [PATCH] dpdk: enable VHOST build config in common_linuxapp config - -Introduce CONFIG_VHOST_ENABLED for package config selection purpose in -building vhost feature. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Ong Boon Leong ---- - config/common_linuxapp | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/config/common_linuxapp b/config/common_linuxapp -index 2f9643b..67f5edb 100644 ---- a/config/common_linuxapp -+++ b/config/common_linuxapp -@@ -361,9 +361,9 @@ CONFIG_RTE_LIBRTE_PIPELINE=y - # - CONFIG_RTE_LIBRTE_KNI=y - CONFIG_RTE_KNI_KO_DEBUG=n --CONFIG_RTE_KNI_VHOST=n -+CONFIG_RTE_KNI_VHOST=$(CONFIG_VHOST_ENABLED) - CONFIG_RTE_KNI_VHOST_MAX_CACHE_SIZE=1024 --CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=n -+CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=$(CONFIG_VHOST_ENABLED) - CONFIG_RTE_KNI_VHOST_DEBUG_RX=n - CONFIG_RTE_KNI_VHOST_DEBUG_TX=n - -@@ -372,7 +372,7 @@ CONFIG_RTE_KNI_VHOST_DEBUG_TX=n - # fuse-devel is needed to run vhost. - # fuse-devel enables user space char driver development - # --CONFIG_RTE_LIBRTE_VHOST=n -+CONFIG_RTE_LIBRTE_VHOST=$(CONFIG_VHOST_ENABLED) - CONFIG_RTE_LIBRTE_VHOST_DEBUG=n - - # --- -1.7.9.5 - diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-dpdk-enable-VHOST-and-ip_fragmentation-in-common_linuxapp.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-dpdk-enable-VHOST-and-ip_fragmentation-in-common_linuxapp.patch deleted file mode 100644 index 45ce5e05..00000000 --- a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-dpdk-enable-VHOST-and-ip_fragmentation-in-common_linuxapp.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 3d3c03d947394696565b3bb7bed8c900de057a28 Mon Sep 17 00:00:00 2001 -From: WU CHIA CHUAN -Date: Thu, 2 Jul 2015 15:59:18 +0800 -Subject: [PATCH] dpdk enable VHOST and ip_fragmentation in common_linuxapp config - -Introduce CONFIG_VHOST_ENABLED for package config selection purpose in -building vhost feature. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: WU CHIA CHUAN ---- - config/common_linuxapp | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/config/common_linuxapp b/config/common_linuxapp -index 0b25f34..000f950 100644 ---- a/config/common_linuxapp -+++ b/config/common_linuxapp -@@ -406,19 +406,24 @@ CONFIG_RTE_LIBRTE_PIPELINE=y - CONFIG_RTE_LIBRTE_KNI=y - CONFIG_RTE_KNI_PREEMPT_DEFAULT=y - CONFIG_RTE_KNI_KO_DEBUG=n --CONFIG_RTE_KNI_VHOST=n -+CONFIG_RTE_KNI_VHOST=$(CONFIG_VHOST_ENABLED) - CONFIG_RTE_KNI_VHOST_MAX_CACHE_SIZE=1024 --CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=n -+CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=$(CONFIG_VHOST_ENABLED) - CONFIG_RTE_KNI_VHOST_DEBUG_RX=n - CONFIG_RTE_KNI_VHOST_DEBUG_TX=n - - # -+# Compile ip_fragmentation -+# -+CONFIG_RTE_IP_FRAG=y -+ -+# - # Compile vhost library - # fuse-devel is needed to run vhost-cuse. - # fuse-devel enables user space char driver development - # vhost-user is turned on by default. - # --CONFIG_RTE_LIBRTE_VHOST=n -+CONFIG_RTE_LIBRTE_VHOST=$(CONFIG_VHOST_ENABLED) - CONFIG_RTE_LIBRTE_VHOST_USER=y - CONFIG_RTE_LIBRTE_VHOST_DEBUG=n - --- -1.7.9.5 - 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 5265a9cf..b1a3aea5 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,33 +1,11 @@ include dpdk.inc -SRC_URI = "http://dpdk.org/browse/dpdk/snapshot/dpdk-${PV}.tar.gz;name=dpdk \ - file://dpdk-1.8.0-dpdk-enable-build-config-VHOST-in-common_linuxapp-config.patch \ - file://dpdk-1.8.0-and-2.0.0-examples-add-config-variable-to-enable-disable-dpdk.patch \ - file://dpdk-1.8.0-and-2.0.0-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \ - file://dpdk-1.8.0-and-2.0.0-add-sysroot-option-within-app-makefile.patch \ - file://dpdk-1.8.0-and-2.0.0-dpdk-defconfig-select-RTE_MACHINE-type.patch \ - " - SRC_URI[dpdk.md5sum] = "11ad8785aaa869cc87265bcb8d828f22" SRC_URI[dpdk.sha256sum] = "9f5386830bd999355182e20408f3fc2cfa0802a4497fdded8d43202feede1939" export EXAMPLES_BUILD_DIR = "${RTE_TARGET}" export ARCHDIR = "generic" -# dpdk example apps dpdk_qat and vhost have dependancy on fuse and qat. -# fuse is in meta-filesystems and qat is not yet upstreamed. -# So adding mechanism to explicitly disable the use of fuse and qat. -# To enable, uncomment the below line or include in .bbappend. -# PACKAGECONFIG ?= " dpdk_qat vhost libvirt" - -PACKAGECONFIG[dpdk_qat] = ",,qat" -PACKAGECONFIG[vhost] = ",,fuse" -PACKAGECONFIG[libvirt] = ",,libvirt" - -export CONFIG_EXAMPLE_DPDK_QAT = "${@base_contains('PACKAGECONFIG', 'dpdk_qat', 'y', 'n', d)}" -export CONFIG_EXAMPLE_VM_POWER_MANAGER = "${@base_contains('PACKAGECONFIG', 'libvirt', 'y', 'n', d)}" -export CONFIG_VHOST_ENABLED = "${@base_contains('PACKAGECONFIG', 'vhost', 'y', 'n', d)}" - do_install_append () { install -m 0755 -d ${D}/${INSTALL_PATH}/${RTE_TARGET}/hostapp 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 cb158b92..0e9350b1 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 @@ -1,29 +1,7 @@ include dpdk.inc -SRC_URI = "http://dpdk.org/browse/dpdk/snapshot/dpdk-${PV}.tar.gz;name=dpdk \ - file://dpdk-2.0.0-dpdk-enable-VHOST-and-ip_fragmentation-in-common_linuxapp.patch \ - file://dpdk-1.8.0-and-2.0.0-examples-add-config-variable-to-enable-disable-dpdk.patch \ - file://dpdk-1.8.0-and-2.0.0-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \ - file://dpdk-1.8.0-and-2.0.0-add-sysroot-option-within-app-makefile.patch \ - file://dpdk-1.8.0-and-2.0.0-dpdk-defconfig-select-RTE_MACHINE-type.patch \ - " - SRC_URI[dpdk.md5sum] = "e9e7935c9eec920841ad373949514934" SRC_URI[dpdk.sha256sum] = "643789a3be5ba44dd84d6b248cdf5471b260f8736dada177dadf076aebfbff3f" export EXAMPLES_BUILD_DIR = "${RTE_TARGET}" export ARCHDIR = "generic" - -# dpdk example apps dpdk_qat and vhost have dependancy on fuse and qat. -# fuse is in meta-filesystems and qat is not yet upstreamed. -# So adding mechanism to explicitly disable the use of fuse and qat. -# To enable, uncomment the below line or include in .bbappend. -# PACKAGECONFIG ?= " dpdk_qat vhost libvirt" - -PACKAGECONFIG[dpdk_qat] = ",,qat" -PACKAGECONFIG[vhost] = ",,fuse" -PACKAGECONFIG[libvirt] = ",,libvirt" - -export CONFIG_EXAMPLE_DPDK_QAT = "${@base_contains('PACKAGECONFIG', 'dpdk_qat', 'y', 'n', d)}" -export CONFIG_EXAMPLE_VM_POWER_MANAGER = "${@base_contains('PACKAGECONFIG', 'libvirt', 'y', 'n', d)}" -export CONFIG_VHOST_ENABLED = "${@base_contains('PACKAGECONFIG', 'vhost', 'y', 'n', d)}" -- cgit v1.2.3-54-g00ecf From d48ca52bbe6d768a6eefdcede121eeb89ba79e4b Mon Sep 17 00:00:00 2001 From: WU CHIA CHUAN Date: Tue, 28 Jul 2015 16:05:09 +0800 Subject: meta-isg: dpdk: fix issue in build configuration variables This patch fixes issue in build configuration variables that were not correctly parsed by do_configure() task.The environment variables are not evaluated because the config files under dpdk/config/ folder are not parsed by Makefile but instead by cpp compiler. Reported-by: Anuj Mittal Signed-off-by: Ong Boon Leong Signed-off-by: WU CHIA CHUAN Tested-by: WU CHIA CHUAN Signed-off-by: Darren Hart --- meta-isg/common/recipes-extended/dpdk/dpdk.inc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk.inc b/meta-isg/common/recipes-extended/dpdk/dpdk.inc index 59946cfb..3106959e 100644 --- a/meta-isg/common/recipes-extended/dpdk/dpdk.inc +++ b/meta-isg/common/recipes-extended/dpdk/dpdk.inc @@ -66,6 +66,15 @@ do_configure () { ############################################################# unset prefix + # Fix-up CONFIG_RTE_MACHINE based on target machine + sed -e "s#CONFIG_RTE_MACHINE=\"native\"#CONFIG_RTE_MACHINE=\"${DPDK_TARGET_MACH}\"#" -i ${S}/config/defconfig_x86_64-native-linuxapp-gcc + sed -e "s#CONFIG_RTE_MACHINE=\"native\"#CONFIG_RTE_MACHINE=\"${DPDK_TARGET_MACH}\"#" -i ${S}/config/defconfig_i686-native-linuxapp-gcc + + # Fix-up vhost configs based on package config + sed -e "s#CONFIG_RTE_KNI_VHOST=n#CONFIG_RTE_KNI_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp + sed -e "s#CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=n#CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp + sed -e "s#CONFIG_RTE_LIBRTE_VHOST=n#CONFIG_RTE_LIBRTE_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp + make O=$RTE_TARGET T=$RTE_TARGET config } -- cgit v1.2.3-54-g00ecf From ca1e771363d3f80317f31b30509a6a238e096699 Mon Sep 17 00:00:00 2001 From: WU CHIA CHUAN Date: Tue, 28 Jul 2015 16:05:10 +0800 Subject: meta-isg: dpdk v2.0.0: add patch to handle ip_fragmentation application dpdk v2.0.0 required "CONFIG_RTE_IP_FRAG=y" in order to build ip_fragmentation application. Signed-off-by: WU CHIA CHUAN Signed-off-by: Darren Hart --- ...nable-ip_fragmentation-in-common_linuxapp.patch | 31 ++++++++++++++++++++++ .../common/recipes-extended/dpdk/dpdk_2.0.0.bb | 3 +++ 2 files changed, 34 insertions(+) create mode 100644 meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-dpdk-enable-ip_fragmentation-in-common_linuxapp.patch diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-dpdk-enable-ip_fragmentation-in-common_linuxapp.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-dpdk-enable-ip_fragmentation-in-common_linuxapp.patch new file mode 100644 index 00000000..c4c683e8 --- /dev/null +++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-2.0.0-dpdk-enable-ip_fragmentation-in-common_linuxapp.patch @@ -0,0 +1,31 @@ +From ebf07e9708c96aa1e655127175c39ad6ae3fc5ae Mon Sep 17 00:00:00 2001 +From: WU CHIA CHUAN +Date: Tue, 28 Jul 2015 13:12:21 +0800 +Subject: [PATCH] dpdk enable ip_fragmentation in common_linuxapp config + +Upstream-Status: Inappropriate [Configuration] + +Signed-off-by: WU CHIA CHUAN +--- + config/common_linuxapp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/config/common_linuxapp b/config/common_linuxapp +index 0b25f34..8cd97d7 100644 +--- a/config/common_linuxapp ++++ b/config/common_linuxapp +@@ -354,6 +354,11 @@ CONFIG_RTE_MAX_LCORE_FREQS=64 + CONFIG_RTE_LIBRTE_NET=y + + # ++# Compile ip_fragmentation ++# ++CONFIG_RTE_IP_FRAG=y ++ ++# + # Compile librte_ip_frag + # + CONFIG_RTE_LIBRTE_IP_FRAG=y +-- +1.9.1 + 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 0e9350b1..cb1b1d3f 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 @@ -1,5 +1,8 @@ include dpdk.inc +SRC_URI += "file://dpdk-2.0.0-dpdk-enable-ip_fragmentation-in-common_linuxapp.patch \ + " + SRC_URI[dpdk.md5sum] = "e9e7935c9eec920841ad373949514934" SRC_URI[dpdk.sha256sum] = "643789a3be5ba44dd84d6b248cdf5471b260f8736dada177dadf076aebfbff3f" -- cgit v1.2.3-54-g00ecf From 76526b2b28b4e840e9a8b83840433de53e7f0e59 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Tue, 28 Jul 2015 16:05:11 +0800 Subject: meta-isg: fix build of dpdk_qat example app Make sure that the dpdk_qat example app builds okay when enabled using PACKAGECONFIG ?= " dpdk_qat". Added a patch to dpdk_qat makefile to point to correct location of qat libs and headers. Signed-off-by: Anuj Mittal Signed-off-by: Darren Hart --- meta-isg/common/recipes-extended/dpdk/dpdk.inc | 2 + ...0-point-to-the-right-include-and-lib-path.patch | 43 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-and-2.0.0-point-to-the-right-include-and-lib-path.patch diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk.inc b/meta-isg/common/recipes-extended/dpdk/dpdk.inc index 3106959e..4b1a0c6e 100644 --- a/meta-isg/common/recipes-extended/dpdk/dpdk.inc +++ b/meta-isg/common/recipes-extended/dpdk/dpdk.inc @@ -7,6 +7,7 @@ SRC_URI = "http://dpdk.org/browse/dpdk/snapshot/dpdk-${PV}.tar.gz;name=dpdk \ file://dpdk-1.8.0-and-2.0.0-examples-add-config-variable-to-enable-disable-dpdk.patch \ file://dpdk-1.8.0-and-2.0.0-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \ file://dpdk-1.8.0-and-2.0.0-add-sysroot-option-within-app-makefile.patch \ + file://dpdk-1.8.0-and-2.0.0-point-to-the-right-include-and-lib-path.patch \ " # dpdk example apps dpdk_qat and vhost have dependancy on fuse and qat. @@ -40,6 +41,7 @@ export RTE_KERNELDIR_OUT = "${STAGING_KERNEL_BUILDDIR}" export INSTALL_PATH = "${prefix}/dpdk" export SYSROOTPATH = "--sysroot=${STAGING_DIR_HOST}" export DPDK_TARGET_MACH = "${@get_dpdk_target_mach(bb,d)}" +export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac" # The list of intel Comms platforms and their target machine # process mapping. The supported target machine is listed under diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-and-2.0.0-point-to-the-right-include-and-lib-path.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-and-2.0.0-point-to-the-right-include-and-lib-path.patch new file mode 100644 index 00000000..75bb517d --- /dev/null +++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-and-2.0.0-point-to-the-right-include-and-lib-path.patch @@ -0,0 +1,43 @@ +From 928595c80ae28d19861d7e76ed898a8fb3f2c1dc Mon Sep 17 00:00:00 2001 +From: Anuj Mittal +Date: Fri, 24 Jul 2015 23:57:17 +0800 +Subject: [PATCH] dpdk: point to the right include and lib path + +Upstream-Status: Inappropriate [Configuration] + +Make sure that we point to the right location of qat +lac headers and library. + +Signed-off-by: Anuj Mittal +--- + examples/dpdk_qat/Makefile | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/examples/dpdk_qat/Makefile b/examples/dpdk_qat/Makefile +index f1e06a1..5b906f7 100644 +--- a/examples/dpdk_qat/Makefile ++++ b/examples/dpdk_qat/Makefile +@@ -66,18 +66,15 @@ SRCS-y := main.c crypto.c + + CFLAGS += -O3 + CFLAGS += $(WERROR_FLAGS) +-CFLAGS += -I$(ICP_ROOT)/quickassist/include \ +- -I$(ICP_ROOT)/quickassist/include/lac \ +- -I$(ICP_ROOT)/quickassist/lookaside/access_layer/include ++CFLAGS += -I$(ICP_LAC_API_DIR) + + # From CRF 1.2 driver, library was renamed to libicp_qa_al.a + ifneq ($(wildcard $(ICP_ROOT)/build/icp_qa_al.a),) + ICP_LIBRARY_PATH = $(ICP_ROOT)/build/icp_qa_al.a + else +-ICP_LIBRARY_PATH = $(ICP_ROOT)/build/libicp_qa_al.a ++ICP_LIBRARY_PATH = $(ICP_LIB_ROOT)/libicp_qa_al.a + endif + +-LDLIBS += -L$(ICP_ROOT)/build + LDLIBS += $(ICP_LIBRARY_PATH) \ + -lz \ + -losal \ +-- +1.7.9.5 + -- cgit v1.2.3-54-g00ecf From 1c2ed5ec2ea47d9873e362895e37e780b8f2ef88 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Tue, 28 Jul 2015 16:05:12 +0800 Subject: meta-crystalforest: add virtual/qat provider Changed qat16 to PROVIDES "virtual/qat" so we can switch between qat16 and any future revisions of qat for supported platforms. Signed-off-by: Anuj Mittal Signed-off-by: Darren Hart --- meta-crystalforest/recipes-extended/qat/qat16_2.3.0-34.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-crystalforest/recipes-extended/qat/qat16_2.3.0-34.bb b/meta-crystalforest/recipes-extended/qat/qat16_2.3.0-34.bb index e6556cbe..83ccbfb1 100644 --- a/meta-crystalforest/recipes-extended/qat/qat16_2.3.0-34.bb +++ b/meta-crystalforest/recipes-extended/qat/qat16_2.3.0-34.bb @@ -9,6 +9,8 @@ LIC_FILES_CHKSUM = "\ " PV = "2.3.0-34" DEPENDS += "zlib openssl" +PROVIDES += "virtual/qat" + SRC_URI="https://01.org/sites/default/files/page/qatmux.l.${PV}.tgz;name=qat \ file://qat16_2.3.0-34-qat-add-install-target-to-makefiles.patch \ file://qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch \ -- cgit v1.2.3-54-g00ecf From 4f4eb56d302e8b5caaf2d4ea849c589144efad6c Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Tue, 28 Jul 2015 16:05:13 +0800 Subject: meta-crystalforest: zlib-qat depends on virtual/qat Made zlib-qat DEPENDS on virtual/qat. This allows us to switch between highland forest and crystal forest platforms. Signed-off-by: Anuj Mittal Acked-by: Ong Boon Leong Signed-off-by: Darren Hart (cherry picked from commit 11cbe728ec6ce65ea8df08752cb6b0cabed62da0 from dizzy) Signed-off-by: Anuj Mittal Signed-off-by: Darren Hart --- meta-crystalforest/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-crystalforest/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb b/meta-crystalforest/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb index e2d2c451..eb209b1b 100644 --- a/meta-crystalforest/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb +++ b/meta-crystalforest/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/zlib-${ZLIB_VERSION}/zlib.h;beginline=4;en # For target side versions of openssl enable support for OCF Linux driver # if they are available. -DEPENDS += "cryptodev-linux pkgconfig qat16" +DEPENDS += "cryptodev-linux pkgconfig virtual/qat" SRC_URI = "http://www.zlib.net/zlib-${ZLIB_VERSION}.tar.gz;name=zlib \ https://01.org/sites/default/files/page/zlib_shim_0.4.7-002_withdocumentation.zip;name=zlibqat \ -- cgit v1.2.3-54-g00ecf From f734ad96d3050f6306a9f9d12e4f12d863c08fbb Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Tue, 28 Jul 2015 16:05:14 +0800 Subject: meta-isg: make dpdk_qat dependent on virtual/qat Make sure that we check for the right qat package when enabling dpdk_qat example. The qat package name has been changed to "virtual/qat" to enable switching between different/future versions of qat for supported platforms. The preferred version of "virtual/qat" can be set in machine conf when some other version, besides qat16, becomes available and needs to be supported. Signed-off-by: Anuj Mittal Signed-off-by: Darren Hart --- meta-isg/common/recipes-extended/dpdk/dpdk.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk.inc b/meta-isg/common/recipes-extended/dpdk/dpdk.inc index 4b1a0c6e..1bd2a26e 100644 --- a/meta-isg/common/recipes-extended/dpdk/dpdk.inc +++ b/meta-isg/common/recipes-extended/dpdk/dpdk.inc @@ -16,7 +16,7 @@ SRC_URI = "http://dpdk.org/browse/dpdk/snapshot/dpdk-${PV}.tar.gz;name=dpdk \ # To enable, uncomment the below line or include in .bbappend. # PACKAGECONFIG ?= " dpdk_qat vhost libvirt" -PACKAGECONFIG[dpdk_qat] = ",,qat" +PACKAGECONFIG[dpdk_qat] = ",,virtual/qat" PACKAGECONFIG[vhost] = ",,fuse" PACKAGECONFIG[libvirt] = ",,libvirt" -- cgit v1.2.3-54-g00ecf From 3577c351cd82fabd95fb3520c3e4d5809091cb30 Mon Sep 17 00:00:00 2001 From: Ong Boon Leong Date: Fri, 24 Jul 2015 07:48:37 +0800 Subject: meta-crystalforest: add in clarity around how to pick the right QAT version Add explanation on how to override the default setting under crystalforest.conf on PREFERRED_PROVIDER_virtual/qat. Signed-off-by: Ong Boon Leong Signed-off-by: Darren Hart --- meta-crystalforest/README | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/meta-crystalforest/README b/meta-crystalforest/README index 2053a3c2..f549f907 100644 --- a/meta-crystalforest/README +++ b/meta-crystalforest/README @@ -204,12 +204,37 @@ Note: qat16 recipe is meant for platform with Coleto Creek chipset. qat15 recipe is meant for platform with Cave Creek chipset. +conf/machine/crystalforest.conf is the common machine configuration +to support Crystal Forest/server, Crystal Forest/gladden, Highland Forest and +River Forest. In order to generate the right binary for these platforms which +have different QAT technology, user could change the default config accordingly +within crystalforest.conf as below: + +For Coleto Creek chipset: +PREFERRED_PROVIDER_virtual/qat ?= "qat16" + +For Cave Creek chipset: +PREFERRED_PROVIDER_virtual/qat ?= "qat15" + +Another option and preferred approach for above setting is to override +configuration under build/conf/local.conf as follow: + +For Coleto Creek chipset: +PREFERRED_PROVIDER_virtual/qat = "qat16" + +For Cave Creek chipset: +PREFERRED_PROVIDER_virtual/qat = "qat15" + By default, the machine configuration does not assume that the above ingredients are pre-installed onto the BSP. Developers are required to either use smart tool to install those software packages or configure IMAGE_INSTALL under build/conf/local.conf, for example. +For Coleto Creek chipset: IMAGE_INSTALL += "dpdk qat16 zlib-qat" +For Cavecreek Creek chipset: +IMAGE_INSTALL += "dpdk qat15 zlib-qat" + The list of packages can be searched under tmp/deploy/ folder. -- cgit v1.2.3-54-g00ecf