DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Suanming Mou <suanmingm@nvidia.com>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>,
	Aman Singh <aman.deep.singh@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH] app/testpmd: fix action destruction memory leak
Date: Fri, 18 Nov 2022 15:19:07 +0000	[thread overview]
Message-ID: <0c58d816-cc7c-721d-00f0-e90362e5a0a4@amd.com> (raw)
In-Reply-To: <CO6PR12MB539636049EB75B778EA0D959C1099@CO6PR12MB5396.namprd12.prod.outlook.com>

On 11/18/2022 12:21 PM, Suanming Mou wrote:
> Hi,
> 
>> -----Original Message-----
>> From: Ferruh Yigit <ferruh.yigit@amd.com>
>> Sent: Friday, November 18, 2022 6:40 PM
>> To: Suanming Mou <suanmingm@nvidia.com>; david.marchand@redhat.com;
>> Aman Singh <aman.deep.singh@intel.com>; Yuying Zhang
>> <yuying.zhang@intel.com>
>> Cc: dev@dpdk.org
>> Subject: Re: [PATCH] app/testpmd: fix action destruction memory leak
>>
>> On 11/17/2022 8:55 AM, Suanming Mou wrote:
>>> In case action handle destroy fails, the job memory was not freed
>>> properly. This commit fixes the possible memory leak in the action
>>> handle destruction failed case.
>>>
>>> Fixes: c9dc03840873 ("ethdev: add indirect action async query")
>>>
>>> Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
>>> ---
>>>  app/test-pmd/config.c | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
>>> 982549ffed..719bdd4261 100644
>>> --- a/app/test-pmd/config.c
>>> +++ b/app/test-pmd/config.c
>>> @@ -2873,9 +2873,9 @@ port_queue_action_handle_destroy(portid_t
>> port_id,
>>>  			job->type = QUEUE_JOB_TYPE_ACTION_DESTROY;
>>>  			job->pia = pia;
>>>
>>> -			if (pia->handle &&
>>> -			    rte_flow_async_action_handle_destroy(port_id,
>>> +			if (rte_flow_async_action_handle_destroy(port_id,
>>
>> Why 'pia->handle' check removed, was it unnecessary to check it at first place?

This seems already discussed and agreed in other thread, so proceeding.

Applied to dpdk-next-net/main, thanks.

      reply	other threads:[~2022-11-18 15:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17  8:55 Suanming Mou
2022-11-17 11:41 ` David Marchand
2022-11-18 10:40 ` Ferruh Yigit
2022-11-18 12:21   ` Suanming Mou
2022-11-18 15:19     ` Ferruh Yigit [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=0c58d816-cc7c-721d-00f0-e90362e5a0a4@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=aman.deep.singh@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=suanmingm@nvidia.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).