From patchwork Mon Aug 31 05:50:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Guo, Jia" X-Patchwork-Id: 76169 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CC357A04AB; Mon, 31 Aug 2020 07:52:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EBBE1137D; Mon, 31 Aug 2020 07:52:29 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id AF6F6A3 for ; Mon, 31 Aug 2020 07:52:28 +0200 (CEST) IronPort-SDR: hRWM3x1/PLLrV0tlbTcvZB/PGZI6xixN5cv6rXAw5LymHf/LxpDRhERtrjruCQaVvv7ga3nQ/M 4KFCz5+afiDA== X-IronPort-AV: E=McAfee;i="6000,8403,9729"; a="218463134" X-IronPort-AV: E=Sophos;i="5.76,374,1592895600"; d="scan'208";a="218463134" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2020 22:52:27 -0700 IronPort-SDR: sjYxV/H2XdyeUDoiCywoM8Cb0nu+pSz44NIuAasFvtJULiWJEjJ1w5OMF6FKQVrRcuFZV0hnNZ 4ZC4DYSEeJbQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,374,1592895600"; d="scan'208";a="340542888" Received: from npg-dpdk-cvl-jeffguo-01.sh.intel.com ([10.67.111.128]) by orsmga007.jf.intel.com with ESMTP; 30 Aug 2020 22:52:26 -0700 From: Jeff Guo To: qiming.yang@intel.com, qi.z.zhang@intel.com Cc: dev@dpdk.org, jia.guo@intel.com Date: Mon, 31 Aug 2020 13:50:45 +0800 Message-Id: <20200831055045.64061-1-jia.guo@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200828153410.88469-1-jia.guo@intel.com> References: <20200828153410.88469-1-jia.guo@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2] net/ice: fix the hash parser 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" GTPU TEID hash should only be enabled when ETH_RSS_GTPU is required. And the hash parser should not restrict the combined usage of protocol. Fixes: e7cc68c70736 ("net/ice: fix GTPU TEID hash") Signed-off-by: Jeff Guo Acked-by: Qi Zhang --- drivers/net/ice/ice_hash.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index c0271dff5..45c69e6bf 100644 --- a/drivers/net/ice/ice_hash.c +++ b/drivers/net/ice/ice_hash.c @@ -1141,7 +1141,7 @@ ice_hash_parse_action(struct ice_pattern_match_item *pattern_match_item, } /* update hash field for nat-t esp. */ - if (rss_type == ETH_RSS_ESP && + if (rss_type & ETH_RSS_ESP && (m->eth_rss_hint & ETH_RSS_NONFRAG_IPV4_UDP || m->eth_rss_hint & ETH_RSS_NONFRAG_IPV6_UDP)) { hash_meta->hash_flds &= @@ -1151,7 +1151,10 @@ ice_hash_parse_action(struct ice_pattern_match_item *pattern_match_item, } /* update hash field for gtpu eh/gtpu dwn/gtpu up. */ - if (hash_meta->pkt_hdr & ICE_FLOW_SEG_HDR_GTPU_EH) { + if (!(rss_type & ETH_RSS_GTPU)) { + break; + } else if (hash_meta->pkt_hdr & + ICE_FLOW_SEG_HDR_GTPU_EH) { hash_meta->hash_flds &= ~(BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_IP_TEID)); hash_meta->hash_flds |=