From: "Singh, Aman Deep" <aman.deep.singh@intel.com>
To: Dmitry Kozlyuk <dkozlyuk@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
Matan Azrad <matan@nvidia.com>, Xiaoyun Li <xiaoyun.li@intel.com>,
Yuying Zhang <yuying.zhang@intel.com>
Subject: Re: [PATCH] app/testpmd: fix use of indirect action after port close
Date: Tue, 12 Apr 2022 11:11:55 +0530 [thread overview]
Message-ID: <707c865e-e50b-63e9-a6b0-c46418fd39ae@intel.com> (raw)
In-Reply-To: <BL1PR12MB5945DDC3B17502C08E4477F8B9EB9@BL1PR12MB5945.namprd12.prod.outlook.com>
On 4/11/2022 2:01 AM, Dmitry Kozlyuk wrote:
> Hi Aman,
>
>> From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
>> Sent: Thursday, March 31, 2022 1:57 AM
>> [...]
>>> From: Singh, Aman Deep <aman.deep.singh@intel.com>
>>> Sent: Wednesday, March 30, 2022 5:24 PM
>>> [...]
>>> On 3/7/2022 10:18 PM, Dmitry Kozlyuk wrote:
>>>> When a port was closed, indirect actions could remain
>>>> with their handles no longer valid.
>>>> If a newly attached device was assigned the same ID as the closed
>> port,
>>>> those indirect actions became accessible again.
>>>> Any attempt to use them resulted in an undefined behavior.
>>>> Automatically flush indirect actions when a port is closed.
>>>>
>>>> Fixes: 4b61b8774be9 ("ethdev: introduce indirect flow action")
>>>> Cc: stable@dpdk.org
>>>>
>>>> Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
>>>> Acked-by: Matan Azrad <matan@nvidia.com>
>>>> ---
>>> From: guides/prog_guide/rte_flow.rst
>>> /"If ``RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP`` is advertised,//
>>> //this means that the PMD can keep at least some indirect actions//
>>> //across device stop and start.
>>>
>>> /Please check, if we are inline with the guidelines given in the
>> section.
>>
>> This patch is related to port closing, not port stopping.
>> Flow API resources are owned by the port,
>> so they cannot be valid when the port is closed and its ethdev removed.
>> TestPMD was keeping indirect action handles contrary to this.
Agreed, at port close these should be flushed. LGTM
Acked-by: Aman Singh <aman.deep.singh@intel.com>
>>
>> As for RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP,
>> there is already "flow indirect_action destroy"
>> to erase indirect actions before stopping the port if this is desired.
>> I had another patch in mind to add "flow indirect_action flush"
>> for convenience, but it is independent of this fix.
> Did my response clear up your concern?
> In short: this patch is aligned with the defined flow resource behavior.
next prev parent reply other threads:[~2022-04-12 5:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 16:48 Dmitry Kozlyuk
2022-03-30 14:23 ` Singh, Aman Deep
2022-03-30 22:56 ` Dmitry Kozlyuk
2022-04-10 20:31 ` Dmitry Kozlyuk
2022-04-12 5:41 ` Singh, Aman Deep [this message]
2022-05-25 10:52 ` 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=707c865e-e50b-63e9-a6b0-c46418fd39ae@intel.com \
--to=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
--cc=dkozlyuk@nvidia.com \
--cc=matan@nvidia.com \
--cc=stable@dpdk.org \
--cc=xiaoyun.li@intel.com \
--cc=yuying.zhang@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).