DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] MAINTAINERS: update maintainer for reorder library
@ 2015-10-21 10:50 Reshma Pattan
  2015-10-21 10:50 ` [dpdk-dev] [PATCH v2] app/test: fix reorder library unit test Reshma Pattan
  2015-10-21 13:02 ` [dpdk-dev] [PATCH] MAINTAINERS: update maintainer for reorder library Sergio Gonzalez Monroy
  0 siblings, 2 replies; 7+ messages in thread
From: Reshma Pattan @ 2015-10-21 10:50 UTC (permalink / raw)
  To: dev

Updated maintainers list for reorder library

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
 MAINTAINERS |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 080a8e8..bdc0981 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -314,7 +314,7 @@ F: examples/distributor/
 F: doc/guides/sample_app_ug/dist_app.rst
 
 Reorder
-M: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
+M: Reshma Pattan <reshma.pattan@intel.com>
 F: lib/librte_reorder/
 F: doc/guides/prog_guide/reorder_lib.rst
 F: app/test/test_reorder*
-- 
1.7.4.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v2] app/test: fix reorder library unit test
  2015-10-21 10:50 [dpdk-dev] [PATCH] MAINTAINERS: update maintainer for reorder library Reshma Pattan
@ 2015-10-21 10:50 ` Reshma Pattan
  2015-10-21 13:01   ` Sergio Gonzalez Monroy
  2015-10-21 13:02 ` [dpdk-dev] [PATCH] MAINTAINERS: update maintainer for reorder library Sergio Gonzalez Monroy
  1 sibling, 1 reply; 7+ messages in thread
From: Reshma Pattan @ 2015-10-21 10:50 UTC (permalink / raw)
  To: dev

The reorder library unit test was performed under the assumption that the start
sequence number was always 0.
This is not the case anymore as the start sequence number is initialized by the first
packet inserted into the reorder buffer.

This patch updates the unit test to reflect the new behavior.

Fixes: 7e1fa1de8a53 ("reorder: allow random number as starting point")

Signed-off-by: Reshma Pattan<reshma.pattan@intel.com>

---
Version 2:
split patch for unit test only
update commit message

 app/test/test_reorder.c |   75 ++++++++++++++++++++++++-----------------------
 1 files changed, 38 insertions(+), 37 deletions(-)

diff --git a/app/test/test_reorder.c b/app/test/test_reorder.c
index 5752d7e..67f3151 100644
--- a/app/test/test_reorder.c
+++ b/app/test/test_reorder.c
@@ -77,7 +77,6 @@ test_reorder_create(void)
 			"No error on create() with invalid buffer size param.");
 
 	b = rte_reorder_create("PKT_RO1", rte_socket_id(), REORDER_BUFFER_SIZE);
-	printf("DEBUG: b= %p, orig_b= %p\n", b, test_params->b);
 	TEST_ASSERT_EQUAL(b, test_params->b,
 			"New reorder instance created with already existing name");
 
@@ -165,7 +164,7 @@ test_reorder_insert(void)
 	struct rte_reorder_buffer *b = NULL;
 	struct rte_mempool *p = test_params->p;
 	const unsigned int size = 4;
-	const unsigned int num_bufs = 6;
+	const unsigned int num_bufs = 7;
 	struct rte_mbuf *bufs[num_bufs];
 	int ret = 0;
 	unsigned i;
@@ -181,16 +180,6 @@ test_reorder_insert(void)
 	ret = rte_mempool_get_bulk(p, (void *)bufs, num_bufs);
 	TEST_ASSERT_SUCCESS(ret, "Error getting mbuf from pool");
 
-	/* late packet */
-	bufs[0]->seqn = 3 * size;
-	ret = rte_reorder_insert(b, bufs[0]);
-	if (!((ret == -1) && (rte_errno == ERANGE))) {
-		printf("%s:%d: No error inserting late packet with seqn:"
-				" 3 * size\n", __func__, __LINE__);
-		ret = -1;
-		goto exit;
-	}
-
 	for (i = 0; i < num_bufs; i++)
 		bufs[i]->seqn = i;
 
@@ -232,6 +221,16 @@ test_reorder_insert(void)
 		goto exit;
 	}
 
+	/* late packet */
+	bufs[6]->seqn = 3 * size;
+	ret = rte_reorder_insert(b, bufs[6]);
+	if (!((ret == -1) && (rte_errno == ERANGE))) {
+		printf("%s:%d: No error inserting late packet with seqn:"
+				" 3 * size\n", __func__, __LINE__);
+		ret = -1;
+		goto exit;
+	}
+
 	ret = 0;
 exit:
 	rte_mempool_put_bulk(p, (void *)bufs, num_bufs);
@@ -245,8 +244,9 @@ test_reorder_drain(void)
 	struct rte_reorder_buffer *b = NULL;
 	struct rte_mempool *p = test_params->p;
 	const unsigned int size = 4;
-	const unsigned int num_bufs = 10;
+	const unsigned int num_bufs = 8;
 	struct rte_mbuf *bufs[num_bufs];
+	struct rte_mbuf *robufs[num_bufs];
 	int ret = 0;
 	unsigned i, cnt;
 
@@ -255,14 +255,14 @@ test_reorder_drain(void)
 	 * ready_buf: RB[size] = {NULL, NULL, NULL, NULL}
 	 * order_buf: OB[size] = {NULL, NULL, NULL, NULL}
 	 */
-	b = rte_reorder_create("test_insert", rte_socket_id(), size);
+	b = rte_reorder_create("test_drain", rte_socket_id(), size);
 	TEST_ASSERT_NOT_NULL(b, "Failed to create reorder buffer");
 
 	ret = rte_mempool_get_bulk(p, (void *)bufs, num_bufs);
 	TEST_ASSERT_SUCCESS(ret, "Error getting mbuf from pool");
 
 	/* Check no drained packets if reorder is empty */
-	cnt = rte_reorder_drain(b, bufs, 1);
+	cnt = rte_reorder_drain(b, robufs, 1);
 	if (cnt != 0) {
 		printf("%s:%d: drained packets from empty reorder buffer\n",
 				__func__, __LINE__);
@@ -276,29 +276,40 @@ test_reorder_drain(void)
 	/* Insert packet with seqn 1:
 	 * reorder_seq = 0
 	 * RB[] = {NULL, NULL, NULL, NULL}
-	 * OB[] = {NULL, 1, NULL, NULL}
+	 * OB[] = {1, NULL, NULL, NULL}
 	 */
 	rte_reorder_insert(b, bufs[1]);
 
-	/* Check no drained packets if no ready/order packets */
-	cnt = rte_reorder_drain(b, bufs, 1);
-	if (cnt != 0) {
-		printf("%s:%d: drained packets from empty reorder buffer\n",
-				__func__, __LINE__);
+	cnt = rte_reorder_drain(b, robufs, 1);
+	if (cnt != 1) {
+		printf("%s:%d:%d: number of expected packets not drained\n",
+				__func__, __LINE__, cnt);
 		ret = -1;
 		goto exit;
 	}
 
 	/* Insert more packets
 	 * RB[] = {NULL, NULL, NULL, NULL}
-	 * OB[] = {0, 1, NULL, 3}
+	 * OB[] = {NULL, 2, 3, NULL}
 	 */
-	rte_reorder_insert(b, bufs[0]);
+	rte_reorder_insert(b, bufs[2]);
 	rte_reorder_insert(b, bufs[3]);
 
+	/* Insert more packets
+	 * RB[] = {NULL, NULL, NULL, NULL}
+	 * OB[] = {NULL, 2, 3, 4}
+	 */
+	rte_reorder_insert(b, bufs[4]);
+
+	/* Insert more packets
+	 * RB[] = {2, 3, 4, NULL}
+	 * OB[] = {NULL, NULL, 7, NULL}
+	 */
+	rte_reorder_insert(b, bufs[7]);
+
 	/* drained expected packets */
-	cnt = rte_reorder_drain(b, bufs, 4);
-	if (cnt != 2) {
+	cnt = rte_reorder_drain(b, robufs, 4);
+	if (cnt != 3) {
 		printf("%s:%d:%d: number of expected packets not drained\n",
 				__func__, __LINE__, cnt);
 		ret = -1;
@@ -307,25 +318,15 @@ test_reorder_drain(void)
 
 	/*
 	 * RB[] = {NULL, NULL, NULL, NULL}
-	 * OB[] = {NULL, 3, NULL, NULL}
-	 */
-
-	rte_reorder_insert(b, bufs[4]);
-	rte_reorder_insert(b, bufs[7]);
-
-	/*
-	 * RB[] = {3, 4, NULL, NULL}
 	 * OB[] = {NULL, NULL, 7, NULL}
 	 */
-
-	cnt = rte_reorder_drain(b, bufs, 4);
-	if (cnt != 2) {
+	cnt = rte_reorder_drain(b, robufs, 1);
+	if (cnt != 0) {
 		printf("%s:%d:%d: number of expected packets not drained\n",
 				__func__, __LINE__, cnt);
 		ret = -1;
 		goto exit;
 	}
-
 	ret = 0;
 exit:
 	rte_mempool_put_bulk(p, (void *)bufs, num_bufs);
-- 
1.7.4.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2] app/test: fix reorder library unit test
  2015-10-21 10:50 ` [dpdk-dev] [PATCH v2] app/test: fix reorder library unit test Reshma Pattan
@ 2015-10-21 13:01   ` Sergio Gonzalez Monroy
  2015-10-30 14:30     ` Sergio Gonzalez Monroy
  0 siblings, 1 reply; 7+ messages in thread
From: Sergio Gonzalez Monroy @ 2015-10-21 13:01 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: dev

On 21/10/2015 11:50, Reshma Pattan wrote:
> The reorder library unit test was performed under the assumption that the start
> sequence number was always 0.
> This is not the case anymore as the start sequence number is initialized by the first
> packet inserted into the reorder buffer.
>
> This patch updates the unit test to reflect the new behavior.
>
> Fixes: 7e1fa1de8a53 ("reorder: allow random number as starting point")
>
> Signed-off-by: Reshma Pattan<reshma.pattan@intel.com>
>
> ---
> Version 2:
> split patch for unit test only
> update commit message
>
>   app/test/test_reorder.c |   75 ++++++++++++++++++++++++-----------------------
>   1 files changed, 38 insertions(+), 37 deletions(-)
>
>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] MAINTAINERS: update maintainer for reorder library
  2015-10-21 10:50 [dpdk-dev] [PATCH] MAINTAINERS: update maintainer for reorder library Reshma Pattan
  2015-10-21 10:50 ` [dpdk-dev] [PATCH v2] app/test: fix reorder library unit test Reshma Pattan
@ 2015-10-21 13:02 ` Sergio Gonzalez Monroy
  2015-11-12 15:47   ` Thomas Monjalon
  1 sibling, 1 reply; 7+ messages in thread
From: Sergio Gonzalez Monroy @ 2015-10-21 13:02 UTC (permalink / raw)
  To: Reshma Pattan, dev

On 21/10/2015 11:50, Reshma Pattan wrote:
> Updated maintainers list for reorder library
>
> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
> ---
>   MAINTAINERS |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 080a8e8..bdc0981 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -314,7 +314,7 @@ F: examples/distributor/
>   F: doc/guides/sample_app_ug/dist_app.rst
>   
>   Reorder
> -M: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
> +M: Reshma Pattan <reshma.pattan@intel.com>
>   F: lib/librte_reorder/
>   F: doc/guides/prog_guide/reorder_lib.rst
>   F: app/test/test_reorder*
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2] app/test: fix reorder library unit test
  2015-10-21 13:01   ` Sergio Gonzalez Monroy
@ 2015-10-30 14:30     ` Sergio Gonzalez Monroy
  2015-11-12 15:42       ` Thomas Monjalon
  0 siblings, 1 reply; 7+ messages in thread
From: Sergio Gonzalez Monroy @ 2015-10-30 14:30 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: dev

On 21/10/2015 14:01, Sergio Gonzalez Monroy wrote:
> On 21/10/2015 11:50, Reshma Pattan wrote:
>> The reorder library unit test was performed under the assumption that 
>> the start
>> sequence number was always 0.
>> This is not the case anymore as the start sequence number is 
>> initialized by the first
>> packet inserted into the reorder buffer.
>>
>> This patch updates the unit test to reflect the new behavior.
>>
>> Fixes: 7e1fa1de8a53 ("reorder: allow random number as starting point")
>>
>> Signed-off-by: Reshma Pattan<reshma.pattan@intel.com>
>>
>> ---
>> Version 2:
>> split patch for unit test only
>> update commit message
>>
>>   app/test/test_reorder.c |   75 
>> ++++++++++++++++++++++++-----------------------
>>   1 files changed, 38 insertions(+), 37 deletions(-)
>>
>>
> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Forgot to add this tag:

Reported-by: Mukesh Dua <mukesh.dua81@gmail.com>

Sergio

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2] app/test: fix reorder library unit test
  2015-10-30 14:30     ` Sergio Gonzalez Monroy
@ 2015-11-12 15:42       ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2015-11-12 15:42 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: dev

2015-10-30 14:30, Sergio Gonzalez Monroy:
> On 21/10/2015 14:01, Sergio Gonzalez Monroy wrote:
> > On 21/10/2015 11:50, Reshma Pattan wrote:
> >> The reorder library unit test was performed under the assumption that 
> >> the start
> >> sequence number was always 0.
> >> This is not the case anymore as the start sequence number is 
> >> initialized by the first
> >> packet inserted into the reorder buffer.
> >>
> >> This patch updates the unit test to reflect the new behavior.
> >>
> >> Fixes: 7e1fa1de8a53 ("reorder: allow random number as starting point")
> >>
> >> Signed-off-by: Reshma Pattan<reshma.pattan@intel.com>
> >>
> > Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
> Forgot to add this tag:
> 
> Reported-by: Mukesh Dua <mukesh.dua81@gmail.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] MAINTAINERS: update maintainer for reorder library
  2015-10-21 13:02 ` [dpdk-dev] [PATCH] MAINTAINERS: update maintainer for reorder library Sergio Gonzalez Monroy
@ 2015-11-12 15:47   ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2015-11-12 15:47 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: dev

> >   Reorder
> > -M: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
> > +M: Reshma Pattan <reshma.pattan@intel.com>
> >   F: lib/librte_reorder/
> >   F: doc/guides/prog_guide/reorder_lib.rst
> >   F: app/test/test_reorder*
> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>

So you are replacing Sergio.
Any enhancement or feature planned?

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-12 15:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-21 10:50 [dpdk-dev] [PATCH] MAINTAINERS: update maintainer for reorder library Reshma Pattan
2015-10-21 10:50 ` [dpdk-dev] [PATCH v2] app/test: fix reorder library unit test Reshma Pattan
2015-10-21 13:01   ` Sergio Gonzalez Monroy
2015-10-30 14:30     ` Sergio Gonzalez Monroy
2015-11-12 15:42       ` Thomas Monjalon
2015-10-21 13:02 ` [dpdk-dev] [PATCH] MAINTAINERS: update maintainer for reorder library Sergio Gonzalez Monroy
2015-11-12 15:47   ` Thomas Monjalon

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).