summaryrefslogtreecommitdiffstats
path: root/meta-romley/recipes-extended/dpdk/dpdk
diff options
context:
space:
mode:
authorWU CHIA CHUAN <chia.chuan.wu@intel.com>2015-09-28 16:03:16 +0800
committerSaul Wold <sgw@linux.intel.com>2015-09-29 18:05:49 -0700
commit84c049b9cb80b50fd32b716c2ae97e3f0d4e3cd7 (patch)
treeef1fb0171d8e087a7d4f7d1b04a8d9b59c522801 /meta-romley/recipes-extended/dpdk/dpdk
parent5e218aeacace801c4f01a1db8c99ac8a51421661 (diff)
downloadmeta-intel-84c049b9cb80b50fd32b716c2ae97e3f0d4e3cd7.tar.gz
meta-intel: meta-romley BSP retirement from YP 2.0
Remove meta-romley BSP layer from meta-intel master branch which is targeting for YP 2.0. A heads-up email was sent to the meta-intel mailing list for requesting any feedback regarding retirement of these BSP. Since there is no concern, we assume that it is agreed upon and thus this patch to retire the BSP. The "MAINTAINERS file" and "conf/machine/README file" are updated to reflect removal of the BSP. We expect intel-corei7-64 machine is continued to be used to support the platform and dpdk recipe under meta-romley is now supported under meta-isg/common/recipes-extended/dpdk. Signed-off-by: WU CHIA CHUAN <chia.chuan.wu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta-romley/recipes-extended/dpdk/dpdk')
-rw-r--r--meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-app-test-fix-build-switches-to-enable-cmdline-tests.patch53
-rw-r--r--meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-eal-fix-option-base-virtaddr.patch35
-rw-r--r--meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-examples-qos_sched-fix-makefile.patch35
-rw-r--r--meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-examples-Add-config-variables-to-enable-disable-dpdk.patch42
-rw-r--r--meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-examples-pipeline-build-with-all-examples.patch34
-rw-r--r--meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-ring-remove-extra-devices-creation-with-vdev-option.patch44
-rw-r--r--meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-ring-simplify-unit-tests.patch380
7 files changed, 0 insertions, 623 deletions
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
deleted file mode 100644
index 87d2ef77..00000000
--- a/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-app-test-fix-build-switches-to-enable-cmdline-tests.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1From cf953d2bfa7df9aa67459b333db4d4d8a9e72fd6 Mon Sep 17 00:00:00 2001
2From: Thomas Monjalon <thomas.monjalon@6wind.com>
3Date: Fri, 27 Jun 2014 11:21:11 +0200
4Subject: [PATCH] app/test: fix build switches to enable cmdline tests
5
6Upstream-Status: backport
7Imported patch from: http://dpdk.org/browse/dpdk/log/
8
9There 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
12In makefiles, the build options are prefixed with CONFIG_RTE_
13but in .c file, it is only RTE_.
14
15These typos were disabling cmdline unit tests and test of "--vdev eth_ring" option.
16
17Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
18Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
19Signed-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
25diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
26index 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;
38diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
39index 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--
521.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
deleted file mode 100644
index e724591e..00000000
--- a/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-eal-fix-option-base-virtaddr.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From be1816f59e772e427fc5815281f9458a9314973a Mon Sep 17 00:00:00 2001
2From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
3Date: Thu, 19 Jun 2014 16:35:22 +0100
4Subject: [PATCH] eal: fix option --base-virtaddr
5
6Upstream-Status: backport
7Imported patch from: http://dpdk.org/browse/dpdk/log/
8
9When parsing EAL option --base-virtaddr
10errno was not being set to 0 before calling strtoull,
11therefore function might fail unnecesarily.
12
13Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
14Signed-off-by: Aaron Campbell <aaron@arbor.net>
15Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
16Signed-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
21diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
22index 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--
341.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
deleted file mode 100644
index 47b5ece7..00000000
--- a/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.6.0r2-examples-qos_sched-fix-makefile.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From ea9a59b26c3c86b498337e968ee8f68c4e263614 Mon Sep 17 00:00:00 2001
2From: Olivier Matz <olivier.matz@6wind.com>
3Date: Fri, 16 May 2014 10:18:59 +0200
4Subject: [PATCH] examples/qos_sched: fix makefile
5
6Upstream-Status: backport
7Imported patch from: http://dpdk.org/browse/dpdk/log/
8
9The example does not compile as the linker complains about duplicated
10symbols.
11
12Remove -lsched from LDLIBS, it is already present in rte.app.mk and
13added by the DPDK framework automatically.
14
15Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
16Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
17Signed-off-by: Chan Wei Sern <wei.sern.chan@intel.com>
18---
19 examples/qos_sched/Makefile | 2 --
20 1 file changed, 2 deletions(-)
21
22diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
23index 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--
341.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
deleted file mode 100644
index d0721ca0..00000000
--- a/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-examples-Add-config-variables-to-enable-disable-dpdk.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From 63f8ccc5a305b193e219d288ef9e43b9a9fa6aa8 Mon Sep 17 00:00:00 2001
2From: Sreeju Selvaraj <sreeju.armughanx.selvaraj@intel.com>
3Date: Wed, 17 Sep 2014 19:10:01 +0800
4Subject: [PATCH] examples: Add config variables to enable/disable dpdk_qat and
5 vhost
6
7Upstream-Status: Inappropriate [configuration]
8
9This can be used to export CONFIG_EXAMPLE_DPDK_QAT=n if dpdk_qat is not
10in PACKAGECONFIG and also allow to export CONFIG_EXAMPLE_DPDK_VHOST=n
11if vhost is not in PACKAGECONFIG.
12
13Signed-off-by: Sreeju Selvaraj <sreeju.armughanx.selvaraj@intel.com>
14---
15 examples/Makefile | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/examples/Makefile b/examples/Makefile
19index 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--
411.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
deleted file mode 100644
index 25f029fe..00000000
--- a/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-examples-pipeline-build-with-all-examples.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 15aef6e666ee2eb0befa153d277d47754f3656e4 Mon Sep 17 00:00:00 2001
2From: Thomas Monjalon <thomas.monjalon@6wind.com>
3Date: Thu, 17 Jul 2014 10:30:52 +0200
4Subject: [PATCH] examples/pipeline: build with all examples
5
6Upstream-Status: Backport
7Imported patch from: http://dpdk.org/browse/dpdk/log/
8
9When adding this packet framework sample (commit 77a3346),
10it has been forgotten to add it into the global makefile for
11"make examples".
12
13Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
14(cherry picked from commit a6664a09a7caa5e63f9ae625cf1946b0eef7794e)
15Signed-off-by: Sreeju Selvaraj <sreeju.armughanx.selvaraj@intel.com>
16---
17 examples/Makefile | 1 +
18 1 file changed, 1 insertion(+)
19
20diff --git a/examples/Makefile b/examples/Makefile
21index 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--
331.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
deleted file mode 100644
index 25a4ea80..00000000
--- a/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-ring-remove-extra-devices-creation-with-vdev-option.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 70d3d9a6757e0c56ad3c6da0292479433e16aed3 Mon Sep 17 00:00:00 2001
2From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
3Date: Wed, 9 Jul 2014 15:35:35 +0100
4Subject: [PATCH] ring: remove extra devices creation with --vdev option
5
6Upstream-Status: Backport
7Imported patch from: http://dpdk.org/browse/dpdk/log/
8
9When passing extra arguments in EAL option --vdev, to create
10ring ethdevs, API was creating three ethdevs, even if there
11was just one argument, such as CREATE.
12
13Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
14Acked-by: Neil Horman <nhorman@tuxdriver.com>
15(cherry picked from commit 546afbc6827f9f0f7ed501d2af1fc51755e40224)
16Signed-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
21diff --git a/lib/librte_pmd_ring/rte_eth_ring.c b/lib/librte_pmd_ring/rte_eth_ring.c
22index 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--
431.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
deleted file mode 100644
index c17137b2..00000000
--- a/meta-romley/recipes-extended/dpdk/dpdk/dpdk-1.7.0-ring-simplify-unit-tests.patch
+++ /dev/null
@@ -1,380 +0,0 @@
1From 545a5fac5d6bd0b64693dfcb15b321280418ac13 Mon Sep 17 00:00:00 2001
2From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
3Date: Wed, 9 Jul 2014 15:35:36 +0100
4Subject: [PATCH] ring: simplify unit tests
5
6Upstream-Status: Backport
7Imported patch from: http://dpdk.org/browse/dpdk/log/
8
9As this unit test does not create devices anymore,
10and uses devices created by EAL option --vdev,
11there were unnecesary tests that were repeated,
12so they have been removed.
13
14So now there are three tests:
15
161 - Test two devices that share a ring, one device
17 with just one RX queue and the other with one
18 TX queue.
19
202 - Test a device connected to itself (loopback) by
21 a ring, with both RX and TX queue.
22
233 - 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
27Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
28Acked-by: Neil Horman <nhorman@tuxdriver.com>
29(cherry picked from commit 572eb3cd834c5e21d7fa946432b89c1c9d63fe61)
30Signed-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
35diff --git a/app/test/test_pmd_ring.c b/app/test/test_pmd_ring.c
36index 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--
3791.9.1
380