DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Gregory Etelson <getelson@nvidia.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	 Beilei Xing <beilei.xing@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>,
	Thomas Monjalon <tmonjalon@nvidia.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: Matan Azrad <matan@nvidia.com>,
	Raslan Darawsheh <rasland@nvidia.com>, Ori Kam <orika@nvidia.com>,
	Jeff Guo <jia.guo@intel.com>, Qi Zhang <qi.z.zhang@intel.com>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix flow rules list after port stop
Date: Tue, 25 Aug 2020 16:51:20 +0100
Message-ID: <5ef628aa-3acd-7a2d-9271-9048761ac778@intel.com> (raw)
In-Reply-To: <BY5PR12MB366892281BB5155E4D34C13FA55A0@BY5PR12MB3668.namprd12.prod.outlook.com>

On 8/20/2020 9:40 AM, Gregory Etelson wrote:
> Hello,
> 
> Is this patch scheduled for merge with dpdk.org ?
> Please update me.
> 
> Regards,
> Gregory
> 
>> -----Original Message-----
>> From: Gregory Etelson <getelson@mellanox.com>
>> Sent: Monday, August 10, 2020 19:15
>> To: dev@dpdk.org
>> Cc: Gregory Etelson <getelson@nvidia.com>; Matan Azrad
>> <matan@nvidia.com>; Raslan Darawsheh <rasland@nvidia.com>;
>> stable@dpdk.org; Ori Kam <orika@mellanox.com>; Wenzhuo Lu
>> <wenzhuo.lu@intel.com>; Beilei Xing <beilei.xing@intel.com>; Bernard
>> Iremonger <bernard.iremonger@intel.com>
>> Subject: [PATCH] app/testpmd: fix flow rules list after port stop
>>
>> According to current RTE API, port flow rules must not be kept after port
>> stop.

Hi Gregory, Ori,

Can you please point where this is documented?

>>
>> Testpmd did not flush port flow rules after `port stop' command was called.
>> As the result, after the port was restarted, it showed bogus flow rules.

There are two issues,

1) According what I see in the rte_flow documentation, not sure if the "port
stop" should clear the rules:
"
PMDs, not applications, are responsible for maintaining flow rules configuration
when stopping and restarting a port or performing other actions which may affect
them. They can only be destroyed explicitly by applications.
"

As I tested with i40e, it keeps the rules after stop/start, cc'ing @Jeff,
@Beilei & @Qi if this is done intentionally.


2) From the perspective of the testers, users of the testpmd. If they are
testing a complex set of filter rules, stopping and starting the port flushing
all rules may be troublesome.
Since there is explicit command to remove a rte_flow rule or to remove them all,
user may prefer to call it when required to delete the rules, instead of this is
done implicitly in port stop.

Btw, this is based on PMD should handle the rules on stop/start, we need to
agree on it first, but even that is not the case, we are in the application
domain now and we can apply the rules back again in the 'start' if it serves
better to the user.


>>
>> Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")
>>
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Gregory Etelson <getelson@mellanox.com>
>> Acked-by: Ori Kam <orika@mellanox.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
>> 7842c3b781..4ba5c41c6e 100644
>> --- a/app/test-pmd/testpmd.c
>> +++ b/app/test-pmd/testpmd.c
>> @@ -2627,6 +2627,9 @@ stop_port(portid_t pid)
>>  						RTE_PORT_HANDLING) == 0)
>>  			continue;
>>
>> +		if (port->flow_list)
>> +			port_flow_flush(pi);
>> +
>>  		rte_eth_dev_stop(pi);
>>
>>  		if (rte_atomic16_cmpset(&(port->port_status),
>> --
>> 2.25.1
> 


  reply	other threads:[~2020-08-25 15:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200810161523.6904-1-getelson@mellanox.com>
2020-08-20  8:40 ` Gregory Etelson
2020-08-25 15:51   ` Ferruh Yigit [this message]
2020-08-26 17:34     ` Ori Kam
2020-09-13 12:12       ` Ori Kam
2020-09-13 14:00         ` Thomas Monjalon
2020-11-17 19:08           ` Gregory Etelson
2020-08-11  6:14 Gregory Etelson
2020-11-24 14:42 ` Ajit Khaparde
2020-11-26 15:41   ` Thomas Monjalon

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=5ef628aa-3acd-7a2d-9271-9048761ac778@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=getelson@nvidia.com \
    --cc=jia.guo@intel.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=qi.z.zhang@intel.com \
    --cc=rasland@nvidia.com \
    --cc=tmonjalon@nvidia.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

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

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


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