From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9B129A04AB; Thu, 7 Nov 2019 04:33:08 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DFE641E56D; Thu, 7 Nov 2019 04:33:07 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id A748D1E543; Thu, 7 Nov 2019 04:33:06 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 19:33:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,276,1569308400"; d="scan'208";a="212922993" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by fmsmga001.fm.intel.com with ESMTP; 06 Nov 2019 19:33:04 -0800 Date: Thu, 7 Nov 2019 11:29:02 +0800 From: Ye Xiaolong To: Wang ShougangX Cc: dev@dpdk.org, qiming.yang@intel.com, beilei.xing@intel.com, stable@dpdk.org Message-ID: <20191107032902.GA100445@intel.com> References: <20191105030553.9323-1-shougangx.wang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191105030553.9323-1-shougangx.wang@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH] net/ice: fix removal of FDIR profile X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 >--- > 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 >