DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/crypto-perf: add help option
@ 2017-10-11  0:29 Pablo de Lara
  2017-11-06 11:56 ` Zhang, Roy Fan
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo de Lara @ 2017-10-11  0:29 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev, Pablo de Lara

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-crypto-perf/cperf_options_parsing.c | 49 ++++++++++++++++++++++++++--
 1 file changed, 47 insertions(+), 2 deletions(-)

diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index 72c515a..ad43e84 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -46,6 +46,47 @@ struct name_id_map {
 	uint32_t id;
 };
 
+static void
+usage(char *progname)
+{
+	printf("%s [EAL options] --\n"
+		" --silent: disable options dump\n"
+		" --ptest throughput / latency / verify / pmd-cycleount :"
+		" set test type\n"
+		" --pool_sz N: set the number of crypto ops/mbufs allocated\n"
+		" --total-ops N: set the number of total operations performed\n"
+		" --burst-sz N: set the number of packets per burst\n"
+		" --buffer-sz N: set the size of a single packet\n"
+		" --segment-sz N: set the size of the segment to use\n"
+		" --desc-nb N: set number of descriptors for each crypto device\n"
+		" --devtype TYPE: set crypto device type to use\n"
+		" --optype cipher-only / auth-only / cipher-then-auth /\n"
+		"           auth-then-cipher / aead : set operation type\n"
+		" --sessionless: enable session-less crypto operations\n"
+		" --out-of-place: enable out-of-place crypto operations\n"
+		" --test-file NAME: set the test vector file path\n"
+		" --test-name NAME: set specific test name section in test file\n"
+		" --cipher-algo ALGO: set cipher algorithm\n"
+		" --cipher-op encrypt / decrypt: set the cipher operation\n"
+		" --cipher-key-sz N: set the cipher key size\n"
+		" --cipher-iv-sz N: set the cipher IV size\n"
+		" --auth-algo ALGO: set auth algorithm\n"
+		" --auth-op generate / verify: set the auth operation\n"
+		" --auth-key-sz N: set the auth key size\n"
+		" --auth-iv-sz N: set the auth IV size\n"
+		" --aead-algo ALGO: set AEAD algorithm\n"
+		" --aead-op encrypt / decrypt: set the AEAD operation\n"
+		" --aead-key-sz N: set the AEAD key size\n"
+		" --aead-iv-sz N: set the AEAD IV size\n"
+		" --aead-aad-sz N: set the AEAD AAD size\n"
+		" --digest-sz N: set the digest size\n"
+		" --pmd-cyclecount-delay-ms N: set delay between enqueue\n"
+		"           and dequeue in pmd-cyclecount benchmarking mode\n"
+		" --csv-friendly: enable test result output CSV friendly\n"
+		" -h: prints this help\n",
+		progname);
+}
+
 static int
 get_str_key_id_mapping(struct name_id_map *map, unsigned int map_len,
 		const char *str_key)
@@ -829,11 +870,14 @@ cperf_options_parse(struct cperf_options *options, int argc, char **argv)
 {
 	int opt, retval, opt_idx;
 
-	while ((opt = getopt_long(argc, argv, "", lgopts, &opt_idx)) != EOF) {
+	while ((opt = getopt_long(argc, argv, "h", lgopts, &opt_idx)) != EOF) {
 		switch (opt) {
+		case 'h':
+			usage(argv[0]);
+			rte_exit(EXIT_SUCCESS, "Displayed help\n");
+			break;
 		/* long options */
 		case 0:
-
 			retval = cperf_opts_parse_long(opt_idx, options);
 			if (retval != 0)
 				return retval;
@@ -841,6 +885,7 @@ cperf_options_parse(struct cperf_options *options, int argc, char **argv)
 			break;
 
 		default:
+			usage(argv[0]);
 			return -EINVAL;
 		}
 	}
-- 
2.9.4

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

* Re: [dpdk-dev] [PATCH] app/crypto-perf: add help option
  2017-10-11  0:29 [dpdk-dev] [PATCH] app/crypto-perf: add help option Pablo de Lara
@ 2017-11-06 11:56 ` Zhang, Roy Fan
  2017-11-07 16:59   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Roy Fan @ 2017-11-06 11:56 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Doherty, Declan; +Cc: dev, De Lara Guarch, Pablo

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, October 11, 2017 1:29 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH] app/crypto-perf: add help option
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>  app/test-crypto-perf/cperf_options_parsing.c | 49
> ++++++++++++++++++++++++++--
>  1 file changed, 47 insertions(+), 2 deletions(-)
> --
> 2.9.4

Acked-by: Fan Zhang <roy.fan.zhang@intel.com>

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

* Re: [dpdk-dev] [PATCH] app/crypto-perf: add help option
  2017-11-06 11:56 ` Zhang, Roy Fan
@ 2017-11-07 16:59   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2017-11-07 16:59 UTC (permalink / raw)
  To: De Lara Guarch, Pablo; +Cc: dev, Zhang, Roy Fan, Doherty, Declan

> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> 
> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>

Applied, thanks

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

end of thread, other threads:[~2017-11-07 16:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-11  0:29 [dpdk-dev] [PATCH] app/crypto-perf: add help option Pablo de Lara
2017-11-06 11:56 ` Zhang, Roy Fan
2017-11-07 16:59   ` 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).