[meta-intel] [PATCH 2/3] dpdk: Move BSP specific configurations from recipes to machine.conf

Mark Hatle mark.hatle at windriver.com
Mon Sep 25 10:38:21 PDT 2017


The COMPATIBLE_MACHINE entry for dpdk recipes is set to 'null'.  This
will prevent arbitrary machines from trying to use the dpdk functionality.

A compatible MACHINE must define itself as such for the dpdk recipes.  Also
the BSP aware target machine was similarly moved to the BSP.  Embedding BSP
specific knowledge into the recipe will cause the recipe to slowly get out
of date.

Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
---
 conf/machine/intel-corei7-64.conf                      |  5 +++++
 .../dpdk-dev-libibverbs_1.2.1-3.4-2.0.0.0.bb           |  5 ++++-
 meta-dpdk/recipes-extended/dpdk/dpdk.inc               | 18 +++++++-----------
 3 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/conf/machine/intel-corei7-64.conf b/conf/machine/intel-corei7-64.conf
index a8097fc..e396982 100644
--- a/conf/machine/intel-corei7-64.conf
+++ b/conf/machine/intel-corei7-64.conf
@@ -16,6 +16,11 @@ MACHINE_HWCODECS ?= "va-intel gstreamer1.0-vaapi"
 
 MACHINE_EXTRA_RRECOMMENDS += "lms8"
 
+# Enable optional dpdk:
+COMPATIBLE_MACHINE_pn-dpdk = "intel-corei7-64"
+COMPATIBLE_MACHINE_pn-dpdk-dev-libibverbs = "intel-corei7-64"
+DPDK_TARGET_MACHINE ?= "atm"
+
 XSERVER ?= "${XSERVER_X86_BASE} \
             ${XSERVER_X86_EXT} \
             ${XSERVER_X86_FBDEV} \
diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/dpdk-dev-libibverbs_1.2.1-3.4-2.0.0.0.bb b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/dpdk-dev-libibverbs_1.2.1-3.4-2.0.0.0.bb
index c06cceb..e40c63b 100644
--- a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/dpdk-dev-libibverbs_1.2.1-3.4-2.0.0.0.bb
+++ b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/dpdk-dev-libibverbs_1.2.1-3.4-2.0.0.0.bb
@@ -14,7 +14,10 @@ SRC_URI = "https://github.com/Mellanox/dpdk-dev-libibverbs/archive/libibverbs-${
 SRC_URI[dpdk-dev-libibverbs.md5sum] = "65234ee278eb437a7069326f37cd4d86"
 SRC_URI[dpdk-dev-libibverbs.sha256sum] = "a6471515556cb8d10ad471bb7efb8cf760b248a28aceb57d4534d50d572f56cd"
 
-COMPATIBLE_MACHINE = "intel-corei7-64"
+# A machine needs to enable this using:
+# COMPATIBLE_MACHINE_pn-dpdk-dev-libibverbs = "<machine name>"
+
+COMPATIBLE_MACHINE = "null"
 COMPATIBLE_HOST_libc-musl_class-target = "null"
 
 S = "${WORKDIR}/${PN}-libibverbs-${PV}"
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk.inc b/meta-dpdk/recipes-extended/dpdk/dpdk.inc
index ba38267..c1d0149 100644
--- a/meta-dpdk/recipes-extended/dpdk/dpdk.inc
+++ b/meta-dpdk/recipes-extended/dpdk/dpdk.inc
@@ -12,7 +12,10 @@ SRC_URI = "http://fast.dpdk.org/rel/${BP}.tar.gz;name=dpdk \
 	   file://dpdk-17.02-dpdk-fix-installation-warning-and-issue.patch \
 	  "
 
-COMPATIBLE_MACHINE = "intel-corei7-64"
+# A machine needs to enable this using:
+# COMPATIBLE_MACHINE_pn-dpdk-dev-libibverbs = "<machine name>"
+
+COMPATIBLE_MACHINE = "null"
 COMPATIBLE_HOST_libc-musl_class-target = "null"
 
 
@@ -55,16 +58,9 @@ export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac"
 # process mapping. The supported target machine is listed under
 # dpdk/mk/machine
 def get_dpdk_target_mach(bb, d):
-    target_arch = d.getVar('MACHINE_ARCH', True)
-    multiarch_options = {
-        "mohonpeak64":    "atm",
-        "mohonpeak32":    "atm",
-        "crystalforest":  "ivb",
-        "intel_corei7_64": "atm",
-    }
-
-    if target_arch in multiarch_options :
-            return multiarch_options[target_arch]
+    target_arch = d.getVar('DPDK_TARGET_MACHINE', True)
+    if target_arch:
+            target_arch
     return "default"
 
 do_configure () {
-- 
1.8.3.1



More information about the meta-intel mailing list