All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Various fixes for L2fwd-crypto
@ 2016-02-03 11:14 Pablo de Lara
  2016-02-03 11:14 ` [PATCH 1/4] l2fwd-crypto: fix accumulated stats Pablo de Lara
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-03 11:14 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

This patchset includes param handling, typo and
statistics fixes in the L2fwd-crypto sample app.

Pablo de Lara (4):
  l2fwd-crypto: fix accumulated stats
  l2fwd-crypto: fix incorrect params in command line help
  l2fwd-crypto: fix auth params setting
  l2fwd-crypto: fix typos

 examples/l2fwd-crypto/main.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

-- 
2.5.0

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

* [PATCH 1/4] l2fwd-crypto: fix accumulated stats
  2016-02-03 11:14 [PATCH 0/4] Various fixes for L2fwd-crypto Pablo de Lara
@ 2016-02-03 11:14 ` Pablo de Lara
  2016-02-03 11:14 ` [PATCH 2/4] l2fwd-crypto: fix incorrect params in command line help Pablo de Lara
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-03 11:14 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

Total number of packets (adding up packets RX/TX/dropped in all ports),
where being increased by the accumulated number of packets per port
every time the stats were printed, instead of the resetting
them.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index d70fc9a..928b285 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -205,17 +205,20 @@ struct l2fwd_crypto_statistics crypto_statistics[RTE_MAX_ETHPORTS];
 /* default period is 10 seconds */
 static int64_t timer_period = 10 * TIMER_MILLISECOND * 1000;
 
-uint64_t total_packets_dropped = 0, total_packets_tx = 0, total_packets_rx = 0,
-	total_packets_enqueued = 0, total_packets_dequeued = 0,
+uint64_t total_packets_enqueued = 0, total_packets_dequeued = 0,
 	total_packets_errors = 0;
 
 /* Print out statistics on packets dropped */
 static void
 print_stats(void)
 {
+	uint64_t total_packets_dropped, total_packets_tx, total_packets_rx;
 	unsigned portid;
 	uint64_t cdevid;
 
+	total_packets_dropped = 0;
+	total_packets_tx = 0;
+	total_packets_rx = 0;
 
 	const char clr[] = { 27, '[', '2', 'J', '\0' };
 	const char topLeft[] = { 27, '[', '1', ';', '1', 'H', '\0' };
-- 
2.5.0

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

* [PATCH 2/4] l2fwd-crypto: fix incorrect params in command line help
  2016-02-03 11:14 [PATCH 0/4] Various fixes for L2fwd-crypto Pablo de Lara
  2016-02-03 11:14 ` [PATCH 1/4] l2fwd-crypto: fix accumulated stats Pablo de Lara
@ 2016-02-03 11:14 ` Pablo de Lara
  2016-02-03 11:14 ` [PATCH 3/4] l2fwd-crypto: fix auth params setting Pablo de Lara
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-03 11:14 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 928b285..37f59c4 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -669,8 +669,9 @@ l2fwd_crypto_usage(const char *prgname)
 		"  --cipher_algo ALGO\n"
 		"  --cipher_op ENCRYPT / DECRYPT\n"
 		"  --cipher_key KEY\n"
+		"  --iv IV\n"
 
-		"  --auth ALGO\n"
+		"  --auth_algo ALGO\n"
 		"  --auth_op GENERATE / VERIFY\n"
 		"  --auth_key KEY\n"
 
-- 
2.5.0

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

* [PATCH 3/4] l2fwd-crypto: fix auth params setting
  2016-02-03 11:14 [PATCH 0/4] Various fixes for L2fwd-crypto Pablo de Lara
  2016-02-03 11:14 ` [PATCH 1/4] l2fwd-crypto: fix accumulated stats Pablo de Lara
  2016-02-03 11:14 ` [PATCH 2/4] l2fwd-crypto: fix incorrect params in command line help Pablo de Lara
@ 2016-02-03 11:14 ` Pablo de Lara
  2016-02-03 11:14 ` [PATCH 4/4] l2fwd-crypto: fix typos Pablo de Lara
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-03 11:14 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 37f59c4..17a7774 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -791,7 +791,7 @@ parse_auth_op(enum rte_crypto_auth_operation *op, char *optarg)
 		*op = RTE_CRYPTO_AUTH_OP_VERIFY;
 		return 0;
 	} else if (strcmp("GENERATE", optarg) == 0) {
-		*op = RTE_CRYPTO_AUTH_OP_VERIFY;
+		*op = RTE_CRYPTO_AUTH_OP_GENERATE;
 		return 0;
 	}
 
@@ -829,11 +829,11 @@ l2fwd_crypto_parse_args_long_options(struct l2fwd_crypto_options *options,
 
 	/* Authentication options */
 	else if (strcmp(lgopts[option_index].name, "auth_algo") == 0)
-		return parse_auth_algo(&options->cipher_xform.auth.algo,
+		return parse_auth_algo(&options->auth_xform.auth.algo,
 				optarg);
 
 	else if (strcmp(lgopts[option_index].name, "auth_op") == 0)
-		return parse_auth_op(&options->cipher_xform.auth.op,
+		return parse_auth_op(&options->auth_xform.auth.op,
 				optarg);
 
 	else if (strcmp(lgopts[option_index].name, "auth_key") == 0)
-- 
2.5.0

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

* [PATCH 4/4] l2fwd-crypto: fix typos
  2016-02-03 11:14 [PATCH 0/4] Various fixes for L2fwd-crypto Pablo de Lara
                   ` (2 preceding siblings ...)
  2016-02-03 11:14 ` [PATCH 3/4] l2fwd-crypto: fix auth params setting Pablo de Lara
@ 2016-02-03 11:14 ` Pablo de Lara
  2016-02-04  8:26 ` [PATCH v2 0/4] Various fixes for L2fwd-crypto Pablo de Lara
  2016-02-04  8:26 ` [PATCH " De Lara Guarch, Pablo
  5 siblings, 0 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-03 11:14 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 17a7774..9145f1c 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -979,9 +979,9 @@ l2fwd_crypto_options_print(struct l2fwd_crypto_options *options)
 
 	switch (options->cdev_type) {
 	case RTE_CRYPTODEV_AESNI_MB_PMD:
-		printf("crytpodev type: AES-NI MB PMD\n"); break;
+		printf("cryptodev type: AES-NI MB PMD\n"); break;
 	case RTE_CRYPTODEV_QAT_PMD:
-		printf("crytpodev type: QAT PMD\n"); break;
+		printf("cryptodev type: QAT PMD\n"); break;
 	default:
 		break;
 	}
-- 
2.5.0

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

* [PATCH v2 0/4] Various fixes for L2fwd-crypto
  2016-02-03 11:14 [PATCH 0/4] Various fixes for L2fwd-crypto Pablo de Lara
                   ` (3 preceding siblings ...)
  2016-02-03 11:14 ` [PATCH 4/4] l2fwd-crypto: fix typos Pablo de Lara
@ 2016-02-04  8:26 ` Pablo de Lara
  2016-02-04  8:26   ` [PATCH v2 1/4] l2fwd-crypto: fix accumulated stats Pablo de Lara
                     ` (5 more replies)
  2016-02-04  8:26 ` [PATCH " De Lara Guarch, Pablo
  5 siblings, 6 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-04  8:26 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

This patchset includes param handling, typo and
statistics fixes in the L2fwd-crypto sample app.

Changes in v2:
- Include "Fixes" line

Pablo de Lara (4):
  l2fwd-crypto: fix accumulated stats
  l2fwd-crypto: fix incorrect params in command line help
  l2fwd-crypto: fix auth params setting
  l2fwd-crypto: fix typos

 examples/l2fwd-crypto/main.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

-- 
2.5.0

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

* [PATCH v2 1/4] l2fwd-crypto: fix accumulated stats
  2016-02-04  8:26 ` [PATCH v2 0/4] Various fixes for L2fwd-crypto Pablo de Lara
@ 2016-02-04  8:26   ` Pablo de Lara
  2016-02-04  8:26   ` [PATCH v2 2/4] l2fwd-crypto: fix incorrect params in command line help Pablo de Lara
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-04  8:26 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

Total number of packets (adding up packets RX/TX/dropped in all ports),
where being increased by the accumulated number of packets per port
every time the stats were printed, instead of the resetting
them.

Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index d70fc9a..928b285 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -205,17 +205,20 @@ struct l2fwd_crypto_statistics crypto_statistics[RTE_MAX_ETHPORTS];
 /* default period is 10 seconds */
 static int64_t timer_period = 10 * TIMER_MILLISECOND * 1000;
 
-uint64_t total_packets_dropped = 0, total_packets_tx = 0, total_packets_rx = 0,
-	total_packets_enqueued = 0, total_packets_dequeued = 0,
+uint64_t total_packets_enqueued = 0, total_packets_dequeued = 0,
 	total_packets_errors = 0;
 
 /* Print out statistics on packets dropped */
 static void
 print_stats(void)
 {
+	uint64_t total_packets_dropped, total_packets_tx, total_packets_rx;
 	unsigned portid;
 	uint64_t cdevid;
 
+	total_packets_dropped = 0;
+	total_packets_tx = 0;
+	total_packets_rx = 0;
 
 	const char clr[] = { 27, '[', '2', 'J', '\0' };
 	const char topLeft[] = { 27, '[', '1', ';', '1', 'H', '\0' };
-- 
2.5.0

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

* [PATCH v2 2/4] l2fwd-crypto: fix incorrect params in command line help
  2016-02-04  8:26 ` [PATCH v2 0/4] Various fixes for L2fwd-crypto Pablo de Lara
  2016-02-04  8:26   ` [PATCH v2 1/4] l2fwd-crypto: fix accumulated stats Pablo de Lara
@ 2016-02-04  8:26   ` Pablo de Lara
  2016-02-04  8:26   ` [PATCH v2 3/4] l2fwd-crypto: fix auth params setting Pablo de Lara
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-04  8:26 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 928b285..37f59c4 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -669,8 +669,9 @@ l2fwd_crypto_usage(const char *prgname)
 		"  --cipher_algo ALGO\n"
 		"  --cipher_op ENCRYPT / DECRYPT\n"
 		"  --cipher_key KEY\n"
+		"  --iv IV\n"
 
-		"  --auth ALGO\n"
+		"  --auth_algo ALGO\n"
 		"  --auth_op GENERATE / VERIFY\n"
 		"  --auth_key KEY\n"
 
-- 
2.5.0

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

* [PATCH v2 3/4] l2fwd-crypto: fix auth params setting
  2016-02-04  8:26 ` [PATCH v2 0/4] Various fixes for L2fwd-crypto Pablo de Lara
  2016-02-04  8:26   ` [PATCH v2 1/4] l2fwd-crypto: fix accumulated stats Pablo de Lara
  2016-02-04  8:26   ` [PATCH v2 2/4] l2fwd-crypto: fix incorrect params in command line help Pablo de Lara
@ 2016-02-04  8:26   ` Pablo de Lara
  2016-02-04  8:26   ` [PATCH v2 4/4] l2fwd-crypto: fix typos Pablo de Lara
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-04  8:26 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 37f59c4..17a7774 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -791,7 +791,7 @@ parse_auth_op(enum rte_crypto_auth_operation *op, char *optarg)
 		*op = RTE_CRYPTO_AUTH_OP_VERIFY;
 		return 0;
 	} else if (strcmp("GENERATE", optarg) == 0) {
-		*op = RTE_CRYPTO_AUTH_OP_VERIFY;
+		*op = RTE_CRYPTO_AUTH_OP_GENERATE;
 		return 0;
 	}
 
@@ -829,11 +829,11 @@ l2fwd_crypto_parse_args_long_options(struct l2fwd_crypto_options *options,
 
 	/* Authentication options */
 	else if (strcmp(lgopts[option_index].name, "auth_algo") == 0)
-		return parse_auth_algo(&options->cipher_xform.auth.algo,
+		return parse_auth_algo(&options->auth_xform.auth.algo,
 				optarg);
 
 	else if (strcmp(lgopts[option_index].name, "auth_op") == 0)
-		return parse_auth_op(&options->cipher_xform.auth.op,
+		return parse_auth_op(&options->auth_xform.auth.op,
 				optarg);
 
 	else if (strcmp(lgopts[option_index].name, "auth_key") == 0)
-- 
2.5.0

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

* [PATCH v2 4/4] l2fwd-crypto: fix typos
  2016-02-04  8:26 ` [PATCH v2 0/4] Various fixes for L2fwd-crypto Pablo de Lara
                     ` (2 preceding siblings ...)
  2016-02-04  8:26   ` [PATCH v2 3/4] l2fwd-crypto: fix auth params setting Pablo de Lara
@ 2016-02-04  8:26   ` Pablo de Lara
  2016-02-12  9:16   ` [PATCH v2 0/4] Various fixes for L2fwd-crypto De Lara Guarch, Pablo
  2016-02-12  9:17   ` [PATCH v3 " Pablo de Lara
  5 siblings, 0 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-04  8:26 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 17a7774..9145f1c 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -979,9 +979,9 @@ l2fwd_crypto_options_print(struct l2fwd_crypto_options *options)
 
 	switch (options->cdev_type) {
 	case RTE_CRYPTODEV_AESNI_MB_PMD:
-		printf("crytpodev type: AES-NI MB PMD\n"); break;
+		printf("cryptodev type: AES-NI MB PMD\n"); break;
 	case RTE_CRYPTODEV_QAT_PMD:
-		printf("crytpodev type: QAT PMD\n"); break;
+		printf("cryptodev type: QAT PMD\n"); break;
 	default:
 		break;
 	}
-- 
2.5.0

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

* Re: [PATCH 0/4] Various fixes for L2fwd-crypto
  2016-02-03 11:14 [PATCH 0/4] Various fixes for L2fwd-crypto Pablo de Lara
                   ` (4 preceding siblings ...)
  2016-02-04  8:26 ` [PATCH v2 0/4] Various fixes for L2fwd-crypto Pablo de Lara
@ 2016-02-04  8:26 ` De Lara Guarch, Pablo
  5 siblings, 0 replies; 19+ messages in thread
From: De Lara Guarch, Pablo @ 2016-02-04  8:26 UTC (permalink / raw)
  To: Doherty, Declan; +Cc: dev



> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Wednesday, February 03, 2016 11:14 AM
> To: Doherty, Declan
> Cc: dev@dpdk.org; De Lara Guarch, Pablo
> Subject: [PATCH 0/4] Various fixes for L2fwd-crypto
> 
> This patchset includes param handling, typo and
> statistics fixes in the L2fwd-crypto sample app.
> 
> Pablo de Lara (4):
>   l2fwd-crypto: fix accumulated stats
>   l2fwd-crypto: fix incorrect params in command line help
>   l2fwd-crypto: fix auth params setting
>   l2fwd-crypto: fix typos
> 
>  examples/l2fwd-crypto/main.c | 20 ++++++++++++--------
>  1 file changed, 12 insertions(+), 8 deletions(-)
> 
> --
> 2.5.0

Nack, forgot fixes line.

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

* Re: [PATCH v2 0/4] Various fixes for L2fwd-crypto
  2016-02-04  8:26 ` [PATCH v2 0/4] Various fixes for L2fwd-crypto Pablo de Lara
                     ` (3 preceding siblings ...)
  2016-02-04  8:26   ` [PATCH v2 4/4] l2fwd-crypto: fix typos Pablo de Lara
@ 2016-02-12  9:16   ` De Lara Guarch, Pablo
  2016-02-12  9:17   ` [PATCH v3 " Pablo de Lara
  5 siblings, 0 replies; 19+ messages in thread
From: De Lara Guarch, Pablo @ 2016-02-12  9:16 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Doherty, Declan; +Cc: dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Thursday, February 04, 2016 8:26 AM
> To: Doherty, Declan
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v2 0/4] Various fixes for L2fwd-crypto
> Importance: High
> 
> This patchset includes param handling, typo and
> statistics fixes in the L2fwd-crypto sample app.
> 
> Changes in v2:
> - Include "Fixes" line
> 
> Pablo de Lara (4):
>   l2fwd-crypto: fix accumulated stats
>   l2fwd-crypto: fix incorrect params in command line help
>   l2fwd-crypto: fix auth params setting
>   l2fwd-crypto: fix typos
> 
>  examples/l2fwd-crypto/main.c | 20 ++++++++++++--------
>  1 file changed, 12 insertions(+), 8 deletions(-)
> 
> --
> 2.5.0

Nack, first patch needs an additional fix.

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

* [PATCH v3 0/4] Various fixes for L2fwd-crypto
  2016-02-04  8:26 ` [PATCH v2 0/4] Various fixes for L2fwd-crypto Pablo de Lara
                     ` (4 preceding siblings ...)
  2016-02-12  9:16   ` [PATCH v2 0/4] Various fixes for L2fwd-crypto De Lara Guarch, Pablo
@ 2016-02-12  9:17   ` Pablo de Lara
  2016-02-12  9:17     ` [PATCH v3 1/4] l2fwd-crypto: fix total stats Pablo de Lara
                       ` (4 more replies)
  5 siblings, 5 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-12  9:17 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

This patchset includes param handling, typo and
statistics fixes in the L2fwd-crypto sample app.

Changes in v3:
- Reset all accumulated stats

Changes in v2:
- Include "Fixes" line


Pablo de Lara (4):
  l2fwd-crypto: fix total stats
  l2fwd-crypto: fix incorrect params in command line help
  l2fwd-crypto: fix auth params setting
  l2fwd-crypto: fix typos

 examples/l2fwd-crypto/main.c | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

-- 
2.5.0

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

* [PATCH v3 1/4] l2fwd-crypto: fix total stats
  2016-02-12  9:17   ` [PATCH v3 " Pablo de Lara
@ 2016-02-12  9:17     ` Pablo de Lara
  2016-02-12  9:17     ` [PATCH v3 2/4] l2fwd-crypto: fix incorrect params in command line help Pablo de Lara
                       ` (3 subsequent siblings)
  4 siblings, 0 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-12  9:17 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

Reset total statistics (sum of all port statistics) before
adding up the new accumulated statistics per port.

Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index d70fc9a..113d8f5 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -205,17 +205,22 @@ struct l2fwd_crypto_statistics crypto_statistics[RTE_MAX_ETHPORTS];
 /* default period is 10 seconds */
 static int64_t timer_period = 10 * TIMER_MILLISECOND * 1000;
 
-uint64_t total_packets_dropped = 0, total_packets_tx = 0, total_packets_rx = 0,
-	total_packets_enqueued = 0, total_packets_dequeued = 0,
-	total_packets_errors = 0;
-
 /* Print out statistics on packets dropped */
 static void
 print_stats(void)
 {
+	uint64_t total_packets_dropped, total_packets_tx, total_packets_rx;
+	uint64_t total_packets_enqueued, total_packets_dequeued,
+		total_packets_errors;
 	unsigned portid;
 	uint64_t cdevid;
 
+	total_packets_dropped = 0;
+	total_packets_tx = 0;
+	total_packets_rx = 0;
+	total_packets_enqueued = 0;
+	total_packets_dequeued = 0;
+	total_packets_errors = 0;
 
 	const char clr[] = { 27, '[', '2', 'J', '\0' };
 	const char topLeft[] = { 27, '[', '1', ';', '1', 'H', '\0' };
-- 
2.5.0

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

* [PATCH v3 2/4] l2fwd-crypto: fix incorrect params in command line help
  2016-02-12  9:17   ` [PATCH v3 " Pablo de Lara
  2016-02-12  9:17     ` [PATCH v3 1/4] l2fwd-crypto: fix total stats Pablo de Lara
@ 2016-02-12  9:17     ` Pablo de Lara
  2016-02-12  9:17     ` [PATCH v3 3/4] l2fwd-crypto: fix auth params setting Pablo de Lara
                       ` (2 subsequent siblings)
  4 siblings, 0 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-12  9:17 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 113d8f5..86797c6 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -671,8 +671,9 @@ l2fwd_crypto_usage(const char *prgname)
 		"  --cipher_algo ALGO\n"
 		"  --cipher_op ENCRYPT / DECRYPT\n"
 		"  --cipher_key KEY\n"
+		"  --iv IV\n"
 
-		"  --auth ALGO\n"
+		"  --auth_algo ALGO\n"
 		"  --auth_op GENERATE / VERIFY\n"
 		"  --auth_key KEY\n"
 
-- 
2.5.0

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

* [PATCH v3 3/4] l2fwd-crypto: fix auth params setting
  2016-02-12  9:17   ` [PATCH v3 " Pablo de Lara
  2016-02-12  9:17     ` [PATCH v3 1/4] l2fwd-crypto: fix total stats Pablo de Lara
  2016-02-12  9:17     ` [PATCH v3 2/4] l2fwd-crypto: fix incorrect params in command line help Pablo de Lara
@ 2016-02-12  9:17     ` Pablo de Lara
  2016-02-12  9:17     ` [PATCH v3 4/4] l2fwd-crypto: fix typos Pablo de Lara
  2016-02-15 16:44     ` [PATCH v3 0/4] Various fixes for L2fwd-crypto Declan Doherty
  4 siblings, 0 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-12  9:17 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 86797c6..b4b457d 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -793,7 +793,7 @@ parse_auth_op(enum rte_crypto_auth_operation *op, char *optarg)
 		*op = RTE_CRYPTO_AUTH_OP_VERIFY;
 		return 0;
 	} else if (strcmp("GENERATE", optarg) == 0) {
-		*op = RTE_CRYPTO_AUTH_OP_VERIFY;
+		*op = RTE_CRYPTO_AUTH_OP_GENERATE;
 		return 0;
 	}
 
@@ -831,11 +831,11 @@ l2fwd_crypto_parse_args_long_options(struct l2fwd_crypto_options *options,
 
 	/* Authentication options */
 	else if (strcmp(lgopts[option_index].name, "auth_algo") == 0)
-		return parse_auth_algo(&options->cipher_xform.auth.algo,
+		return parse_auth_algo(&options->auth_xform.auth.algo,
 				optarg);
 
 	else if (strcmp(lgopts[option_index].name, "auth_op") == 0)
-		return parse_auth_op(&options->cipher_xform.auth.op,
+		return parse_auth_op(&options->auth_xform.auth.op,
 				optarg);
 
 	else if (strcmp(lgopts[option_index].name, "auth_key") == 0)
-- 
2.5.0

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

* [PATCH v3 4/4] l2fwd-crypto: fix typos
  2016-02-12  9:17   ` [PATCH v3 " Pablo de Lara
                       ` (2 preceding siblings ...)
  2016-02-12  9:17     ` [PATCH v3 3/4] l2fwd-crypto: fix auth params setting Pablo de Lara
@ 2016-02-12  9:17     ` Pablo de Lara
  2016-02-15 16:44     ` [PATCH v3 0/4] Various fixes for L2fwd-crypto Declan Doherty
  4 siblings, 0 replies; 19+ messages in thread
From: Pablo de Lara @ 2016-02-12  9:17 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev

Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index b4b457d..4d5a5a4 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -981,9 +981,9 @@ l2fwd_crypto_options_print(struct l2fwd_crypto_options *options)
 
 	switch (options->cdev_type) {
 	case RTE_CRYPTODEV_AESNI_MB_PMD:
-		printf("crytpodev type: AES-NI MB PMD\n"); break;
+		printf("cryptodev type: AES-NI MB PMD\n"); break;
 	case RTE_CRYPTODEV_QAT_PMD:
-		printf("crytpodev type: QAT PMD\n"); break;
+		printf("cryptodev type: QAT PMD\n"); break;
 	default:
 		break;
 	}
-- 
2.5.0

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

* Re: [PATCH v3 0/4] Various fixes for L2fwd-crypto
  2016-02-12  9:17   ` [PATCH v3 " Pablo de Lara
                       ` (3 preceding siblings ...)
  2016-02-12  9:17     ` [PATCH v3 4/4] l2fwd-crypto: fix typos Pablo de Lara
@ 2016-02-15 16:44     ` Declan Doherty
  2016-02-24 13:52       ` Thomas Monjalon
  4 siblings, 1 reply; 19+ messages in thread
From: Declan Doherty @ 2016-02-15 16:44 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dev

On 12/02/16 09:17, Pablo de Lara wrote:
> This patchset includes param handling, typo and
> statistics fixes in the L2fwd-crypto sample app.
>
> Changes in v3:
> - Reset all accumulated stats
>
> Changes in v2:
> - Include "Fixes" line
>
>
> Pablo de Lara (4):
>    l2fwd-crypto: fix total stats
>    l2fwd-crypto: fix incorrect params in command line help
>    l2fwd-crypto: fix auth params setting
>    l2fwd-crypto: fix typos
>
>   examples/l2fwd-crypto/main.c | 26 ++++++++++++++++----------
>   1 file changed, 16 insertions(+), 10 deletions(-)
>

Series Acked-by: Declan Doherty <declan.doherty@intel.com>

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

* Re: [PATCH v3 0/4] Various fixes for L2fwd-crypto
  2016-02-15 16:44     ` [PATCH v3 0/4] Various fixes for L2fwd-crypto Declan Doherty
@ 2016-02-24 13:52       ` Thomas Monjalon
  0 siblings, 0 replies; 19+ messages in thread
From: Thomas Monjalon @ 2016-02-24 13:52 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dev

2016-02-15 16:44, Declan Doherty:
> On 12/02/16 09:17, Pablo de Lara wrote:
> > Pablo de Lara (4):
> >    l2fwd-crypto: fix total stats
> >    l2fwd-crypto: fix incorrect params in command line help
> >    l2fwd-crypto: fix auth params setting
> >    l2fwd-crypto: fix typos
> >
> >   examples/l2fwd-crypto/main.c | 26 ++++++++++++++++----------
> >   1 file changed, 16 insertions(+), 10 deletions(-)
> >
> 
> Series Acked-by: Declan Doherty <declan.doherty@intel.com>

Applied, thanks

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

end of thread, other threads:[~2016-02-24 13:54 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03 11:14 [PATCH 0/4] Various fixes for L2fwd-crypto Pablo de Lara
2016-02-03 11:14 ` [PATCH 1/4] l2fwd-crypto: fix accumulated stats Pablo de Lara
2016-02-03 11:14 ` [PATCH 2/4] l2fwd-crypto: fix incorrect params in command line help Pablo de Lara
2016-02-03 11:14 ` [PATCH 3/4] l2fwd-crypto: fix auth params setting Pablo de Lara
2016-02-03 11:14 ` [PATCH 4/4] l2fwd-crypto: fix typos Pablo de Lara
2016-02-04  8:26 ` [PATCH v2 0/4] Various fixes for L2fwd-crypto Pablo de Lara
2016-02-04  8:26   ` [PATCH v2 1/4] l2fwd-crypto: fix accumulated stats Pablo de Lara
2016-02-04  8:26   ` [PATCH v2 2/4] l2fwd-crypto: fix incorrect params in command line help Pablo de Lara
2016-02-04  8:26   ` [PATCH v2 3/4] l2fwd-crypto: fix auth params setting Pablo de Lara
2016-02-04  8:26   ` [PATCH v2 4/4] l2fwd-crypto: fix typos Pablo de Lara
2016-02-12  9:16   ` [PATCH v2 0/4] Various fixes for L2fwd-crypto De Lara Guarch, Pablo
2016-02-12  9:17   ` [PATCH v3 " Pablo de Lara
2016-02-12  9:17     ` [PATCH v3 1/4] l2fwd-crypto: fix total stats Pablo de Lara
2016-02-12  9:17     ` [PATCH v3 2/4] l2fwd-crypto: fix incorrect params in command line help Pablo de Lara
2016-02-12  9:17     ` [PATCH v3 3/4] l2fwd-crypto: fix auth params setting Pablo de Lara
2016-02-12  9:17     ` [PATCH v3 4/4] l2fwd-crypto: fix typos Pablo de Lara
2016-02-15 16:44     ` [PATCH v3 0/4] Various fixes for L2fwd-crypto Declan Doherty
2016-02-24 13:52       ` Thomas Monjalon
2016-02-04  8:26 ` [PATCH " De Lara Guarch, Pablo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.