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 A851FA0540; Mon, 13 Jul 2020 13:07:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 866AC1D5B7; Mon, 13 Jul 2020 13:07:25 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 1D6E31D58F; Mon, 13 Jul 2020 13:07:23 +0200 (CEST) IronPort-SDR: knmAmiVKDOQngvvK4aK0d1agKoSm4nJg3LU2UXfKHkcUxBOp7ibqQPGUq4myqRCi1JLWkLXvfN PJyHZpzb5UNg== X-IronPort-AV: E=McAfee;i="6000,8403,9680"; a="136062216" X-IronPort-AV: E=Sophos;i="5.75,347,1589266800"; d="scan'208";a="136062216" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2020 04:07:23 -0700 IronPort-SDR: DNBCvNu3hoq29kFe+va3iJvUBZs5BgfUyjbtPux/3eVOJRZvyLlUTzA6HaTg4SmMwcakb7zrNO Iw28/jFgFARA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,347,1589266800"; d="scan'208";a="429347181" Received: from dpdk-junfengguo-v3.sh.intel.com ([10.67.119.146]) by orsmga004.jf.intel.com with ESMTP; 13 Jul 2020 04:07:21 -0700 From: Junfeng Guo To: qi.z.zhang@intel.com Cc: dev@dpdk.org, stable@dpdk.org, ferruh.yigit@intel.com, junfeng.guo@intel.com Date: Mon, 13 Jul 2020 19:05:40 +0800 Message-Id: <20200713110540.1129599-1-junfeng.guo@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [DPDK] net/ice/base: adjust code order and cleanup coding style 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" Previous logic in removing RSS for GTPU was added in incorrect lines. The adjustment in this patch will correct the code order so that RSS for GTPU can be removed successfully. We also delete the redundant print statement and cleanup the coding style in this patch. Fixes: bed9bb3139ef ("net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist") Signed-off-by: Junfeng Guo Cc: stable@dpdk.org --- drivers/net/ice/base/ice_flow.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index d1b8a0534..9a17d956b 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -3559,10 +3559,8 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, /* don't do RSS for GTPU outer */ if (segs_cnt == ICE_RSS_OUTER_HEADERS && - (segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)) { - printf("ignore gtpu\n"); + segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) return ICE_SUCCESS; - } /* Search for a flow profile that has matching headers, hash fields * and has the input VSI associated to it. If found, no further @@ -3714,16 +3712,16 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, if (!segs) return ICE_ERR_NO_MEMORY; - if (segs_cnt == ICE_RSS_OUTER_HEADERS && - segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) - return ICE_SUCCESS; - /* Construct the packet segment info from the hashed fields */ status = ice_flow_set_rss_seg_info(&segs[segs_cnt - 1], hashed_flds, addl_hdrs); if (status) goto out; + if (segs_cnt == ICE_RSS_OUTER_HEADERS && + segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) + return ICE_SUCCESS; + prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt, vsi_handle, ICE_FLOW_FIND_PROF_CHK_FLDS); -- 2.25.1