From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id BC2CBA05D3 for ; Mon, 25 Mar 2019 06:48:16 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B8D101B13F; Mon, 25 Mar 2019 06:44:42 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 096C74C9D for ; Mon, 25 Mar 2019 06:43:57 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Mar 2019 22:43:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,256,1549958400"; d="scan'208";a="128368829" Received: from dpdk51.sh.intel.com ([10.67.110.245]) by orsmga008.jf.intel.com with ESMTP; 24 Mar 2019 22:43:56 -0700 From: Qi Zhang To: wenzhuo.lu@intel.com, qiming.yang@intel.com Cc: dev@dpdk.org, paul.m.stillwell.jr@intel.com, ferruh.yigit@intel.com, Qi Zhang Date: Mon, 25 Mar 2019 13:44:49 +0800 Message-Id: <20190325054452.2616-36-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20190325054452.2616-1-qi.z.zhang@intel.com> References: <20190228055650.25237-1-qi.z.zhang@intel.com> <20190325054452.2616-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH v4 35/38] net/ice/base: fix minor issues 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" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190325054449.QFmeR6Pyh-HXYXXQ6DqUyJnsMmuJmSny-Fd1KjVsljE@z> 1. clean flow entry's action structure after remove it. 2. initialized priority when add a new flow entry 3. remove RSS configuration before deleting the flow profile. Fixes: aa1cd410fa64 ("net/ice/base: add flow module") Fixes: 51d04e4933e3 ("net/ice/base: add flexible pipeline module") Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang Reviewed-by: Qiming Yang Reviewed-by: Wenzhuo Lu --- drivers/net/ice/base/ice_flex_pipe.c | 2 +- drivers/net/ice/base/ice_flow.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c index c9d8730d2..e4d0b8c0f 100644 --- a/drivers/net/ice/base/ice_flex_pipe.c +++ b/drivers/net/ice/base/ice_flex_pipe.c @@ -2467,7 +2467,7 @@ ice_find_prof_id(struct ice_hw *hw, enum ice_block blk, for (i = 0; i < es->count; i++) { off = i * es->fvw; - if (memcmp(&es->t[off], fv, es->fvw * 2)) + if (memcmp(&es->t[off], fv, es->fvw * sizeof(*fv))) continue; *prof_id = i; diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index 428002c28..98727cfeb 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -910,8 +910,11 @@ ice_flow_rem_entry_sync(struct ice_hw *hw, struct ice_flow_entry *entry) if (entry->entry) ice_free(hw, entry->entry); - if (entry->acts) + if (entry->acts) { ice_free(hw, entry->acts); + entry->acts = NULL; + entry->acts_cnt = 0; + } ice_free(hw, entry); @@ -1306,6 +1309,7 @@ ice_flow_add_entry(struct ice_hw *hw, enum ice_block blk, u64 prof_id, e->id = entry_id; e->vsi_handle = vsi_handle; e->prof = prof; + e->priority = prio; switch (blk) { case ICE_BLK_RSS: @@ -1852,11 +1856,14 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, if (status) goto out; + /* Remove RSS configuration from VSI context before deleting + * the flow profile. + */ + ice_rem_rss_cfg_vsi_ctx(hw, vsi_handle, prof); + if (!ice_is_any_bit_set(prof->vsis, ICE_MAX_VSI)) status = ice_flow_rem_prof_sync(hw, blk, prof); - ice_rem_rss_cfg_vsi_ctx(hw, vsi_handle, prof); - out: ice_free(hw, segs); return status; -- 2.13.6