patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: Gregory Etelson <getelson@nvidia.com>, dev@dpdk.org
Cc: matan@nvidia.com, rasland@nvidia.com, thomas@monjalon.net,
	ajit.khaparde@broadcom.com, stable@dpdk.org,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Beilei Xing <beilei.xing@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] app/testpmd: fix testpmd flows left before port stop.
Date: Fri, 27 Nov 2020 19:01:06 +0300
Message-ID: <3948b2ca-f9b9-c34a-d6ae-e9c66fbc16ea@oktetlabs.ru> (raw)
In-Reply-To: <20201126164302.19120-1-getelson@nvidia.com>

On 11/26/20 7:43 PM, Gregory Etelson wrote:
> According to RTE flow user guide, PMD will not keep flow rules after
> port stop. Application resources that refer to flow rules become
> obsolete after port stop and must not be used.
> Testpmd maintains linked list of active flows for each port. Entries in
> that list are allocated dynamically and must be explicitly released to
> prevent memory leak.
> The patch releases testpmd port flow_list that holds remaining flows
> before port is stopped.
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Gregory Etelson <getelson@nvidia.com>
> ---
>  app/test-pmd/testpmd.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index 33fc0fddf5..0bb192b2f5 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -2806,6 +2806,9 @@ stop_port(portid_t pid)
>  			}
>  		}
>  
> +		if (port->flow_list)
> +			port_flow_flush(pi);
> +
>  		if (rte_eth_dev_stop(pi) != 0)
>  			RTE_LOG(ERR, EAL, "rte_eth_dev_stop failed for port %u\n",
>  				pi);
> 

port_flow_flush() does rte_flow_flush() which is not strictly
required. Description sounds like we should cleanup testpmd
lists only.

  reply	other threads:[~2020-11-27 16:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11  6:14 [dpdk-stable] [PATCH] app/testpmd: fix flow rules list after " Gregory Etelson
2020-11-24 14:42 ` [dpdk-stable] [dpdk-dev] " Ajit Khaparde
2020-11-26 15:41   ` Thomas Monjalon
2020-11-26 16:43 ` [dpdk-stable] [PATCH v2] app/testpmd: fix testpmd flows left before " Gregory Etelson
2020-11-27 16:01   ` Andrew Rybchenko [this message]
2020-11-29  6:59     ` [dpdk-stable] [dpdk-dev] " Gregory Etelson
2021-01-06 18:07   ` [dpdk-stable] " Ferruh Yigit

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=3948b2ca-f9b9-c34a-d6ae-e9c66fbc16ea@oktetlabs.ru \
    --to=andrew.rybchenko@oktetlabs.ru \
    --cc=ajit.khaparde@broadcom.com \
    --cc=beilei.xing@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=getelson@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/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 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


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