From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Qi Zhang <qi.z.zhang@intel.com>
Cc: yahui.cao@intel.com, simei.su@intel.com, wei.zhao@intel.com,
dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3] net/ice: remove unnecessary variable
Date: Wed, 4 Mar 2020 11:02:20 +0800 [thread overview]
Message-ID: <20200304030220.GD99081@intel.com> (raw)
In-Reply-To: <20200304020549.13304-1-qi.z.zhang@intel.com>
On 03/04, Qi Zhang wrote:
>Remove unnecessary variable "meta" in ice_flow_create and
>ice_flow_validate, it should be defined when really be needed:
>its ice_parse_engine_create and ice_parse_engine_validate.
>
>A meta data be created by parser->parse_pattern_action should be
>freed inside parser->engine->create.
>
>During a validate operation, since parser->engine_>create will not
>be invoked, a meta is not necessary be created during parser, so
>NULL will parsed to engine->parse_pattern_action and all parser's
>parse_pattern_action need to be modified to handle meta = NULL
>properly.
>
>With above implementation, the patch also fixes a potentional memory
s/potentional/potential
>leak in ice_parse_engine_validate, since meta may not be freed.
>
>BTW, an engine without a create op should be regarded as a bug. So
>use RTE_ASSERT to replace runtime engine->create == NULL check in
>ice_parse_engine_create.
>
>Fixes: 4e27d3ed02bd ("net/ice: fix flow API framework")
>Cc: stable@dpdk.org
>
>Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>---
>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Applied to dpdk-next-net-intel with above fix, Thanks.
prev parent reply other threads:[~2020-03-04 3:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-04 2:05 Qi Zhang
2020-03-04 3:02 ` Ye Xiaolong [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=20200304030220.GD99081@intel.com \
--to=xiaolong.ye@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=simei.su@intel.com \
--cc=stable@dpdk.org \
--cc=wei.zhao@intel.com \
--cc=yahui.cao@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).