DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: "Singh, Jasvinder" <jasvinder.singh@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Chokkalingam, SankarX" <sankarx.chokkalingam@intel.com>
Subject: Re: [dpdk-dev] [PATCH] ip_pipeline: add command for multiple execution of run <file>
Date: Tue, 24 May 2016 17:20:19 +0000	[thread overview]
Message-ID: <3EB4FA525960D640B5BDFFD6A3D89126479EC68A@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <1462561743-76966-1-git-send-email-jasvinder.singh@intel.com>



> -----Original Message-----
> From: Singh, Jasvinder
> Sent: Friday, May 6, 2016 8:09 PM
> To: dev@dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Chokkalingam,
> SankarX <sankarx.chokkalingam@intel.com>
> Subject: [PATCH] ip_pipeline: add command for multiple execution of run
> <file>
> 
> From: Sankar Chokkalingam <sankarx.chokkalingam@intel.com>
> 
> The new command enables the execution of script-file for 'n' number of
> times in regular intervals. It takes script-file, number of times to be
> executed, interval between each execution as inputs.
> 
> Syntax: run <file> <count> <interval>
> 
> Usage: This command helps to collect statistics of ports and pipelines in
> periodic interval.
> 
> Example: run port_stats 5 30
> 
> The port_stats file may contain the list of port stats commands like
> p 1 port in 0 stats
> p 1 port out 0 stats
> p 2 port in 0 stats
> p 2 port out 0 stats
> p 2 port in 1 stats
> p 2 port out stats.
> 
> The list of commands in the file will be executed 5 times with the
> interval of 30 seconds.
> 
> Signed-off-by: Sankar Chokkalingam <sankarx.chokkalingam@intel.com>
> ---
>  examples/ip_pipeline/pipeline/pipeline_common_fe.c | 50
> ++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
> 
> diff --git a/examples/ip_pipeline/pipeline/pipeline_common_fe.c
> b/examples/ip_pipeline/pipeline/pipeline_common_fe.c
> index a691d42..9f7ef08 100644
> --- a/examples/ip_pipeline/pipeline/pipeline_common_fe.c
> +++ b/examples/ip_pipeline/pipeline/pipeline_common_fe.c
> @@ -1267,9 +1267,59 @@ cmdline_parse_inst_t cmd_run = {
>  	},
>  };
> 
> +struct cmd_multirun_file_result {
> +	cmdline_fixed_string_t run_string;
> +	char file_name[APP_FILE_NAME_SIZE];
> +	uint32_t count;
> +	uint32_t interval;
> +};
> +
> +static void
> +cmd_multirun_parsed(
> +	void *parsed_result,
> +	struct cmdline *cl,
> +	__attribute__((unused)) void *data)
> +{
> +	struct cmd_multirun_file_result *params = parsed_result;
> +	uint32_t i;
> +
> +	for (i = 0; i < params->count; i++) {
> +		app_run_file(cl->ctx, params->file_name);
> +		sleep(params->interval);
> +	}
> +}
> +
> +cmdline_parse_token_string_t cmd_multirun_run_string =
> +	TOKEN_STRING_INITIALIZER(struct cmd_multirun_file_result,
> run_string,
> +		"run");
> +
> +cmdline_parse_token_string_t cmd_multirun_file_name =
> +	TOKEN_STRING_INITIALIZER(struct cmd_multirun_file_result,
> file_name, NULL);
> +
> +static cmdline_parse_token_num_t cmd_multirun_count =
> +	TOKEN_NUM_INITIALIZER(struct cmd_multirun_file_result, count,
> UINT32);
> +
> +static cmdline_parse_token_num_t cmd_multirun_interval =
> +	TOKEN_NUM_INITIALIZER(struct cmd_multirun_file_result, interval,
> UINT32);
> +
> +cmdline_parse_inst_t cmd_multirun = {
> +	.f = cmd_multirun_parsed,
> +	.data = NULL,
> +	.help_str = "Run CLI script file",
> +	.tokens = {
> +		(void *) &cmd_multirun_run_string,
> +		(void *) &cmd_multirun_file_name,
> +		(void *) &cmd_multirun_count,
> +		(void *) &cmd_multirun_interval,
> +		NULL,
> +	},
> +};
> +
> +
>  static cmdline_parse_ctx_t pipeline_common_cmds[] = {
>  	(cmdline_parse_inst_t *) &cmd_quit,
>  	(cmdline_parse_inst_t *) &cmd_run,
> +	(cmdline_parse_inst_t *) &cmd_multirun,
> 
>  	(cmdline_parse_inst_t *) &cmd_link_config,
>  	(cmdline_parse_inst_t *) &cmd_link_up,
> --
> 1.8.3.1

Hi Jasvinder and Sankar,

This patch is now  reworked and included into the ip_pipeline CLI rework patch set that Michal and Piotr sent: http://www.dpdk.org/ml/archives/dev/2016-May/039429.html

So we can safely discard this patch now.

Thanks,
Cristian

      reply	other threads:[~2016-05-24 17:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06 19:09 Jasvinder Singh
2016-05-24 17:20 ` Dumitrescu, Cristian [this message]

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=3EB4FA525960D640B5BDFFD6A3D89126479EC68A@IRSMSX108.ger.corp.intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=jasvinder.singh@intel.com \
    --cc=sankarx.chokkalingam@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).