DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Harry van Haaren <harry.van.haaren@intel.com>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
	David Hunt <david.hunt@intel.com>
Subject: Re: [dpdk-dev] [PATCH v7 17/22] test/eventdev: add SW tests for load balancing
Date: Sun, 2 Apr 2017 20:26:48 +0530	[thread overview]
Message-ID: <20170402145646.c54niqeptw6lclnc@localhost.localdomain> (raw)
In-Reply-To: <1490902250-32164-18-git-send-email-harry.van.haaren@intel.com>

On Thu, Mar 30, 2017 at 08:30:45PM +0100, Harry van Haaren wrote:
> This commit adds various tests for load-balancing and
> queue prioritization.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Signed-off-by: David Hunt <david.hunt@intel.com>
> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
> 
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>


Hi Harry,

I got following build error on FreeBSD + gcc 4.9.4 combo.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc49/gcc/x86_64-portbld-freebsd10.3/4.9.4/lto-wrapper
Target: x86_64-portbld-freebsd10.3
Configured with: /wrkdirs/usr/ports/lang/gcc/work/gcc-4.9.4/configure
--disable-bootstrap --disable-nls --enable-gnu-indirect-function
--libdir=/usr/local/lib/gcc49 --libexecdir=/usr/local/libexec/gcc49
--program-suffix=49 --with-as=/usr/local/bin/as --with-gmp=/usr/local
--with-gxx-include-dir=/usr/local/lib/gcc49/include/c++/
--with-ld=/usr/local/bin/ld --with-pkgversion='FreeBSD Ports Collection'
--with-system-zlib --with-ecj-jar=/usr/local/share/java/ecj-4.5.jar
--enable-languages=c,c++,objc,fortran,java --prefix=/usr/local
--localstatedir=/var --mandir=/usr/local/man
--infodir=/usr/local/info/gcc49 --build=x86_64-portbld-freebsd10.3
Thread model: posix
gcc version 4.9.4 (FreeBSD Ports Collection) 
$ 

I think it is nothing do with FreeBSD. Looks like gcc < 5 will hit this
issue. But the strange part is patchwork test report shows as compilation success.

http://dpdk.org/ml/archives/test-report/2017-April/017005.html

== Build test/test
CC test_eventdev_sw.o
/usr/home/guest/dpdk-next-eventdev-test/test/test/test_eventdev_sw.c: In
function 'run_prio_packet_test':
/usr/home/guest/dpdk-next-eventdev-test/test/test/test_eventdev_sw.c:408:4:
error: missing initializer for field 'impl_opaque' of 'struct
<anonymous>' [-Werror=missing-field-ini
tializers]
.op = RTE_EVENT_OP_NEW,
    ^
In file included from
/usr/home/guest/dpdk-next-eventdev-test/test/test/test_eventdev_sw.c:51:0:
/usr/home/guest/dpdk-next-eventdev-test/build/include/rte_eventdev.h:960:12:
note: 'impl_opaque' declared here
    uint8_t impl_opaque;
^
/usr/home/guest/dpdk-next-eventdev-test/test/test/test_eventdev_sw.c:409:4:
error: missing initializer for field 'impl_opaque' of 'struct
<anonymous>' [-Werror=missing-field-ini
tializers]
.queue_id = t->qid[0],
    ^
In file included from
/usr/home/guest/dpdk-next-eventdev-test/test/test/test_eventdev_sw.c:51:0:
/usr/home/guest/dpdk-next-eventdev-test/build/include/rte_eventdev.h:960:12:
note: 'impl_opaque' declared here
    uint8_t impl_opaque;
^
/usr/home/guest/dpdk-next-eventdev-test/test/test/test_eventdev_sw.c:410:4:
error: missing initializer for field 'impl_opaque' of 'struct
<anonymous>' [-Werror=missing-field-initializers]
    .mbuf = arp
    ^
In file included from
/usr/home/guest/dpdk-next-eventdev-test/test/test/test_eventdev_sw.c:51:0:
/usr/home/guest/dpdk-next-eventdev-test/build/include/rte_eventdev.h:960:12:
note: 'impl_opaque' declared here
    uint8_t impl_opaque;
^
/usr/home/guest/dpdk-next-eventdev-test/test/test/test_eventdev_sw.c: In
function 'test_single_directed_packet':
/usr/home/guest/dpdk-next-eventdev-test/test/test/test_eventdev_sw.c:492:4:
error: missing initializer for field 'priority' of 'struct <anonymous>'
[-Werror=missing-field-initializers]
    .mbuf = arp,


If you don't have any better fix, I can apply the following on pull
request. If you have something better send it as patch.

$ git diff
diff --git a/test/test/Makefile b/test/test/Makefile
index ac802e1d..104532d 100644
--- a/test/test/Makefile
+++ b/test/test/Makefile
@@ -218,6 +218,11 @@ ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo
1), 1)
 CFLAGS_test_memcpy.o += -fno-var-tracking-assignments
 CFLAGS_test_memcpy_perf.o += -fno-var-tracking-assignments
 endif
+# for older GCC versions, allow us to initialize an event using
+# designated initializers.
+ifeq ($(shell test $(GCC_VERSION) -le 50 && echo 1), 1)
+CFLAGS_test_eventdev_sw.o += -Wno-missing-field-initializers
+endif
 endif
 
 # Link against shared libraries when needed
$ 



> ---
>  test/test/test_eventdev_sw.c | 566 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 566 insertions(+)
> 
> diff --git a/test/test/test_eventdev_sw.c b/test/test/test_eventdev_sw.c
> index f294cb9..03003e6 100644
> --- a/test/test/test_eventdev_sw.c
> +++ b/test/test/test_eventdev_sw.c
> @@ -309,6 +309,100 @@ test_event_dev_stats_get(int dev_id, struct test_event_dev_stats *stats)
>  	return 0;
>  }
>  
> +/* run_prio_packet_test
> + * This performs a basic packet priority check on the test instance passed in.
> + * It is factored out of the main priority tests as the same tests must be
> + * performed to ensure prioritization of each type of QID.
> + *
> + * Requirements:
> + *  - An initialized test structure, including mempool
> + *  - t->port[0] is initialized for both Enq / Deq of packets to the QID
> + *  - t->qid[0] is the QID to be tested
> + *  - if LB QID, the CQ must be mapped to the QID.
> + */
> +static int
> +run_prio_packet_test(struct test *t)
> +{
> +	int err;
> +	const uint32_t MAGIC_SEQN[] = {4711, 1234};
> +	const uint32_t PRIORITY[] = {
> +		RTE_EVENT_DEV_PRIORITY_NORMAL,
> +		RTE_EVENT_DEV_PRIORITY_HIGHEST
> +	};
> +	unsigned int i;
> +	for (i = 0; i < RTE_DIM(MAGIC_SEQN); i++) {
> +		/* generate pkt and enqueue */
> +		struct rte_event ev;
> +		struct rte_mbuf *arp = rte_gen_arp(0, t->mbuf_pool);
> +		if (!arp) {
> +			printf("%d: gen of pkt failed\n", __LINE__);
> +			return -1;
> +		}
> +		arp->seqn = MAGIC_SEQN[i];
> +
> +		ev = (struct rte_event){
> +			.priority = PRIORITY[i],
> +			.op = RTE_EVENT_OP_NEW,
> +			.queue_id = t->qid[0],
> +			.mbuf = arp
> +		};
> +		err = rte_event_enqueue_burst(evdev, t->port[0], &ev, 1);
> +		if (err < 0) {
> +			printf("%d: error failed to enqueue\n", __LINE__);
> +			return -1;
> +		}
> +	}
> +
> +	rte_event_schedule(evdev);
> +
> +	struct test_event_dev_stats stats;
> +	err = test_event_dev_stats_get(evdev, &stats);
> +	if (err) {
> +		printf("%d: error failed to get stats\n", __LINE__);
> +		return -1;
> +	}
> +
> +	if (stats.port_rx_pkts[t->port[0]] != 2) {
> +		printf("%d: error stats incorrect for directed port\n",
> +				__LINE__);
> +		rte_event_dev_dump(evdev, stdout);
> +		return -1;
> +	}
> +
> +	struct rte_event ev, ev2;
> +	uint32_t deq_pkts;
> +	deq_pkts = rte_event_dequeue_burst(evdev, t->port[0], &ev, 1, 0);
> +	if (deq_pkts != 1) {
> +		printf("%d: error failed to deq\n", __LINE__);
> +		rte_event_dev_dump(evdev, stdout);
> +		return -1;
> +	}
> +	if (ev.mbuf->seqn != MAGIC_SEQN[1]) {
> +		printf("%d: first packet out not highest priority\n",
> +				__LINE__);
> +		rte_event_dev_dump(evdev, stdout);
> +		return -1;
> +	}
> +	rte_pktmbuf_free(ev.mbuf);
> +
> +	deq_pkts = rte_event_dequeue_burst(evdev, t->port[0], &ev2, 1, 0);
> +	if (deq_pkts != 1) {
> +		printf("%d: error failed to deq\n", __LINE__);
> +		rte_event_dev_dump(evdev, stdout);
> +		return -1;
> +	}
> +	if (ev2.mbuf->seqn != MAGIC_SEQN[0]) {
> +		printf("%d: second packet out not lower priority\n",
> +				__LINE__);
> +		rte_event_dev_dump(evdev, stdout);
> +		return -1;
> +	}
> +	rte_pktmbuf_free(ev2.mbuf);
> +
> +	cleanup(t);
> +	return 0;
> +}
> +
>  static int
>  test_single_directed_packet(struct test *t)
>  {
> @@ -391,6 +485,94 @@ test_single_directed_packet(struct test *t)
>  	return 0;
>  }
>  
> +
> +static int
> +test_priority_directed(struct test *t)
> +{
> +	if (init(t, 1, 1) < 0 ||
> +			create_ports(t, 1) < 0 ||
> +			create_directed_qids(t, 1, t->port) < 0) {
> +		printf("%d: Error initializing device\n", __LINE__);
> +		return -1;
> +	}
> +
> +	if (rte_event_dev_start(evdev) < 0) {
> +		printf("%d: Error with start call\n", __LINE__);
> +		return -1;
> +	}
> +
> +	return run_prio_packet_test(t);
> +}
> +
> +static int
> +test_priority_atomic(struct test *t)
> +{
> +	if (init(t, 1, 1) < 0 ||
> +			create_ports(t, 1) < 0 ||
> +			create_atomic_qids(t, 1) < 0) {
> +		printf("%d: Error initializing device\n", __LINE__);
> +		return -1;
> +	}
> +
> +	/* map the QID */
> +	if (rte_event_port_link(evdev, t->port[0], &t->qid[0], NULL, 1) != 1) {
> +		printf("%d: error mapping qid to port\n", __LINE__);
> +		return -1;
> +	}
> +	if (rte_event_dev_start(evdev) < 0) {
> +		printf("%d: Error with start call\n", __LINE__);
> +		return -1;
> +	}
> +
> +	return run_prio_packet_test(t);
> +}
> +
> +static int
> +test_priority_ordered(struct test *t)
> +{
> +	if (init(t, 1, 1) < 0 ||
> +			create_ports(t, 1) < 0 ||
> +			create_ordered_qids(t, 1) < 0) {
> +		printf("%d: Error initializing device\n", __LINE__);
> +		return -1;
> +	}
> +
> +	/* map the QID */
> +	if (rte_event_port_link(evdev, t->port[0], &t->qid[0], NULL, 1) != 1) {
> +		printf("%d: error mapping qid to port\n", __LINE__);
> +		return -1;
> +	}
> +	if (rte_event_dev_start(evdev) < 0) {
> +		printf("%d: Error with start call\n", __LINE__);
> +		return -1;
> +	}
> +
> +	return run_prio_packet_test(t);
> +}
> +
> +static int
> +test_priority_unordered(struct test *t)
> +{
> +	if (init(t, 1, 1) < 0 ||
> +			create_ports(t, 1) < 0 ||
> +			create_unordered_qids(t, 1) < 0) {
> +		printf("%d: Error initializing device\n", __LINE__);
> +		return -1;
> +	}
> +
> +	/* map the QID */
> +	if (rte_event_port_link(evdev, t->port[0], &t->qid[0], NULL, 1) != 1) {
> +		printf("%d: error mapping qid to port\n", __LINE__);
> +		return -1;
> +	}
> +	if (rte_event_dev_start(evdev) < 0) {
> +		printf("%d: Error with start call\n", __LINE__);
> +		return -1;
> +	}
> +
> +	return run_prio_packet_test(t);
> +}
> +
>  static int
>  burst_packets(struct test *t)
>  {
> @@ -765,6 +947,347 @@ ordered_reconfigure(struct test *t)
>  }
>  
>  static int
> +qid_priorities(struct test *t)
> +{
> +	/* Test works by having a CQ with enough empty space for all packets,
> +	 * and enqueueing 3 packets to 3 QIDs. They must return based on the
> +	 * priority of the QID, not the ingress order, to pass the test
> +	 */
> +	unsigned int i;
> +	/* Create instance with 1 ports, and 3 qids */
> +	if (init(t, 3, 1) < 0 ||
> +			create_ports(t, 1) < 0) {
> +		printf("%d: Error initializing device\n", __LINE__);
> +		return -1;
> +	}
> +
> +	for (i = 0; i < 3; i++) {
> +		/* Create QID */
> +		const struct rte_event_queue_conf conf = {
> +			.event_queue_cfg = RTE_EVENT_QUEUE_CFG_ATOMIC_ONLY,
> +			/* increase priority (0 == highest), as we go */
> +			.priority = RTE_EVENT_DEV_PRIORITY_NORMAL - i,
> +			.nb_atomic_flows = 1024,
> +			.nb_atomic_order_sequences = 1024,
> +		};
> +
> +		if (rte_event_queue_setup(evdev, i, &conf) < 0) {
> +			printf("%d: error creating qid %d\n", __LINE__, i);
> +			return -1;
> +		}
> +		t->qid[i] = i;
> +	}
> +	t->nb_qids = i;
> +	/* map all QIDs to port */
> +	rte_event_port_link(evdev, t->port[0], NULL, NULL, 0);
> +
> +	if (rte_event_dev_start(evdev) < 0) {
> +		printf("%d: Error with start call\n", __LINE__);
> +		return -1;
> +	}
> +
> +	/* enqueue 3 packets, setting seqn and QID to check priority */
> +	for (i = 0; i < 3; i++) {
> +		struct rte_event ev;
> +		struct rte_mbuf *arp = rte_gen_arp(0, t->mbuf_pool);
> +		if (!arp) {
> +			printf("%d: gen of pkt failed\n", __LINE__);
> +			return -1;
> +		}
> +		ev.queue_id = t->qid[i];
> +		ev.op = RTE_EVENT_OP_NEW;
> +		ev.mbuf = arp;
> +		arp->seqn = i;
> +
> +		int err = rte_event_enqueue_burst(evdev, t->port[0], &ev, 1);
> +		if (err != 1) {
> +			printf("%d: Failed to enqueue\n", __LINE__);
> +			return -1;
> +		}
> +	}
> +
> +	rte_event_schedule(evdev);
> +
> +	/* dequeue packets, verify priority was upheld */
> +	struct rte_event ev[32];
> +	uint32_t deq_pkts =
> +		rte_event_dequeue_burst(evdev, t->port[0], ev, 32, 0);
> +	if (deq_pkts != 3) {
> +		printf("%d: failed to deq packets\n", __LINE__);
> +		rte_event_dev_dump(evdev, stdout);
> +		return -1;
> +	}
> +	for (i = 0; i < 3; i++) {
> +		if (ev[i].mbuf->seqn != 2-i) {
> +			printf(
> +				"%d: qid priority test: seqn %d incorrectly prioritized\n",
> +					__LINE__, i);
> +		}
> +	}
> +
> +	cleanup(t);
> +	return 0;
> +}
> +
> +static int
> +load_balancing(struct test *t)
> +{
> +	const int rx_enq = 0;
> +	int err;
> +	uint32_t i;
> +
> +	if (init(t, 1, 4) < 0 ||
> +			create_ports(t, 4) < 0 ||
> +			create_atomic_qids(t, 1) < 0) {
> +		printf("%d: Error initializing device\n", __LINE__);
> +		return -1;
> +	}
> +
> +	for (i = 0; i < 3; i++) {
> +		/* map port 1 - 3 inclusive */
> +		if (rte_event_port_link(evdev, t->port[i+1], &t->qid[0],
> +				NULL, 1) != 1) {
> +			printf("%d: error mapping qid to port %d\n",
> +					__LINE__, i);
> +			return -1;
> +		}
> +	}
> +
> +	if (rte_event_dev_start(evdev) < 0) {
> +		printf("%d: Error with start call\n", __LINE__);
> +		return -1;
> +	}
> +
> +	/************** FORWARD ****************/
> +	/*
> +	 * Create a set of flows that test the load-balancing operation of the
> +	 * implementation. Fill CQ 0 and 1 with flows 0 and 1, and test
> +	 * with a new flow, which should be sent to the 3rd mapped CQ
> +	 */
> +	static uint32_t flows[] = {0, 1, 1, 0, 0, 2, 2, 0, 2};
> +
> +	for (i = 0; i < RTE_DIM(flows); i++) {
> +		struct rte_mbuf *arp = rte_gen_arp(0, t->mbuf_pool);
> +		if (!arp) {
> +			printf("%d: gen of pkt failed\n", __LINE__);
> +			return -1;
> +		}
> +
> +		struct rte_event ev = {
> +				.op = RTE_EVENT_OP_NEW,
> +				.queue_id = t->qid[0],
> +				.flow_id = flows[i],
> +				.mbuf = arp,
> +		};
> +		/* generate pkt and enqueue */
> +		err = rte_event_enqueue_burst(evdev, t->port[rx_enq], &ev, 1);
> +		if (err < 0) {
> +			printf("%d: Failed to enqueue\n", __LINE__);
> +			return -1;
> +		}
> +	}
> +
> +	rte_event_schedule(evdev);
> +
> +	struct test_event_dev_stats stats;
> +	err = test_event_dev_stats_get(evdev, &stats);
> +	if (err) {
> +		printf("%d: failed to get stats\n", __LINE__);
> +		return -1;
> +	}
> +
> +	if (stats.port_inflight[1] != 4) {
> +		printf("%d:%s: port 1 inflight not correct\n", __LINE__,
> +				__func__);
> +		return -1;
> +	}
> +	if (stats.port_inflight[2] != 2) {
> +		printf("%d:%s: port 2 inflight not correct\n", __LINE__,
> +				__func__);
> +		return -1;
> +	}
> +	if (stats.port_inflight[3] != 3) {
> +		printf("%d:%s: port 3 inflight not correct\n", __LINE__,
> +				__func__);
> +		return -1;
> +	}
> +
> +	cleanup(t);
> +	return 0;
> +}
> +
> +static int
> +load_balancing_history(struct test *t)
> +{
> +	struct test_event_dev_stats stats = {0};
> +	const int rx_enq = 0;
> +	int err;
> +	uint32_t i;
> +
> +	/* Create instance with 1 atomic QID going to 3 ports + 1 prod port */
> +	if (init(t, 1, 4) < 0 ||
> +			create_ports(t, 4) < 0 ||
> +			create_atomic_qids(t, 1) < 0)
> +		return -1;
> +
> +	/* CQ mapping to QID */
> +	if (rte_event_port_link(evdev, t->port[1], &t->qid[0], NULL, 1) != 1) {
> +		printf("%d: error mapping port 1 qid\n", __LINE__);
> +		return -1;
> +	}
> +	if (rte_event_port_link(evdev, t->port[2], &t->qid[0], NULL, 1) != 1) {
> +		printf("%d: error mapping port 2 qid\n", __LINE__);
> +		return -1;
> +	}
> +	if (rte_event_port_link(evdev, t->port[3], &t->qid[0], NULL, 1) != 1) {
> +		printf("%d: error mapping port 3 qid\n", __LINE__);
> +		return -1;
> +	}
> +	if (rte_event_dev_start(evdev) < 0) {
> +		printf("%d: Error with start call\n", __LINE__);
> +		return -1;
> +	}
> +
> +	/*
> +	 * Create a set of flows that test the load-balancing operation of the
> +	 * implementation. Fill CQ 0, 1 and 2 with flows 0, 1 and 2, drop
> +	 * the packet from CQ 0, send in a new set of flows. Ensure that:
> +	 *  1. The new flow 3 gets into the empty CQ0
> +	 *  2. packets for existing flow gets added into CQ1
> +	 *  3. Next flow 0 pkt is now onto CQ2, since CQ0 and CQ1 now contain
> +	 *     more outstanding pkts
> +	 *
> +	 *  This test makes sure that when a flow ends (i.e. all packets
> +	 *  have been completed for that flow), that the flow can be moved
> +	 *  to a different CQ when new packets come in for that flow.
> +	 */
> +	static uint32_t flows1[] = {0, 1, 1, 2};
> +
> +	for (i = 0; i < RTE_DIM(flows1); i++) {
> +		struct rte_mbuf *arp = rte_gen_arp(0, t->mbuf_pool);
> +		struct rte_event ev = {
> +				.flow_id = flows1[i],
> +				.op = RTE_EVENT_OP_NEW,
> +				.queue_id = t->qid[0],
> +				.event_type = RTE_EVENT_TYPE_CPU,
> +				.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
> +				.mbuf = arp
> +		};
> +
> +		if (!arp) {
> +			printf("%d: gen of pkt failed\n", __LINE__);
> +			return -1;
> +		}
> +		arp->hash.rss = flows1[i];
> +		err = rte_event_enqueue_burst(evdev, t->port[rx_enq], &ev, 1);
> +		if (err < 0) {
> +			printf("%d: Failed to enqueue\n", __LINE__);
> +			return -1;
> +		}
> +	}
> +
> +	/* call the scheduler */
> +	rte_event_schedule(evdev);
> +
> +	/* Dequeue the flow 0 packet from port 1, so that we can then drop */
> +	struct rte_event ev;
> +	if (!rte_event_dequeue_burst(evdev, t->port[1], &ev, 1, 0)) {
> +		printf("%d: failed to dequeue\n", __LINE__);
> +		return -1;
> +	}
> +	if (ev.mbuf->hash.rss != flows1[0]) {
> +		printf("%d: unexpected flow received\n", __LINE__);
> +		return -1;
> +	}
> +
> +	/* drop the flow 0 packet from port 1 */
> +	rte_event_enqueue_burst(evdev, t->port[1], &release_ev, 1);
> +
> +	/* call the scheduler */
> +	rte_event_schedule(evdev);
> +
> +	/*
> +	 * Set up the next set of flows, first a new flow to fill up
> +	 * CQ 0, so that the next flow 0 packet should go to CQ2
> +	 */
> +	static uint32_t flows2[] = { 3, 3, 3, 1, 1, 0 };
> +
> +	for (i = 0; i < RTE_DIM(flows2); i++) {
> +		struct rte_mbuf *arp = rte_gen_arp(0, t->mbuf_pool);
> +		struct rte_event ev = {
> +				.flow_id = flows2[i],
> +				.op = RTE_EVENT_OP_NEW,
> +				.queue_id = t->qid[0],
> +				.event_type = RTE_EVENT_TYPE_CPU,
> +				.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
> +				.mbuf = arp
> +		};
> +
> +		if (!arp) {
> +			printf("%d: gen of pkt failed\n", __LINE__);
> +			return -1;
> +		}
> +		arp->hash.rss = flows2[i];
> +
> +		err = rte_event_enqueue_burst(evdev, t->port[rx_enq], &ev, 1);
> +		if (err < 0) {
> +			printf("%d: Failed to enqueue\n", __LINE__);
> +			return -1;
> +		}
> +	}
> +
> +	/* schedule */
> +	rte_event_schedule(evdev);
> +
> +	err = test_event_dev_stats_get(evdev, &stats);
> +	if (err) {
> +		printf("%d:failed to get stats\n", __LINE__);
> +		return -1;
> +	}
> +
> +	/*
> +	 * Now check the resulting inflights on each port.
> +	 */
> +	if (stats.port_inflight[1] != 3) {
> +		printf("%d:%s: port 1 inflight not correct\n", __LINE__,
> +				__func__);
> +		printf("Inflights, ports 1, 2, 3: %u, %u, %u\n",
> +				(unsigned int)stats.port_inflight[1],
> +				(unsigned int)stats.port_inflight[2],
> +				(unsigned int)stats.port_inflight[3]);
> +		return -1;
> +	}
> +	if (stats.port_inflight[2] != 4) {
> +		printf("%d:%s: port 2 inflight not correct\n", __LINE__,
> +				__func__);
> +		printf("Inflights, ports 1, 2, 3: %u, %u, %u\n",
> +				(unsigned int)stats.port_inflight[1],
> +				(unsigned int)stats.port_inflight[2],
> +				(unsigned int)stats.port_inflight[3]);
> +		return -1;
> +	}
> +	if (stats.port_inflight[3] != 2) {
> +		printf("%d:%s: port 3 inflight not correct\n", __LINE__,
> +				__func__);
> +		printf("Inflights, ports 1, 2, 3: %u, %u, %u\n",
> +				(unsigned int)stats.port_inflight[1],
> +				(unsigned int)stats.port_inflight[2],
> +				(unsigned int)stats.port_inflight[3]);
> +		return -1;
> +	}
> +
> +	for (i = 1; i <= 3; i++) {
> +		struct rte_event ev;
> +		while (rte_event_dequeue_burst(evdev, i, &ev, 1, 0))
> +			rte_event_enqueue_burst(evdev, i, &release_ev, 1);
> +	}
> +	rte_event_schedule(evdev);
> +
> +	cleanup(t);
> +	return 0;
> +}
> +
> +static int
>  invalid_qid(struct test *t)
>  {
>  	struct test_event_dev_stats stats;
> @@ -1370,12 +1893,49 @@ test_sw_eventdev(void)
>  		printf("ERROR - Burst Packets test FAILED.\n");
>  		return ret;
>  	}
> +	printf("*** Running Load Balancing test...\n");
> +	ret = load_balancing(t);
> +	if (ret != 0) {
> +		printf("ERROR - Load Balancing test FAILED.\n");
> +		return ret;
> +	}
> +	printf("*** Running Prioritized Directed test...\n");
> +	ret = test_priority_directed(t);
> +	if (ret != 0) {
> +		printf("ERROR - Prioritized Directed test FAILED.\n");
> +		return ret;
> +	}
> +	printf("*** Running Prioritized Atomic test...\n");
> +	ret = test_priority_atomic(t);
> +	if (ret != 0) {
> +		printf("ERROR - Prioritized Atomic test FAILED.\n");
> +		return ret;
> +	}
> +
> +	printf("*** Running Prioritized Ordered test...\n");
> +	ret = test_priority_ordered(t);
> +	if (ret != 0) {
> +		printf("ERROR - Prioritized Ordered test FAILED.\n");
> +		return ret;
> +	}
> +	printf("*** Running Prioritized Unordered test...\n");
> +	ret = test_priority_unordered(t);
> +	if (ret != 0) {
> +		printf("ERROR - Prioritized Unordered test FAILED.\n");
> +		return ret;
> +	}
>  	printf("*** Running Invalid QID test...\n");
>  	ret = invalid_qid(t);
>  	if (ret != 0) {
>  		printf("ERROR - Invalid QID test FAILED.\n");
>  		return ret;
>  	}
> +	printf("*** Running Load Balancing History test...\n");
> +	ret = load_balancing_history(t);
> +	if (ret != 0) {
> +		printf("ERROR - Load Balancing History test FAILED.\n");
> +		return ret;
> +	}
>  	printf("*** Running Inflight Count test...\n");
>  	ret = inflight_counts(t);
>  	if (ret != 0) {
> @@ -1388,6 +1948,12 @@ test_sw_eventdev(void)
>  		printf("ERROR - Abuse Inflights test FAILED.\n");
>  		return ret;
>  	}
> +	printf("*** Running QID Priority test...\n");
> +	ret = qid_priorities(t);
> +	if (ret != 0) {
> +		printf("ERROR - QID Priority test FAILED.\n");
> +		return ret;
> +	}
>  	printf("*** Running Ordered Reconfigure test...\n");
>  	ret = ordered_reconfigure(t);
>  	if (ret != 0) {
> -- 
> 2.7.4
> 

  reply	other threads:[~2017-04-02 14:57 UTC|newest]

Thread overview: 109+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <489175012-101439-1-git-send-email-harry.van.haaren@intel.com>
2017-03-24 16:52 ` [dpdk-dev] [PATCH v5 00/20] next-eventdev: event/sw software eventdev Harry van Haaren
2017-03-24 16:52   ` [dpdk-dev] [PATCH v5 01/20] test/eventdev: pass timeout ticks unsupported Harry van Haaren
2017-03-25  5:38     ` Jerin Jacob
2017-03-24 16:52   ` [dpdk-dev] [PATCH v5 02/20] event/sw: add new software-only eventdev driver Harry van Haaren
2017-03-25  6:24     ` Jerin Jacob
2017-03-27 15:30       ` Van Haaren, Harry
2017-03-24 16:52   ` [dpdk-dev] [PATCH v5 03/20] event/sw: add device capabilities function Harry van Haaren
2017-03-25 10:50     ` Jerin Jacob
2017-03-24 16:52   ` [dpdk-dev] [PATCH v5 04/20] event/sw: add configure function Harry van Haaren
2017-03-25 13:17     ` Jerin Jacob
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 05/20] event/sw: add fns to return default port/queue config Harry van Haaren
2017-03-25 13:21     ` Jerin Jacob
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 06/20] event/sw: add support for event queues Harry van Haaren
2017-03-27  7:45     ` Jerin Jacob
2017-03-27  8:47       ` Bruce Richardson
2017-03-27 15:17       ` Van Haaren, Harry
2017-03-28 10:43         ` Jerin Jacob
2017-03-28 12:42           ` Van Haaren, Harry
2017-03-28 17:36             ` Jerin Jacob
2017-03-29  8:28               ` Van Haaren, Harry
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 07/20] event/sw: add support for event ports Harry van Haaren
2017-03-27  8:55     ` Jerin Jacob
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 08/20] event/sw: add support for linking queues to ports Harry van Haaren
2017-03-27 11:20     ` Jerin Jacob
2017-03-29 10:58       ` Van Haaren, Harry
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 09/20] event/sw: add worker core functions Harry van Haaren
2017-03-27 13:50     ` Jerin Jacob
2017-03-28 16:17       ` Van Haaren, Harry
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 10/20] event/sw: add scheduling logic Harry van Haaren
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 11/20] event/sw: add start stop and close functions Harry van Haaren
2017-03-27 16:02     ` Jerin Jacob
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 12/20] event/sw: add dump function for easier debugging Harry van Haaren
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 13/20] event/sw: add xstats support Harry van Haaren
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 14/20] test/eventdev: add SW test infrastructure Harry van Haaren
2017-03-28 15:20     ` Burakov, Anatoly
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 15/20] test/eventdev: add basic SW tests Harry van Haaren
2017-03-28 15:21     ` Burakov, Anatoly
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 16/20] test/eventdev: add SW tests for load balancing Harry van Haaren
2017-03-28 15:21     ` Burakov, Anatoly
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 17/20] test/eventdev: add SW xstats tests Harry van Haaren
2017-03-28 15:22     ` Burakov, Anatoly
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 18/20] test/eventdev: add SW deadlock tests Harry van Haaren
2017-03-28 15:22     ` Burakov, Anatoly
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 19/20] doc: add event device and software eventdev Harry van Haaren
2017-03-29 13:47     ` Jerin Jacob
2017-03-24 16:53   ` [dpdk-dev] [PATCH v5 20/20] maintainers: add eventdev section and claim SW PMD Harry van Haaren
2017-03-29 13:05     ` Jerin Jacob
2017-03-29 23:25   ` [dpdk-dev] [PATCH v6 00/21] next-eventdev: event/sw software eventdev Harry van Haaren
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 01/21] eventdev: improve API docs for start function Harry van Haaren
2017-03-30 10:56       ` Burakov, Anatoly
2017-03-30 17:11       ` Jerin Jacob
2017-03-30 17:24         ` Van Haaren, Harry
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 02/21] test/eventdev: pass timeout ticks unsupported Harry van Haaren
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 03/21] event/sw: add new software-only eventdev driver Harry van Haaren
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 04/21] event/sw: add device capabilities function Harry van Haaren
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 05/21] event/sw: add configure function Harry van Haaren
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 06/21] event/sw: add fns to return default port/queue config Harry van Haaren
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 07/21] event/sw: add support for event queues Harry van Haaren
2017-03-30 18:06       ` Jerin Jacob
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 08/21] event/sw: add support for event ports Harry van Haaren
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 09/21] event/sw: add support for linking queues to ports Harry van Haaren
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 10/21] event/sw: add worker core functions Harry van Haaren
2017-03-30 18:07       ` Jerin Jacob
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 11/21] event/sw: add scheduling logic Harry van Haaren
2017-03-30 10:07       ` Hunt, David
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 12/21] event/sw: add start stop and close functions Harry van Haaren
2017-03-30  8:24       ` Jerin Jacob
2017-03-30  8:49         ` Van Haaren, Harry
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 13/21] event/sw: add dump function for easier debugging Harry van Haaren
2017-03-30 10:32       ` Hunt, David
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 14/21] event/sw: add xstats support Harry van Haaren
2017-03-30 11:12       ` Hunt, David
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 15/21] test/eventdev: add SW test infrastructure Harry van Haaren
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 16/21] test/eventdev: add basic SW tests Harry van Haaren
2017-03-29 23:25     ` [dpdk-dev] [PATCH v6 17/21] test/eventdev: add SW tests for load balancing Harry van Haaren
2017-03-29 23:26     ` [dpdk-dev] [PATCH v6 18/21] test/eventdev: add SW xstats tests Harry van Haaren
2017-03-29 23:26     ` [dpdk-dev] [PATCH v6 19/21] test/eventdev: add SW deadlock tests Harry van Haaren
2017-03-29 23:26     ` [dpdk-dev] [PATCH v6 20/21] doc: add event device and software eventdev Harry van Haaren
2017-03-30  8:27       ` Burakov, Anatoly
2017-03-29 23:26     ` [dpdk-dev] [PATCH v6 21/21] maintainers: add eventdev section and claim SW PMD Harry van Haaren
2017-03-30 19:30     ` [dpdk-dev] [PATCH v7 00/22] next-eventdev: event/sw software eventdev Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 01/22] eventdev: improve API docs for start function Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 02/22] test/eventdev: pass timeout ticks unsupported Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 03/22] event/sw: add new software-only eventdev driver Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 04/22] event/sw: add device capabilities function Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 05/22] event/sw: add configure function Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 06/22] event/sw: add fns to return default port/queue config Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 07/22] event/sw: add support for event queues Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 08/22] event/sw: add support for event ports Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 09/22] event/sw: add support for linking queues to ports Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 10/22] event/sw: add worker core functions Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 11/22] event/sw: add scheduling logic Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 12/22] event/sw: add start stop and close functions Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 13/22] event/sw: add dump function for easier debugging Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 14/22] event/sw: add xstats support Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 15/22] test/eventdev: add SW test infrastructure Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 16/22] test/eventdev: add basic SW tests Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 17/22] test/eventdev: add SW tests for load balancing Harry van Haaren
2017-04-02 14:56         ` Jerin Jacob [this message]
2017-04-03  9:08           ` Van Haaren, Harry
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 18/22] test/eventdev: add SW xstats tests Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 19/22] test/eventdev: add SW deadlock tests Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 20/22] doc: add event device and software eventdev Harry van Haaren
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 21/22] doc: add SW eventdev PMD to 17.05 release notes Harry van Haaren
2017-03-31 12:23         ` Hunt, David
2017-03-31 14:45         ` Jerin Jacob
2017-03-30 19:30       ` [dpdk-dev] [PATCH v7 22/22] maintainers: add eventdev section and claim SW PMD Harry van Haaren
2017-03-31 13:56         ` Jerin Jacob
2017-04-01 11:38       ` [dpdk-dev] [PATCH v7 00/22] next-eventdev: event/sw software eventdev Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170402145646.c54niqeptw6lclnc@localhost.localdomain \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).