From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Wang ShougangX <shougangx.wang@intel.com>
Cc: dev@dpdk.org, qiming.yang@intel.com, beilei.xing@intel.com,
stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/ice: fix removal of FDIR profile
Date: Thu, 7 Nov 2019 11:29:02 +0800 [thread overview]
Message-ID: <20191107032902.GA100445@intel.com> (raw)
In-Reply-To: <20191105030553.9323-1-shougangx.wang@intel.com>
On 11/05, Wang ShougangX wrote:
>The removal of FDIR profile should start from ICE_FLTR_PTYPE_NONF_IPV4_UDP.
>
>Fixes: 109e8e06249e ("net/ice: configure HW flow director rule")
>Cc: stable@dpdk.org
>
>Signed-off-by: Wang ShougangX <shougangx.wang@intel.com>
>---
> drivers/net/ice/ice_fdir_filter.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
>index 736ccd54e..e426c1431 100644
>--- a/drivers/net/ice/ice_fdir_filter.c
>+++ b/drivers/net/ice/ice_fdir_filter.c
>@@ -159,6 +159,10 @@ ice_fdir_prof_alloc(struct ice_hw *hw)
> if (!hw->fdir_prof)
> return -ENOMEM;
> }
>+
>+ /* To avoid wild pointer, unused field pointer should be NULL */
>+ hw->fdir_prof[ICE_FLTR_PTYPE_NONF_NONE] = NULL;
>+
> for (ptype = ICE_FLTR_PTYPE_NONF_IPV4_UDP;
> ptype < ICE_FLTR_PTYPE_MAX;
> ptype++) {
>@@ -177,6 +181,7 @@ ice_fdir_prof_alloc(struct ice_hw *hw)
> fltr_ptype++)
> rte_free(hw->fdir_prof[fltr_ptype]);
> rte_free(hw->fdir_prof);
>+ hw->fdir_prof = NULL;
Above two changes are irrelevant to this commit, you should add them into
your wild pointer fix.
Besides, I'd suggest to submit your related fixes in a patchset with a cover
letter for the convenience of review.
Thanks,
Xiaolong
> return -ENOMEM;
> }
>
>@@ -573,7 +578,7 @@ ice_fdir_prof_rm_all(struct ice_pf *pf)
> {
> enum ice_fltr_ptype ptype;
>
>- for (ptype = ICE_FLTR_PTYPE_NONF_NONE;
>+ for (ptype = ICE_FLTR_PTYPE_NONF_IPV4_UDP;
> ptype < ICE_FLTR_PTYPE_MAX;
> ptype++) {
> ice_fdir_prof_rm(pf, ptype, false);
>--
>2.17.1
>
prev parent reply other threads:[~2019-11-07 3:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 3:05 [dpdk-dev] [PATCH] net/ice: fix removal of FDIR profile Wang ShougangX
2019-11-07 3:29 ` 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=20191107032902.GA100445@intel.com \
--to=xiaolong.ye@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=qiming.yang@intel.com \
--cc=shougangx.wang@intel.com \
--cc=stable@dpdk.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.