DPDK patches and discussions
 help / color / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Wang ShougangX <shougangx.wang@intel.com>, dev@dpdk.org
Cc: Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Yang Qiming <qiming.yang@intel.com>,
	stable@dpdk.org
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] app/testpmd: fix Segment fault when start fwd
Date: Fri, 13 Sep 2019 18:34:30 +0100
Message-ID: <c7505de1-da09-a7ea-eb55-e87f51a1409e@intel.com> (raw)
In-Reply-To: <20190906012838.64088-1-shougangx.wang@intel.com>

On 9/6/2019 2:28 AM, Wang ShougangX wrote:
> This patch fixed the reset function to avoid crash when user don't
> call port reset , port stop and port start functions as sequence.
> 
> Fixes: 97f1e19679 ("app/testpmd: add port reset command")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Wang ShougangX <shougangx.wang@intel.com>
> ---
>  app/test-pmd/testpmd.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index e8e2a39b6..273a7aa02 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -2344,6 +2344,9 @@ reset_port(portid_t pid)
>  	if (port_id_is_invalid(pid, ENABLED_WARN))
>  		return;
>  
> +	printf("Stopping ports...\n");
> +	stop_port(pid);
> +
>  	printf("Resetting ports...\n");
>  
>  	RTE_ETH_FOREACH_DEV(pi) {
> @@ -2372,6 +2375,9 @@ reset_port(portid_t pid)
>  		}
>  	}
>  
> +	printf("Starting ports...\n");
> +	start_port(pid);
> +
>  	printf("Done\n");
>  }

Hi Shougang,

Not sure if 'reset' command should do more than it says, if there is a
requirement that port should be stopped, why not add this condition with an
error message so that user can stop the port in advance if she wants.


Btw, a few things related,
- 'reset_port()' function has a loop inside, 'RTE_ETH_FOREACH_DEV()' but it
works on single port, the loop looked unnecessary to me, can you please check
and remove the loop if required?

- I am not able to see 'reset' has been documented in
'doc/guides/testpmd_app_ug/testpmd_funcs.rst', it may be missing, can you please
check and add it if required?

Thanks,
ferruh

  parent reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06  1:28 [dpdk-dev] " Wang ShougangX
2019-09-12 13:26 ` Iremonger, Bernard
2019-09-13 17:34 ` Ferruh Yigit [this message]
2019-09-16  6:37   ` [dpdk-dev] [dpdk-stable] " Wang, ShougangX
2019-09-16 15:27     ` Ferruh Yigit
2019-09-17  9:22       ` Wang, ShougangX

Reply instructions:

You may reply publically 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=c7505de1-da09-a7ea-eb55-e87f51a1409e@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=qiming.yang@intel.com \
    --cc=shougangx.wang@intel.com \
    --cc=stable@dpdk.org \
    --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

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox