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 60494A0540 for ; Mon, 13 Jul 2020 13:06:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 49C5D1D58F; Mon, 13 Jul 2020 13:06:14 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 7A1351D58F for ; Mon, 13 Jul 2020 13:06:12 +0200 (CEST) IronPort-SDR: QCRGAxBwOpixyjPOXA66OydHvuLeptCBGP10epIjlzLxEsb8+RkHHZsudONiO/HiRlc55D06Mb kw0MWjIuMrdw== X-IronPort-AV: E=McAfee;i="6000,8403,9680"; a="166701440" X-IronPort-AV: E=Sophos;i="5.75,347,1589266800"; d="scan'208";a="166701440" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2020 04:06:11 -0700 IronPort-SDR: WaNZ72j9RNcqWTHU2BoH7aOzi6Q5ffdj0Hdsr3ObiJJbiKcAeaot6mGPW7mj6G6zRCzEKE2iry 5Nu1zEfFxkZw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,347,1589266800"; d="scan'208";a="281368096" Received: from dpdk-junfengguo-v3.sh.intel.com ([10.67.119.146]) by orsmga003.jf.intel.com with ESMTP; 13 Jul 2020 04:06:10 -0700 From: Junfeng Guo To: qabuild@intel.com Cc: Junfeng Guo , stable@dpdk.org Date: Mon, 13 Jul 2020 19:04:29 +0800 Message-Id: <20200713110430.1125022-1-junfeng.guo@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [DPDK] net/ice/base: adjust code order and cleanup coding style X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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