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 39261A0526; Fri, 10 Jul 2020 04:17:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 582EF1DC0D; Fri, 10 Jul 2020 04:17:17 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 75E281DBAA; Fri, 10 Jul 2020 04:17:10 +0200 (CEST) IronPort-SDR: S2Rx+0HcdgJDQQOPRwBHxFapIANQ5HTx6cZpK2EaM+tL/0hGYUImga9/18Hwu88hxS884aGhpZ Sb5KkTBqCfRw== X-IronPort-AV: E=McAfee;i="6000,8403,9677"; a="213028666" X-IronPort-AV: E=Sophos;i="5.75,334,1589266800"; d="scan'208";a="213028666" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2020 19:17:10 -0700 IronPort-SDR: /oQKbtlKAyAgimGaTlL1sAAeXTPBPq1v1Wp1fY7b8imYZaNrsFL/G384xdK62ohrvhBo1nVJm6 xumq8N5Cs8XQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,334,1589266800"; d="scan'208";a="284360168" Received: from dpdk-junfengguo-v3.sh.intel.com ([10.67.119.146]) by orsmga006.jf.intel.com with ESMTP; 09 Jul 2020 19:17:08 -0700 From: Junfeng Guo To: qi.z.zhang@intel.com, qiming.yang@intel.com Cc: dev@dpdk.org, stable@dpdk.org, ferruh.yigit@intel.com, junfeng.guo@intel.com Date: Fri, 10 Jul 2020 10:14:05 +0800 Message-Id: <20200710021412.3403562-2-junfeng.guo@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200710021412.3403562-1-junfeng.guo@intel.com> References: <20200701054951.2393-1-qi.z.zhang@intel.com> <20200710021412.3403562-1-junfeng.guo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 1/8] net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist 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" From: Qi Zhang An IP header combined with GTP-U header should be regarded as inner layer for RSS, otherwise it mess the field vector between an IPv4 rule and IPv6 rule e.g: testpmd> flow create 0 ingress pattern eth / ipv4 / udp / gtpu / \ gtp_psc / ipv4 / udp / end actions rss types ipv4-udp end key_len \ 0 queues end / end testpmd> flow create 0 ingress pattern eth / ipv4 / udp / gtpu / \ gtp_psc / ipv6 / udp / end actions rss types ipv6-udp end key_len \ 0 queues end / end Fixes: b7d34ccc47b5 ("net/ice/base: packet encapsulation for RSS") Cc: stable@dpdk.org Signed-off-by: Qi Zhang Signed-off-by: Junfeng Guo Acked-by: Qiming Yang --- drivers/net/ice/base/ice_flow.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index 6adcda844..984fa90ce 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -3557,6 +3557,11 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, if (status) goto exit; + /* don't do RSS for GTPU outer */ + if (segs_cnt == ICE_RSS_OUTER_HEADERS && + 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 * operations required and exit. @@ -3673,6 +3678,7 @@ ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, ice_acquire_lock(&hw->rss_locks); status = ice_add_rss_cfg_sync(hw, vsi_handle, hashed_flds, addl_hdrs, ICE_RSS_OUTER_HEADERS, symm); + if (!status) status = ice_add_rss_cfg_sync(hw, vsi_handle, hashed_flds, addl_hdrs, ICE_RSS_INNER_HEADERS, @@ -3712,6 +3718,10 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, 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