DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: "Zhao1, Wei" <wei.zhao1@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Zhao1, Wei" <wei.zhao1@intel.com>, "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
Subject: Re: [dpdk-dev] [PATCH v3 3/3] app/testpmd: add port reset command into	testpmd
Date: Thu, 30 Mar 2017 08:57:22 +0000	[thread overview]
Message-ID: <9BB6961774997848B5B42BEC655768F810D1B5BF@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1490688547-4831-4-git-send-email-wei.zhao1@intel.com>



> -----Original Message-----
> From: Wu, Jingjing
> Sent: Thursday, March 30, 2017 4:55 PM
> To: 'Wei Zhao' <wei.zhao1@intel.com>; dev@dpdk.org
> Cc: Zhao1, Wei <wei.zhao1@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Subject: RE: [dpdk-dev] [PATCH v3 3/3] app/testpmd: add port reset command
> into testpmd
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao
> > Sent: Tuesday, March 28, 2017 4:09 PM
> > To: dev@dpdk.org
> > Cc: Zhao1, Wei <wei.zhao1@intel.com>; Lu, Wenzhuo
> > <wenzhuo.lu@intel.com>
> > Subject: [dpdk-dev] [PATCH v3 3/3] app/testpmd: add port reset command
> > into testpmd
> >
> > Add port reset command into testpmd project, it is the interface for
> > user to reset port.
> > And also it is not limit to be used only in vf reset, but also for pf
> > port reset.But this patch set only realted to vf reset feature.
> >
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> > Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> > ---
> >  app/test-pmd/cmdline.c | 17 ++++++++++----  app/test-pmd/testpmd.c |
> > 63
> > ++++++++++++++++++++++++++++++++++++++++++++++++++
> >  app/test-pmd/testpmd.h |  1 +
> >  3 files changed, 77 insertions(+), 4 deletions(-)
> >
> > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> > 47f935d..6cbdcc8 100644
> > --- a/app/test-pmd/cmdline.c
> > +++ b/app/test-pmd/cmdline.c
> > @@ -599,6 +599,9 @@ static void cmd_help_long_parsed(void
> *parsed_result,
> >  			"port close (port_id|all)\n"
> >  			"    Close all ports or port_id.\n\n"
> >
> > +			"port reset (port_id|all)\n"
> > +			"    Reset all ports or port_id.\n\n"
> > +
> >  			"port attach (ident)\n"
> >  			"    Attach physical or virtual dev by pci address or
> > virtual device name\n\n"
> >
> > @@ -909,6 +912,8 @@ static void cmd_operate_port_parsed(void
> > *parsed_result,
> >  		stop_port(RTE_PORT_ALL);
> >  	else if (!strcmp(res->name, "close"))
> >  		close_port(RTE_PORT_ALL);
> > +	else if (!strcmp(res->name, "reset"))
> > +		reset_port(RTE_PORT_ALL);
> >  	else
> >  		printf("Unknown parameter\n");
> >  }
> > @@ -918,14 +923,15 @@ cmdline_parse_token_string_t
> > cmd_operate_port_all_cmd =
> >  								"port");
> >  cmdline_parse_token_string_t cmd_operate_port_all_port =
> >  	TOKEN_STRING_INITIALIZER(struct cmd_operate_port_result, name,
> > -						"start#stop#close");
> > +						"start#stop#close#reset");
> >  cmdline_parse_token_string_t cmd_operate_port_all_all =
> >  	TOKEN_STRING_INITIALIZER(struct cmd_operate_port_result, value,
> > "all");
> >
> >  cmdline_parse_inst_t cmd_operate_port = {
> >  	.f = cmd_operate_port_parsed,
> >  	.data = NULL,
> > -	.help_str = "port start|stop|close all: Start/Stop/Close all ports",
> > +	.help_str = "port start|stop|close|reset all: Start/Stop/Close/"
> > +			"Reset all ports",
> >  	.tokens = {
> >  		(void *)&cmd_operate_port_all_cmd,
> >  		(void *)&cmd_operate_port_all_port, @@ -953,6 +959,8 @@
> static void
> > cmd_operate_specific_port_parsed(void
> > *parsed_result,
> >  		stop_port(res->value);
> >  	else if (!strcmp(res->name, "close"))
> >  		close_port(res->value);
> > +	else if (!strcmp(res->name, "reset"))
> > +		reset_port(res->value);
> >  	else
> >  		printf("Unknown parameter\n");
> >  }
> > @@ -962,7 +970,7 @@ cmdline_parse_token_string_t
> > cmd_operate_specific_port_cmd =
> >  							keyword, "port");
> >  cmdline_parse_token_string_t cmd_operate_specific_port_port =
> >  	TOKEN_STRING_INITIALIZER(struct cmd_operate_specific_port_result,
> > -						name, "start#stop#close");
> > +						name,
> > "start#stop#close#reset");
> >  cmdline_parse_token_num_t cmd_operate_specific_port_id =
> >  	TOKEN_NUM_INITIALIZER(struct cmd_operate_specific_port_result,
> >  							value, UINT8);
> > @@ -970,7 +978,8 @@ cmdline_parse_token_num_t
> > cmd_operate_specific_port_id =  cmdline_parse_inst_t
> > cmd_operate_specific_port = {
> >  	.f = cmd_operate_specific_port_parsed,
> >  	.data = NULL,
> > -	.help_str = "port start|stop|close <port_id>: Start/Stop/Close port_id",
> > +	.help_str = "port start|stop|close|reset <port_id>: Start/Stop/Close/"
> > +			"Reset port_id",
> >  	.tokens = {
> >  		(void *)&cmd_operate_specific_port_cmd,
> >  		(void *)&cmd_operate_specific_port_port,
> > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> > 484c19b..a053562 100644
> > --- a/app/test-pmd/testpmd.c
> > +++ b/app/test-pmd/testpmd.c
> > @@ -137,6 +137,7 @@ portid_t  nb_fwd_ports;  /**< Number of forwarding
> > ports. */
> >
> >  unsigned int fwd_lcores_cpuids[RTE_MAX_LCORE]; /**< CPU ids
> configuration.
> > */
> >  portid_t fwd_ports_ids[RTE_MAX_ETHPORTS];      /**< Port ids configuration.
> > */
> > +volatile char reset_ports[RTE_MAX_ETHPORTS] = {0};  /**< Portr reset
> > +falg. */
Typo: Portr->port, and falg->flag

      parent reply	other threads:[~2017-03-30  8:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28  8:09 [dpdk-dev] [PATCH v3 0/3] net/i40e: vf port reset Wei Zhao
2017-03-28  8:09 ` [dpdk-dev] [PATCH v3 1/3] lib/librte_ether: add support for " Wei Zhao
2017-03-28  8:09 ` [dpdk-dev] [PATCH v3 2/3] net/i40e: implement device reset on port Wei Zhao
2017-03-30  7:02   ` Wu, Jingjing
2017-03-28  8:09 ` [dpdk-dev] [PATCH v3 3/3] app/testpmd: add port reset command into testpmd Wei Zhao
2017-03-30  8:55   ` Wu, Jingjing
2017-03-30  8:58     ` Zhao1, Wei
2017-03-30  8:57   ` Wu, Jingjing [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=9BB6961774997848B5B42BEC655768F810D1B5BF@SHSMSX103.ccr.corp.intel.com \
    --to=jingjing.wu@intel.com \
    --cc=dev@dpdk.org \
    --cc=wei.zhao1@intel.com \
    --cc=wenzhuo.lu@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).