diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2014-11-06 07:05:52 -0600 |
---|---|---|
committer | Tom Zanussi <tom.zanussi@linux.intel.com> | 2014-11-06 10:55:26 -0600 |
commit | 0f6d30a95c84ec239f5a30bbfba17ed42e2cf284 (patch) | |
tree | 768a8dc74cb17cdfa009ba12c241c5fd4f68751c /meta-romley/recipes-extended | |
parent | 567358dae4a005e09b37311beed78ca923cb4aad (diff) | |
download | meta-intel-0f6d30a95c84ec239f5a30bbfba17ed42e2cf284.tar.gz |
common: Remove DPDK recipes2.0-rc4-dizzy-1.72.0-dizzy-1.7
Move the DPDK recipes out of common/ and into meta-romley/.
The DPDK recipes have so far been shown to be broken for any other
machine than Romley or for any other kernel version than the kernel
Romley is still using, 3.10.
So the logical place for them to live would be in meta-romley, if
anywhere.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Acked-by: Burton, Ross <ross.burton@intel.com>
Diffstat (limited to 'meta-romley/recipes-extended')
10 files changed, 849 insertions, 0 deletions
diff --git a/meta-romley/recipes-extended/dpdk/dpdk.inc b/meta-romley/recipes-extended/dpdk/dpdk.inc new file mode 100644 index 00000000..0547c7e8 --- /dev/null +++ b/meta-romley/recipes-extended/dpdk/dpdk.inc | |||
@@ -0,0 +1,140 @@ | |||
1 | DESCRIPTION = "Intel(r) Data Plane Development Kit" | ||
2 | HOMEPAGE = "http://dpdk.org" | ||
3 | LICENSE = "BSD & LGPLv2 & GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe" | ||
5 | |||
6 | COMPATIBLE_MACHINE = "romley|romley-ivb" | ||
7 | |||
8 | RDEPENDS_${PN} += "python-subprocess" | ||
9 | |||
10 | inherit module | ||
11 | |||
12 | export MODULE_DIR="/lib/modules/${KERNEL_VERSION}/kernel/drivers/net" | ||
13 | export RTE_SDK = "${S}" | ||
14 | export RTE_TARGET="${TARGET_ARCH}-ivshmem-${TARGET_OS}app-gcc" | ||
15 | export ICP_ROOT = "${PKG_CONFIG_SYSROOT_DIR}/usr/include" | ||
16 | export ICP_LIB_ROOT= "${PKG_CONFIG_SYSROOT_DIR}/usr/lib" | ||
17 | export RTE_KERNELDIR = "${STAGING_KERNEL_DIR}" | ||
18 | export INSTALL_PATH = "${prefix}/dpdk" | ||
19 | |||
20 | |||
21 | do_configure () { | ||
22 | ############################################################# | ||
23 | ### default value for prefix is "usr", unsetting it, so it | ||
24 | ### will not be concatenated in ${RTE_TARGET}/Makefile | ||
25 | ### which will cause compilation failure | ||
26 | ############################################################# | ||
27 | unset prefix | ||
28 | |||
29 | make O=$RTE_TARGET T=$RTE_TARGET config | ||
30 | |||
31 | } | ||
32 | |||
33 | |||
34 | do_compile () { | ||
35 | unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS | ||
36 | |||
37 | cd ${S}/${RTE_TARGET} | ||
38 | oe_runmake EXTRA_LDFLAGS=" --sysroot=${STAGING_DIR_HOST}" \ | ||
39 | EXTRA_CFLAGS=" --sysroot=${STAGING_DIR_HOST}" \ | ||
40 | CROSS="${TARGET_PREFIX}" \ | ||
41 | prefix="" LDFLAGS="" WERROR_FLAGS="-w" V=1 | ||
42 | |||
43 | } | ||
44 | |||
45 | |||
46 | do_install () { | ||
47 | |||
48 | install -m 0755 -d ${D}/${INSTALL_PATH} \ | ||
49 | ${D}/${INSTALL_PATH}/doc \ | ||
50 | ${D}/${INSTALL_PATH}/tools \ | ||
51 | ${D}/${INSTALL_PATH}/${RTE_TARGET} \ | ||
52 | ${D}/${INSTALL_PATH}/${RTE_TARGET}/app \ | ||
53 | ${D}${includedir} \ | ||
54 | ${D}${includedir}/arch \ | ||
55 | ${D}${includedir}/exec-env \ | ||
56 | ${D}${libdir} \ | ||
57 | ${D}${MODULE_DIR} | ||
58 | |||
59 | install -m 0755 ${S}/${RTE_TARGET}/kmod/igb_uio.ko ${D}${MODULE_DIR}/ | ||
60 | install -m 0755 ${S}/${RTE_TARGET}/kmod/rte_kni.ko ${D}${MODULE_DIR}/ | ||
61 | |||
62 | install -m 640 ${S}/${RTE_TARGET}/lib/*.a ${D}${libdir} | ||
63 | |||
64 | install -m 640 ${S}/${RTE_TARGET}/.config ${D}/${INSTALL_PATH}/${RTE_TARGET}/ | ||
65 | install -m 640 ${S}/${RTE_TARGET}/include/*.h ${D}${includedir}/ | ||
66 | install -m 640 ${S}/${RTE_TARGET}/include/arch/* ${D}${includedir}/arch/ | ||
67 | install -m 640 ${S}/${RTE_TARGET}/include/exec-env/* ${D}${includedir}/exec-env/ | ||
68 | install -m 0755 ${S}/tools/*.py ${D}/${INSTALL_PATH}/tools/ | ||
69 | |||
70 | |||
71 | #Install test applications | ||
72 | install -m 0755 ${S}/${RTE_TARGET}/app/test ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
73 | install -m 0755 ${S}/${RTE_TARGET}/app/testpmd ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
74 | install -m 0755 ${S}/${RTE_TARGET}/app/dump_cfg ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
75 | install -m 0755 ${S}/${RTE_TARGET}/app/cmdline_test ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
76 | |||
77 | |||
78 | # Install example applications | ||
79 | # It is expected that user of this include file should define EXAMPLES_BUILD_DIR | ||
80 | for app in ${S}/examples/* | ||
81 | do | ||
82 | case `basename ${app}` in | ||
83 | "dpdk_qat" | "vhost" | "vhost_xen" | "Makefile" ) continue | ||
84 | ;; | ||
85 | "l2fwd-ivshmem") | ||
86 | install -m 0755 ${app}/guest/${EXAMPLES_BUILD_DIR}/app/guest ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
87 | install -m 0755 ${app}/host/${EXAMPLES_BUILD_DIR}/app/host ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
88 | continue | ||
89 | ;; | ||
90 | "multi_process") | ||
91 | install -m 0755 ${app}/client_server_mp/mp_client/${EXAMPLES_BUILD_DIR}/app/mp_client ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
92 | install -m 0755 ${app}/client_server_mp/mp_server/${EXAMPLES_BUILD_DIR}/app/mp_server ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
93 | install -m 0755 ${app}/simple_mp/${EXAMPLES_BUILD_DIR}/app/simple_mp ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
94 | install -m 0755 ${app}/symmetric_mp/${EXAMPLES_BUILD_DIR}/app/symmetric_mp ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
95 | continue | ||
96 | ;; | ||
97 | "netmap_compat") | ||
98 | install -m 0755 ${app}/bridge/${EXAMPLES_BUILD_DIR}/app/bridge ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
99 | continue | ||
100 | ;; | ||
101 | "quota_watermark") | ||
102 | install -m 0755 ${app}/qw/${EXAMPLES_BUILD_DIR}/app/qw ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
103 | install -m 0755 ${app}/qwctl/${EXAMPLES_BUILD_DIR}/app/qwctl ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
104 | continue | ||
105 | ;; | ||
106 | "vmdq") | ||
107 | install -m 0755 ${app}/${EXAMPLES_BUILD_DIR}/app/`basename ${app}`_app ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
108 | continue | ||
109 | ;; | ||
110 | "vmdq_dcb") | ||
111 | install -m 0755 ${app}/${EXAMPLES_BUILD_DIR}/app/`basename ${app}`_app ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
112 | continue | ||
113 | ;; | ||
114 | esac | ||
115 | |||
116 | install -m 0755 ${app}/${EXAMPLES_BUILD_DIR}/app/`basename ${app}` ${D}/${INSTALL_PATH}/${RTE_TARGET}/app | ||
117 | done | ||
118 | } | ||
119 | |||
120 | PACKAGES += "${PN}-examples" | ||
121 | |||
122 | FILES_${PN}-dbg += " \ | ||
123 | ${INSTALL_PATH}/.debug \ | ||
124 | ${INSTALL_PATH}/${RTE_TARGET}/app/.debug \ | ||
125 | " | ||
126 | |||
127 | FILES_${PN}-doc += "\ | ||
128 | ${INSTALL_PATH}/doc \ | ||
129 | " | ||
130 | |||
131 | FILES_${PN}-dev += " \ | ||
132 | ${INSTALL_PATH}/${RTE_TARGET}/.config \ | ||
133 | ${includedir} \ | ||
134 | ${includedir}/arch \ | ||
135 | ${includedir}/exec-env \ | ||
136 | " | ||
137 | |||
138 | FILES_${PN} += " ${INSTALL_PATH}/tools/ " | ||
139 | |||
140 | FILES_${PN}-examples += " ${INSTALL_PATH}/${RTE_TARGET}/app/ " | ||
diff --git a/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-app-test-fix-build-switches-to-enable-cmdline-tests.patch b/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-app-test-fix-build-switches-to-enable-cmdline-tests.patch new file mode 100644 index 00000000..87d2ef77 --- /dev/null +++ b/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-app-test-fix-build-switches-to-enable-cmdline-tests.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From cf953d2bfa7df9aa67459b333db4d4d8a9e72fd6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Thomas Monjalon <thomas.monjalon@6wind.com> | ||
3 | Date: Fri, 27 Jun 2014 11:21:11 +0200 | ||
4 | Subject: [PATCH] app/test: fix build switches to enable cmdline tests | ||
5 | |||
6 | Upstream-Status: backport | ||
7 | Imported patch from: http://dpdk.org/browse/dpdk/log/ | ||
8 | |||
9 | There were 2 typos since these commits (in 1.6.0 releases): | ||
10 | 21a7f4e264 fix build without librte_cmdline | ||
11 | cac6d08c8b replace --use-device option by --pci-whitelist and --vdev | ||
12 | In makefiles, the build options are prefixed with CONFIG_RTE_ | ||
13 | but in .c file, it is only RTE_. | ||
14 | |||
15 | These typos were disabling cmdline unit tests and test of "--vdev eth_ring" option. | ||
16 | |||
17 | Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> | ||
18 | Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> | ||
19 | Signed-off-by: Chan Wei Sern <wei.sern.chan@intel.com> | ||
20 | --- | ||
21 | app/test/test_cmdline.c | 2 +- | ||
22 | app/test/test_eal_flags.c | 2 +- | ||
23 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
24 | |||
25 | diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c | ||
26 | index 77475c4..10a3f77 100644 | ||
27 | --- a/app/test/test_cmdline.c | ||
28 | +++ b/app/test/test_cmdline.c | ||
29 | @@ -39,7 +39,7 @@ | ||
30 | int | ||
31 | test_cmdline(void) | ||
32 | { | ||
33 | -#ifdef CONFIG_RTE_LIBRTE_CMDLINE | ||
34 | +#ifdef RTE_LIBRTE_CMDLINE | ||
35 | printf("Testind parsing ethernet addresses...\n"); | ||
36 | if (test_parse_etheraddr_valid() < 0) | ||
37 | return -1; | ||
38 | diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c | ||
39 | index a862654..1b80b80 100644 | ||
40 | --- a/app/test/test_eal_flags.c | ||
41 | +++ b/app/test/test_eal_flags.c | ||
42 | @@ -317,7 +317,7 @@ test_whitelist_flag(void) | ||
43 | const char *wlval3[] = {prgname, prefix, mp_flag, "-n", "1", "-c", "1", | ||
44 | pci_whitelist, "09:0B.3,type=test", | ||
45 | pci_whitelist, "08:00.1,type=normal", | ||
46 | -#ifdef CONFIG_RTE_LIBRTE_PMD_RING | ||
47 | +#ifdef RTE_LIBRTE_PMD_RING | ||
48 | vdev, "eth_ring,arg=test", | ||
49 | #endif | ||
50 | }; | ||
51 | -- | ||
52 | 1.9.1 | ||
53 | |||
diff --git a/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-eal-fix-option-base-virtaddr.patch b/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-eal-fix-option-base-virtaddr.patch new file mode 100644 index 00000000..e724591e --- /dev/null +++ b/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-eal-fix-option-base-virtaddr.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From be1816f59e772e427fc5815281f9458a9314973a Mon Sep 17 00:00:00 2001 | ||
2 | From: Pablo de Lara <pablo.de.lara.guarch@intel.com> | ||
3 | Date: Thu, 19 Jun 2014 16:35:22 +0100 | ||
4 | Subject: [PATCH] eal: fix option --base-virtaddr | ||
5 | |||
6 | Upstream-Status: backport | ||
7 | Imported patch from: http://dpdk.org/browse/dpdk/log/ | ||
8 | |||
9 | When parsing EAL option --base-virtaddr | ||
10 | errno was not being set to 0 before calling strtoull, | ||
11 | therefore function might fail unnecesarily. | ||
12 | |||
13 | Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> | ||
14 | Signed-off-by: Aaron Campbell <aaron@arbor.net> | ||
15 | Acked-by: Anatoly Burakov <anatoly.burakov@intel.com> | ||
16 | Signed-off-by: Chan Wei Sern <wei.sern.chan@intel.com> | ||
17 | --- | ||
18 | lib/librte_eal/linuxapp/eal/eal.c | 1 + | ||
19 | 1 file changed, 1 insertion(+) | ||
20 | |||
21 | diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c | ||
22 | index 6994303..d204387 100644 | ||
23 | --- a/lib/librte_eal/linuxapp/eal/eal.c | ||
24 | +++ b/lib/librte_eal/linuxapp/eal/eal.c | ||
25 | @@ -562,6 +562,7 @@ eal_parse_base_virtaddr(const char *arg) | ||
26 | char *end; | ||
27 | uint64_t addr; | ||
28 | |||
29 | + errno = 0; | ||
30 | addr = strtoull(arg, &end, 16); | ||
31 | |||
32 | /* check for errors */ | ||
33 | -- | ||
34 | 1.9.1 | ||
35 | |||
diff --git a/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-examples-qos_sched-fix-makefile.patch b/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-examples-qos_sched-fix-makefile.patch new file mode 100644 index 00000000..47b5ece7 --- /dev/null +++ b/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-examples-qos_sched-fix-makefile.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From ea9a59b26c3c86b498337e968ee8f68c4e263614 Mon Sep 17 00:00:00 2001 | ||
2 | From: Olivier Matz <olivier.matz@6wind.com> | ||
3 | Date: Fri, 16 May 2014 10:18:59 +0200 | ||
4 | Subject: [PATCH] examples/qos_sched: fix makefile | ||
5 | |||
6 | Upstream-Status: backport | ||
7 | Imported patch from: http://dpdk.org/browse/dpdk/log/ | ||
8 | |||
9 | The example does not compile as the linker complains about duplicated | ||
10 | symbols. | ||
11 | |||
12 | Remove -lsched from LDLIBS, it is already present in rte.app.mk and | ||
13 | added by the DPDK framework automatically. | ||
14 | |||
15 | Signed-off-by: Olivier Matz <olivier.matz@6wind.com> | ||
16 | Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> | ||
17 | Signed-off-by: Chan Wei Sern <wei.sern.chan@intel.com> | ||
18 | --- | ||
19 | examples/qos_sched/Makefile | 2 -- | ||
20 | 1 file changed, 2 deletions(-) | ||
21 | |||
22 | diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile | ||
23 | index b91fe37..9366efe 100755 | ||
24 | --- a/examples/qos_sched/Makefile | ||
25 | +++ b/examples/qos_sched/Makefile | ||
26 | @@ -54,6 +54,4 @@ CFLAGS += $(WERROR_FLAGS) | ||
27 | CFLAGS_args.o := -D_GNU_SOURCE | ||
28 | CFLAGS_cfg_file.o := -D_GNU_SOURCE | ||
29 | |||
30 | -LDLIBS += -lrte_sched | ||
31 | - | ||
32 | include $(RTE_SDK)/mk/rte.extapp.mk | ||
33 | -- | ||
34 | 1.9.1 | ||
35 | |||
diff --git a/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-examples-Add-config-variables-to-enable-disable-dpdk.patch b/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-examples-Add-config-variables-to-enable-disable-dpdk.patch new file mode 100644 index 00000000..d0721ca0 --- /dev/null +++ b/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-examples-Add-config-variables-to-enable-disable-dpdk.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 63f8ccc5a305b193e219d288ef9e43b9a9fa6aa8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sreeju Selvaraj <sreeju.armughanx.selvaraj@intel.com> | ||
3 | Date: Wed, 17 Sep 2014 19:10:01 +0800 | ||
4 | Subject: [PATCH] examples: Add config variables to enable/disable dpdk_qat and | ||
5 | vhost | ||
6 | |||
7 | Upstream-Status: Inappropriate [configuration] | ||
8 | |||
9 | This can be used to export CONFIG_EXAMPLE_DPDK_QAT=n if dpdk_qat is not | ||
10 | in PACKAGECONFIG and also allow to export CONFIG_EXAMPLE_DPDK_VHOST=n | ||
11 | if vhost is not in PACKAGECONFIG. | ||
12 | |||
13 | Signed-off-by: Sreeju Selvaraj <sreeju.armughanx.selvaraj@intel.com> | ||
14 | --- | ||
15 | examples/Makefile | 4 ++-- | ||
16 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/examples/Makefile b/examples/Makefile | ||
19 | index d0624f6..885c938 100644 | ||
20 | --- a/examples/Makefile | ||
21 | +++ b/examples/Makefile | ||
22 | @@ -39,7 +39,7 @@ include $(RTE_SDK)/mk/rte.vars.mk | ||
23 | |||
24 | DIRS-y += cmdline | ||
25 | ifneq ($(ICP_ROOT),) | ||
26 | -DIRS-y += dpdk_qat | ||
27 | +DIRS-$(CONFIG_EXAMPLE_DPDK_QAT) += dpdk_qat | ||
28 | endif | ||
29 | DIRS-y += exception_path | ||
30 | DIRS-y += helloworld | ||
31 | @@ -61,7 +61,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_METER) += qos_meter | ||
32 | DIRS-$(CONFIG_RTE_LIBRTE_SCHED) += qos_sched | ||
33 | DIRS-y += quota_watermark | ||
34 | DIRS-y += timer | ||
35 | -DIRS-y += vhost | ||
36 | +DIRS-$(CONFIG_EXAMPLE_DPDK_VHOST) += vhost | ||
37 | DIRS-$(CONFIG_RTE_LIBRTE_XEN_DOM0) += vhost_xen | ||
38 | DIRS-y += vmdq | ||
39 | DIRS-y += vmdq_dcb | ||
40 | -- | ||
41 | 1.9.1 | ||
42 | |||
diff --git a/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-examples-pipeline-build-with-all-examples.patch b/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-examples-pipeline-build-with-all-examples.patch new file mode 100644 index 00000000..25f029fe --- /dev/null +++ b/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-examples-pipeline-build-with-all-examples.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 15aef6e666ee2eb0befa153d277d47754f3656e4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Thomas Monjalon <thomas.monjalon@6wind.com> | ||
3 | Date: Thu, 17 Jul 2014 10:30:52 +0200 | ||
4 | Subject: [PATCH] examples/pipeline: build with all examples | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | Imported patch from: http://dpdk.org/browse/dpdk/log/ | ||
8 | |||
9 | When adding this packet framework sample (commit 77a3346), | ||
10 | it has been forgotten to add it into the global makefile for | ||
11 | "make examples". | ||
12 | |||
13 | Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> | ||
14 | (cherry picked from commit a6664a09a7caa5e63f9ae625cf1946b0eef7794e) | ||
15 | Signed-off-by: Sreeju Selvaraj <sreeju.armughanx.selvaraj@intel.com> | ||
16 | --- | ||
17 | examples/Makefile | 1 + | ||
18 | 1 file changed, 1 insertion(+) | ||
19 | |||
20 | diff --git a/examples/Makefile b/examples/Makefile | ||
21 | index 885c938..1788d6e 100644 | ||
22 | --- a/examples/Makefile | ||
23 | +++ b/examples/Makefile | ||
24 | @@ -43,6 +43,7 @@ DIRS-$(CONFIG_EXAMPLE_DPDK_QAT) += dpdk_qat | ||
25 | endif | ||
26 | DIRS-y += exception_path | ||
27 | DIRS-y += helloworld | ||
28 | +DIRS-y += ip_pipeline | ||
29 | DIRS-y += ip_reassembly | ||
30 | DIRS-$(CONFIG_RTE_MBUF_SCATTER_GATHER) += ip_fragmentation | ||
31 | DIRS-$(CONFIG_RTE_MBUF_SCATTER_GATHER) += ipv4_multicast | ||
32 | -- | ||
33 | 1.9.1 | ||
34 | |||
diff --git a/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-ring-remove-extra-devices-creation-with-vdev-option.patch b/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-ring-remove-extra-devices-creation-with-vdev-option.patch new file mode 100644 index 00000000..25a4ea80 --- /dev/null +++ b/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-ring-remove-extra-devices-creation-with-vdev-option.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 70d3d9a6757e0c56ad3c6da0292479433e16aed3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Pablo de Lara <pablo.de.lara.guarch@intel.com> | ||
3 | Date: Wed, 9 Jul 2014 15:35:35 +0100 | ||
4 | Subject: [PATCH] ring: remove extra devices creation with --vdev option | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | Imported patch from: http://dpdk.org/browse/dpdk/log/ | ||
8 | |||
9 | When passing extra arguments in EAL option --vdev, to create | ||
10 | ring ethdevs, API was creating three ethdevs, even if there | ||
11 | was just one argument, such as CREATE. | ||
12 | |||
13 | Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> | ||
14 | Acked-by: Neil Horman <nhorman@tuxdriver.com> | ||
15 | (cherry picked from commit 546afbc6827f9f0f7ed501d2af1fc51755e40224) | ||
16 | Signed-off-by: Sreeju Selvaraj <sreeju.armughanx.selvaraj@intel.com> | ||
17 | --- | ||
18 | lib/librte_pmd_ring/rte_eth_ring.c | 3 +-- | ||
19 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/lib/librte_pmd_ring/rte_eth_ring.c b/lib/librte_pmd_ring/rte_eth_ring.c | ||
22 | index 73c649e..4f1b6ed 100644 | ||
23 | --- a/lib/librte_pmd_ring/rte_eth_ring.c | ||
24 | +++ b/lib/librte_pmd_ring/rte_eth_ring.c | ||
25 | @@ -493,7 +493,6 @@ rte_pmd_ring_devinit(const char *name, const char *params) | ||
26 | eth_dev_ring_create(name, rte_socket_id(), DEV_CREATE); | ||
27 | return 0; | ||
28 | } else { | ||
29 | - eth_dev_ring_create(name, rte_socket_id(), DEV_CREATE); | ||
30 | ret = rte_kvargs_count(kvlist, ETH_RING_NUMA_NODE_ACTION_ARG); | ||
31 | info = rte_zmalloc("struct node_action_list", sizeof(struct node_action_list) + | ||
32 | (sizeof(struct node_action_pair) * ret), 0); | ||
33 | @@ -510,7 +509,7 @@ rte_pmd_ring_devinit(const char *name, const char *params) | ||
34 | goto out_free; | ||
35 | |||
36 | for (info->count = 0; info->count < info->total; info->count++) { | ||
37 | - eth_dev_ring_pair_create(name, info->list[info->count].node, | ||
38 | + eth_dev_ring_create(name, info->list[info->count].node, | ||
39 | info->list[info->count].action); | ||
40 | } | ||
41 | } | ||
42 | -- | ||
43 | 1.9.1 | ||
44 | |||
diff --git a/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-ring-simplify-unit-tests.patch b/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-ring-simplify-unit-tests.patch new file mode 100644 index 00000000..c17137b2 --- /dev/null +++ b/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-ring-simplify-unit-tests.patch | |||
@@ -0,0 +1,380 @@ | |||
1 | From 545a5fac5d6bd0b64693dfcb15b321280418ac13 Mon Sep 17 00:00:00 2001 | ||
2 | From: Pablo de Lara <pablo.de.lara.guarch@intel.com> | ||
3 | Date: Wed, 9 Jul 2014 15:35:36 +0100 | ||
4 | Subject: [PATCH] ring: simplify unit tests | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | Imported patch from: http://dpdk.org/browse/dpdk/log/ | ||
8 | |||
9 | As this unit test does not create devices anymore, | ||
10 | and uses devices created by EAL option --vdev, | ||
11 | there were unnecesary tests that were repeated, | ||
12 | so they have been removed. | ||
13 | |||
14 | So now there are three tests: | ||
15 | |||
16 | 1 - Test two devices that share a ring, one device | ||
17 | with just one RX queue and the other with one | ||
18 | TX queue. | ||
19 | |||
20 | 2 - Test a device connected to itself (loopback) by | ||
21 | a ring, with both RX and TX queue. | ||
22 | |||
23 | 3 - Test two devices that share a ring, but both devices | ||
24 | with RX and TX queue, so they can send packets to themselves | ||
25 | and to the other device. | ||
26 | |||
27 | Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> | ||
28 | Acked-by: Neil Horman <nhorman@tuxdriver.com> | ||
29 | (cherry picked from commit 572eb3cd834c5e21d7fa946432b89c1c9d63fe61) | ||
30 | Signed-off-by: Sreeju Selvaraj <sreeju.armughanx.selvaraj@intel.com> | ||
31 | --- | ||
32 | app/test/test_pmd_ring.c | 202 +++++++++++++++++------------------------------ | ||
33 | 1 file changed, 72 insertions(+), 130 deletions(-) | ||
34 | |||
35 | diff --git a/app/test/test_pmd_ring.c b/app/test/test_pmd_ring.c | ||
36 | index 0d3d95c..19ad0e9 100644 | ||
37 | --- a/app/test/test_pmd_ring.c | ||
38 | +++ b/app/test/test_pmd_ring.c | ||
39 | @@ -39,18 +39,13 @@ | ||
40 | #include <rte_eth_ring.h> | ||
41 | #include <rte_ethdev.h> | ||
42 | |||
43 | -/* two test rings, r1 is used by two ports, r2 just by one */ | ||
44 | -static struct rte_ring *r1[2], *r2; | ||
45 | - | ||
46 | static struct rte_mempool *mp; | ||
47 | -static uint8_t start_idx; /* will store the port id of the first of our new ports */ | ||
48 | - | ||
49 | -#define TX_PORT (uint8_t)(start_idx + 1) | ||
50 | -#define RX_PORT (uint8_t)(start_idx + 2) | ||
51 | -#define RXTX_PORT (uint8_t)(start_idx + 3) | ||
52 | -#define RXTX_PORT2 (uint8_t)(start_idx + 4) | ||
53 | -#define RXTX_PORT4 (uint8_t)(start_idx + 6) | ||
54 | -#define RXTX_PORT5 (uint8_t)(start_idx + 7) | ||
55 | + | ||
56 | +#define TX_PORT 0 | ||
57 | +#define RX_PORT 1 | ||
58 | +#define RXTX_PORT 2 | ||
59 | +#define RXTX_PORT2 3 | ||
60 | +#define RXTX_PORT3 4 | ||
61 | #define SOCKET0 0 | ||
62 | |||
63 | #define RING_SIZE 256 | ||
64 | @@ -86,7 +81,7 @@ test_ethdev_configure(void) | ||
65 | return -1; | ||
66 | } | ||
67 | if (rte_eth_dev_configure(RXTX_PORT, 1, 1, &null_conf) < 0) { | ||
68 | - printf("Configure failed for RX port\n"); | ||
69 | + printf("Configure failed for RXTX port\n"); | ||
70 | return -1; | ||
71 | } | ||
72 | |||
73 | @@ -250,197 +245,162 @@ test_stats_reset(void) | ||
74 | } | ||
75 | |||
76 | static int | ||
77 | -test_pmd_ring_init(void) | ||
78 | +test_pmd_ring_pair_create_attach(void) | ||
79 | { | ||
80 | - struct rte_eth_stats stats; | ||
81 | + struct rte_eth_stats stats, stats2; | ||
82 | struct rte_mbuf buf, *pbuf = &buf; | ||
83 | struct rte_eth_conf null_conf; | ||
84 | |||
85 | - printf("Testing ring pmd init\n"); | ||
86 | - | ||
87 | - if (RXTX_PORT2 >= RTE_MAX_ETHPORTS) { | ||
88 | + if ((RXTX_PORT2 >= RTE_MAX_ETHPORTS) || (RXTX_PORT3 >= RTE_MAX_ETHPORTS)) { | ||
89 | printf(" TX/RX port exceed max eth ports\n"); | ||
90 | return -1; | ||
91 | } | ||
92 | - if (rte_eth_dev_configure(RXTX_PORT2, 1, 1, &null_conf) < 0) { | ||
93 | + if ((rte_eth_dev_configure(RXTX_PORT2, 1, 1, &null_conf) < 0) | ||
94 | + || (rte_eth_dev_configure(RXTX_PORT3, 1, 1, &null_conf) < 0)) { | ||
95 | printf("Configure failed for RXTX port\n"); | ||
96 | return -1; | ||
97 | } | ||
98 | |||
99 | - if (rte_eth_tx_queue_setup(RXTX_PORT2, 0, RING_SIZE, SOCKET0, NULL) < 0) { | ||
100 | + if ((rte_eth_tx_queue_setup(RXTX_PORT2, 0, RING_SIZE, SOCKET0, NULL) < 0) | ||
101 | + || (rte_eth_tx_queue_setup(RXTX_PORT3, 0, RING_SIZE, SOCKET0, NULL) < 0)) { | ||
102 | printf("TX queue setup failed\n"); | ||
103 | return -1; | ||
104 | } | ||
105 | |||
106 | - if (rte_eth_rx_queue_setup(RXTX_PORT2, 0, RING_SIZE, SOCKET0, | ||
107 | - NULL, mp) < 0) { | ||
108 | + if ((rte_eth_rx_queue_setup(RXTX_PORT2, 0, RING_SIZE, SOCKET0, NULL, mp) < 0) | ||
109 | + || (rte_eth_rx_queue_setup(RXTX_PORT3, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)) { | ||
110 | printf("RX queue setup failed\n"); | ||
111 | return -1; | ||
112 | } | ||
113 | |||
114 | - if (rte_eth_dev_start(RXTX_PORT2) < 0) { | ||
115 | - printf("Error starting RX port\n"); | ||
116 | + if ((rte_eth_dev_start(RXTX_PORT2) < 0) | ||
117 | + || (rte_eth_dev_start(RXTX_PORT3) < 0)) { | ||
118 | + printf("Error starting RXTX port\n"); | ||
119 | return -1; | ||
120 | } | ||
121 | |||
122 | - /* send and receive 1 packet and check for stats update */ | ||
123 | + /* | ||
124 | + * send and receive 1 packet (RXTX_PORT2 -> RXTX_PORT3) | ||
125 | + * and check for stats update | ||
126 | + */ | ||
127 | if (rte_eth_tx_burst(RXTX_PORT2, 0, &pbuf, 1) != 1) { | ||
128 | printf("Error sending packet to RXTX port\n"); | ||
129 | return -1; | ||
130 | } | ||
131 | |||
132 | - if (rte_eth_rx_burst(RXTX_PORT2, 0, &pbuf, 1) != 1) { | ||
133 | + if (rte_eth_rx_burst(RXTX_PORT3, 0, &pbuf, 1) != 1) { | ||
134 | printf("Error receiving packet from RXTX port\n"); | ||
135 | return -1; | ||
136 | } | ||
137 | |||
138 | rte_eth_stats_get(RXTX_PORT2, &stats); | ||
139 | - if (stats.ipackets != 1 || stats.opackets != 1 || | ||
140 | + rte_eth_stats_get(RXTX_PORT3, &stats2); | ||
141 | + if (stats.ipackets != 0 || stats.opackets != 1 || | ||
142 | stats.ibytes != 0 || stats.obytes != 0 || | ||
143 | stats.ierrors != 0 || stats.oerrors != 0) { | ||
144 | printf("Error: RXTX port stats are not as expected\n"); | ||
145 | return -1; | ||
146 | } | ||
147 | |||
148 | - rte_eth_dev_stop(RXTX_PORT2); | ||
149 | - | ||
150 | - return 0; | ||
151 | -} | ||
152 | - | ||
153 | -static int | ||
154 | -test_pmd_ring_pair_create(void) | ||
155 | -{ | ||
156 | - struct rte_eth_stats stats, stats2; | ||
157 | - struct rte_mbuf buf, *pbuf = &buf; | ||
158 | - struct rte_eth_conf null_conf; | ||
159 | - | ||
160 | - if ((RXTX_PORT4 >= RTE_MAX_ETHPORTS) || (RXTX_PORT5 >= RTE_MAX_ETHPORTS)) { | ||
161 | - printf(" TX/RX port exceed max eth ports\n"); | ||
162 | - return -1; | ||
163 | - } | ||
164 | - if ((rte_eth_dev_configure(RXTX_PORT4, 1, 1, &null_conf) < 0) | ||
165 | - || (rte_eth_dev_configure(RXTX_PORT5, 1, 1, &null_conf) < 0)) { | ||
166 | - printf("Configure failed for RXTX port\n"); | ||
167 | - return -1; | ||
168 | - } | ||
169 | - | ||
170 | - if ((rte_eth_tx_queue_setup(RXTX_PORT4, 0, RING_SIZE, SOCKET0, NULL) < 0) | ||
171 | - || (rte_eth_tx_queue_setup(RXTX_PORT5, 0, RING_SIZE, SOCKET0, NULL) < 0)) { | ||
172 | - printf("TX queue setup failed\n"); | ||
173 | - return -1; | ||
174 | - } | ||
175 | - | ||
176 | - if ((rte_eth_rx_queue_setup(RXTX_PORT4, 0, RING_SIZE, SOCKET0, NULL, mp) < 0) | ||
177 | - || (rte_eth_rx_queue_setup(RXTX_PORT5, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)) { | ||
178 | - printf("RX queue setup failed\n"); | ||
179 | - return -1; | ||
180 | - } | ||
181 | - | ||
182 | - if ((rte_eth_dev_start(RXTX_PORT4) < 0) | ||
183 | - || (rte_eth_dev_start(RXTX_PORT5) < 0)) { | ||
184 | - printf("Error starting RXTX port\n"); | ||
185 | + if (stats2.ipackets != 1 || stats2.opackets != 0 || | ||
186 | + stats2.ibytes != 0 || stats2.obytes != 0 || | ||
187 | + stats2.ierrors != 0 || stats2.oerrors != 0) { | ||
188 | + printf("Error: RXTX port stats are not as expected\n"); | ||
189 | return -1; | ||
190 | } | ||
191 | |||
192 | - /* send and receive 1 packet and check for stats update */ | ||
193 | - if (rte_eth_tx_burst(RXTX_PORT4, 0, &pbuf, 1) != 1) { | ||
194 | + /* | ||
195 | + * send and receive 1 packet (RXTX_PORT3 -> RXTX_PORT2) | ||
196 | + * and check for stats update | ||
197 | + */ | ||
198 | + if (rte_eth_tx_burst(RXTX_PORT3, 0, &pbuf, 1) != 1) { | ||
199 | printf("Error sending packet to RXTX port\n"); | ||
200 | return -1; | ||
201 | } | ||
202 | |||
203 | - if (rte_eth_rx_burst(RXTX_PORT5, 0, &pbuf, 1) != 1) { | ||
204 | + if (rte_eth_rx_burst(RXTX_PORT2, 0, &pbuf, 1) != 1) { | ||
205 | printf("Error receiving packet from RXTX port\n"); | ||
206 | return -1; | ||
207 | } | ||
208 | |||
209 | - rte_eth_stats_get(RXTX_PORT4, &stats); | ||
210 | - rte_eth_stats_get(RXTX_PORT5, &stats2); | ||
211 | - if (stats.ipackets != 0 || stats.opackets != 1 || | ||
212 | + rte_eth_stats_get(RXTX_PORT2, &stats); | ||
213 | + rte_eth_stats_get(RXTX_PORT3, &stats2); | ||
214 | + if (stats.ipackets != 1 || stats.opackets != 1 || | ||
215 | stats.ibytes != 0 || stats.obytes != 0 || | ||
216 | stats.ierrors != 0 || stats.oerrors != 0) { | ||
217 | printf("Error: RXTX port stats are not as expected\n"); | ||
218 | return -1; | ||
219 | } | ||
220 | |||
221 | - if (stats2.ipackets != 1 || stats2.opackets != 0 || | ||
222 | + if (stats2.ipackets != 1 || stats2.opackets != 1 || | ||
223 | stats2.ibytes != 0 || stats2.obytes != 0 || | ||
224 | stats2.ierrors != 0 || stats2.oerrors != 0) { | ||
225 | printf("Error: RXTX port stats are not as expected\n"); | ||
226 | return -1; | ||
227 | } | ||
228 | |||
229 | - rte_eth_dev_stop(RXTX_PORT4); | ||
230 | - rte_eth_dev_stop(RXTX_PORT5); | ||
231 | - | ||
232 | - return 0; | ||
233 | -} | ||
234 | - | ||
235 | -static int | ||
236 | -test_pmd_ring_pair_attach(void) | ||
237 | -{ | ||
238 | - struct rte_eth_stats stats, stats2; | ||
239 | - struct rte_mbuf buf, *pbuf = &buf; | ||
240 | - struct rte_eth_conf null_conf; | ||
241 | - | ||
242 | - if ((RXTX_PORT4 >= RTE_MAX_ETHPORTS) || (RXTX_PORT5 >= RTE_MAX_ETHPORTS)) { | ||
243 | - printf(" TX/RX port exceed max eth ports\n"); | ||
244 | - return -1; | ||
245 | - } | ||
246 | - if ((rte_eth_dev_configure(RXTX_PORT4, 1, 1, &null_conf) < 0) | ||
247 | - || (rte_eth_dev_configure(RXTX_PORT5, 1, 1, &null_conf) < 0)) { | ||
248 | - printf("Configure failed for RXTX port\n"); | ||
249 | + /* | ||
250 | + * send and receive 1 packet (RXTX_PORT2 -> RXTX_PORT2) | ||
251 | + * and check for stats update | ||
252 | + */ | ||
253 | + if (rte_eth_tx_burst(RXTX_PORT2, 0, &pbuf, 1) != 1) { | ||
254 | + printf("Error sending packet to RXTX port\n"); | ||
255 | return -1; | ||
256 | } | ||
257 | |||
258 | - if ((rte_eth_tx_queue_setup(RXTX_PORT4, 0, RING_SIZE, SOCKET0, NULL) < 0) | ||
259 | - || (rte_eth_tx_queue_setup(RXTX_PORT5, 0, RING_SIZE, SOCKET0, NULL) < 0)) { | ||
260 | - printf("TX queue setup failed\n"); | ||
261 | + if (rte_eth_rx_burst(RXTX_PORT2, 0, &pbuf, 1) != 1) { | ||
262 | + printf("Error receiving packet from RXTX port\n"); | ||
263 | return -1; | ||
264 | } | ||
265 | |||
266 | - if ((rte_eth_rx_queue_setup(RXTX_PORT4, 0, RING_SIZE, SOCKET0, NULL, mp) < 0) | ||
267 | - || (rte_eth_rx_queue_setup(RXTX_PORT5, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)) { | ||
268 | - printf("RX queue setup failed\n"); | ||
269 | + rte_eth_stats_get(RXTX_PORT2, &stats); | ||
270 | + rte_eth_stats_get(RXTX_PORT3, &stats2); | ||
271 | + if (stats.ipackets != 2 || stats.opackets != 2 || | ||
272 | + stats.ibytes != 0 || stats.obytes != 0 || | ||
273 | + stats.ierrors != 0 || stats.oerrors != 0) { | ||
274 | + printf("Error: RXTX port stats are not as expected\n"); | ||
275 | return -1; | ||
276 | } | ||
277 | |||
278 | - if ((rte_eth_dev_start(RXTX_PORT4) < 0) | ||
279 | - || (rte_eth_dev_start(RXTX_PORT5) < 0)) { | ||
280 | - printf("Error starting RXTX port\n"); | ||
281 | + if (stats2.ipackets != 1 || stats2.opackets != 1 || | ||
282 | + stats2.ibytes != 0 || stats2.obytes != 0 || | ||
283 | + stats2.ierrors != 0 || stats2.oerrors != 0) { | ||
284 | + printf("Error: RXTX port stats are not as expected\n"); | ||
285 | return -1; | ||
286 | } | ||
287 | |||
288 | - rte_eth_stats_reset(RXTX_PORT4); | ||
289 | - rte_eth_stats_reset(RXTX_PORT5); | ||
290 | - | ||
291 | - /* send and receive 1 packet and check for stats update */ | ||
292 | - if (rte_eth_tx_burst(RXTX_PORT4, 0, &pbuf, 1) != 1) { | ||
293 | + /* | ||
294 | + * send and receive 1 packet (RXTX_PORT3 -> RXTX_PORT3) | ||
295 | + * and check for stats update | ||
296 | + */ | ||
297 | + if (rte_eth_tx_burst(RXTX_PORT3, 0, &pbuf, 1) != 1) { | ||
298 | printf("Error sending packet to RXTX port\n"); | ||
299 | return -1; | ||
300 | } | ||
301 | - if (rte_eth_rx_burst(RXTX_PORT5, 0, &pbuf, 1) != 1) { | ||
302 | + | ||
303 | + if (rte_eth_rx_burst(RXTX_PORT3, 0, &pbuf, 1) != 1) { | ||
304 | printf("Error receiving packet from RXTX port\n"); | ||
305 | return -1; | ||
306 | } | ||
307 | |||
308 | - rte_eth_stats_get(RXTX_PORT4, &stats); | ||
309 | - rte_eth_stats_get(RXTX_PORT5, &stats2); | ||
310 | - if (stats.ipackets != 0 || stats.opackets != 1 || | ||
311 | + rte_eth_stats_get(RXTX_PORT2, &stats); | ||
312 | + rte_eth_stats_get(RXTX_PORT3, &stats2); | ||
313 | + if (stats.ipackets != 2 || stats.opackets != 2 || | ||
314 | stats.ibytes != 0 || stats.obytes != 0 || | ||
315 | stats.ierrors != 0 || stats.oerrors != 0) { | ||
316 | printf("Error: RXTX port stats are not as expected\n"); | ||
317 | return -1; | ||
318 | } | ||
319 | |||
320 | - if (stats2.ipackets != 1 || stats2.opackets != 0 || | ||
321 | + if (stats2.ipackets != 2 || stats2.opackets != 2 || | ||
322 | stats2.ibytes != 0 || stats2.obytes != 0 || | ||
323 | stats2.ierrors != 0 || stats2.oerrors != 0) { | ||
324 | printf("Error: RXTX port stats are not as expected\n"); | ||
325 | return -1; | ||
326 | } | ||
327 | |||
328 | - rte_eth_dev_stop(RXTX_PORT4); | ||
329 | - rte_eth_dev_stop(RXTX_PORT5); | ||
330 | + rte_eth_dev_stop(RXTX_PORT2); | ||
331 | + rte_eth_dev_stop(RXTX_PORT3); | ||
332 | |||
333 | return 0; | ||
334 | } | ||
335 | @@ -448,17 +408,6 @@ test_pmd_ring_pair_attach(void) | ||
336 | int | ||
337 | test_pmd_ring(void) | ||
338 | { | ||
339 | - r1[0] = rte_ring_create("R1", RING_SIZE, 0, 0); | ||
340 | - r1[1] = rte_ring_create("R2", RING_SIZE, 0, 0); | ||
341 | - if (r1[0] == NULL && (r1[0] = rte_ring_lookup("R1")) == NULL) | ||
342 | - return -1; | ||
343 | - if (r1[1] == NULL && (r1[1] = rte_ring_lookup("R2")) == NULL) | ||
344 | - return -1; | ||
345 | - | ||
346 | - r2 = rte_ring_create("R3", RING_SIZE, 0, RING_F_SP_ENQ|RING_F_SC_DEQ); | ||
347 | - if (r2 == NULL && (r2 = rte_ring_lookup("R3")) == NULL) | ||
348 | - return -1; | ||
349 | - | ||
350 | mp = rte_mempool_create("mbuf_pool", NB_MBUF, | ||
351 | MBUF_SIZE, 32, | ||
352 | sizeof(struct rte_pktmbuf_pool_private), | ||
353 | @@ -468,8 +417,6 @@ test_pmd_ring(void) | ||
354 | if (mp == NULL) | ||
355 | return -1; | ||
356 | |||
357 | - start_idx = rte_eth_dev_count(); | ||
358 | - | ||
359 | if ((TX_PORT >= RTE_MAX_ETHPORTS) || (RX_PORT >= RTE_MAX_ETHPORTS)\ | ||
360 | || (RXTX_PORT >= RTE_MAX_ETHPORTS)) { | ||
361 | printf(" TX/RX port exceed max eth ports\n"); | ||
362 | @@ -492,14 +439,9 @@ test_pmd_ring(void) | ||
363 | rte_eth_dev_stop(TX_PORT); | ||
364 | rte_eth_dev_stop(RXTX_PORT); | ||
365 | |||
366 | - if (test_pmd_ring_init() < 0) | ||
367 | + if (test_pmd_ring_pair_create_attach() < 0) | ||
368 | return -1; | ||
369 | |||
370 | - if (test_pmd_ring_pair_create() < 0) | ||
371 | - return -1; | ||
372 | - | ||
373 | - if (test_pmd_ring_pair_attach() < 0) | ||
374 | - return -1; | ||
375 | return 0; | ||
376 | } | ||
377 | |||
378 | -- | ||
379 | 1.9.1 | ||
380 | |||
diff --git a/meta-romley/recipes-extended/dpdk/dpdk_1.6.0r2.bb b/meta-romley/recipes-extended/dpdk/dpdk_1.6.0r2.bb new file mode 100644 index 00000000..72f57683 --- /dev/null +++ b/meta-romley/recipes-extended/dpdk/dpdk_1.6.0r2.bb | |||
@@ -0,0 +1,45 @@ | |||
1 | include dpdk.inc | ||
2 | |||
3 | |||
4 | SRC_URI = "http://dpdk.org/browse/dpdk/snapshot/dpdk-${PV}.tar.gz;name=dpdk \ | ||
5 | file://dpdk-1.6.0r2-examples-qos_sched-fix-makefile.patch \ | ||
6 | file://dpdk-1.6.0r2-app-test-fix-build-switches-to-enable-cmdline-tests.patch \ | ||
7 | file://dpdk-1.6.0r2-eal-fix-option-base-virtaddr.patch \ | ||
8 | " | ||
9 | |||
10 | |||
11 | SRC_URI[dpdk.md5sum] = "f406d027320fc8e724bff20db5397cbb" | ||
12 | SRC_URI[dpdk.sha256sum] = "e72fdebcf8a899fc58e60c9b6493b7457576eece60b08dea6aee96c9087df4b2" | ||
13 | |||
14 | export EXAMPLES_BUILD_DIR = "build" | ||
15 | |||
16 | do_compile_append () { | ||
17 | |||
18 | ################################################################### | ||
19 | ### Compilation for examples | ||
20 | ### Skip dpdk_qat due to it has dependency with qat source code | ||
21 | ### Skip vhost due to it has dependency to fuse libraries | ||
22 | ### Skip vhost_xen due to it has dependency to xen libraries | ||
23 | ################################################################### | ||
24 | for app in ${S}/examples/* | ||
25 | do | ||
26 | |||
27 | [ `basename ${app}` = "dpdk_qat" -o `basename ${app}` = "vhost" -o `basename ${app}` = "vhost_xen" ] && continue; | ||
28 | |||
29 | cd ${app} | ||
30 | |||
31 | ############################################################### | ||
32 | # netmap_compat is putting the binary in a directory path | ||
33 | # which is different from rest of the example apps, so this | ||
34 | # special case is handled here to avoid installation failure | ||
35 | # with dpdk-1.6.0 | ||
36 | ############################################################### | ||
37 | if [ `basename ${app}` == "netmap_compat" ]; then | ||
38 | oe_runmake CROSS="${TARGET_PREFIX}" O="${app}/bridge/${EXAMPLES_BUILD_DIR}/" | ||
39 | else | ||
40 | oe_runmake CROSS="${TARGET_PREFIX}" | ||
41 | fi | ||
42 | done | ||
43 | |||
44 | } | ||
45 | |||
diff --git a/meta-romley/recipes-extended/dpdk/dpdk_1.7.0.bb b/meta-romley/recipes-extended/dpdk/dpdk_1.7.0.bb new file mode 100644 index 00000000..581f1d4a --- /dev/null +++ b/meta-romley/recipes-extended/dpdk/dpdk_1.7.0.bb | |||
@@ -0,0 +1,41 @@ | |||
1 | include dpdk.inc | ||
2 | |||
3 | SRC_URI = "http://dpdk.org/browse/dpdk/snapshot/dpdk-${PV}.tar.gz;name=dpdk \ | ||
4 | file://dpdk-1.7.0-examples-Add-config-variables-to-enable-disable-dpdk.patch \ | ||
5 | file://dpdk-1.7.0-examples-pipeline-build-with-all-examples.patch \ | ||
6 | file://dpdk-1.7.0-ring-remove-extra-devices-creation-with-vdev-option.patch \ | ||
7 | file://dpdk-1.7.0-ring-simplify-unit-tests.patch \ | ||
8 | " | ||
9 | |||
10 | SRC_URI[dpdk.md5sum] = "07907d7b1a64888a459a971c45818038" | ||
11 | SRC_URI[dpdk.sha256sum] = "aafc290260b5002d248ab8f8c8ffa76454d4b1382aa3c82ae2700ecce481397a" | ||
12 | |||
13 | export EXAMPLES_BUILD_DIR = "${RTE_TARGET}" | ||
14 | |||
15 | # dpdk example apps dpdk_qat and vhost have dependancy on fuse and qat. | ||
16 | # fuse is in meta-filesystems and qat is not yet upstreamed. | ||
17 | # So adding mechanism to explicitly disable the use of fuse and qat. | ||
18 | # To enable, uncomment the below line or include in .bbappend. | ||
19 | # PACKAGECONFIG ?= " dpdk_qat vhost " | ||
20 | |||
21 | PACKAGECONFIG[dpdk_qat] = ",,qat" | ||
22 | PACKAGECONFIG[vhost] = ",,fuse" | ||
23 | |||
24 | do_compile_append () { | ||
25 | |||
26 | cd ${S}/examples/ | ||
27 | |||
28 | # Disable the compilation of example apps dpdk_qat and vhost if they are | ||
29 | # not included in the PACKAGECONFIG | ||
30 | export CONFIG_EXAMPLE_DPDK_QAT=${@base_contains('PACKAGECONFIG', 'dpdk_qat', 'y', 'n', d)} | ||
31 | export CONFIG_EXAMPLE_DPDK_VHOST="${@base_contains('PACKAGECONFIG', 'vhost', 'y', 'n', d)}" | ||
32 | |||
33 | ############################################################### | ||
34 | # In order to make use of dpdk.inc for example app installation | ||
35 | # without failure, override the default build directory | ||
36 | ############################################################### | ||
37 | oe_runmake CROSS="${TARGET_PREFIX}" O="${S}/examples/$@/" | ||
38 | } | ||
39 | |||
40 | |||
41 | |||