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 07968A0350; Wed, 1 Jul 2020 07:46:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 345C81BF95; Wed, 1 Jul 2020 07:45:56 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 2845D25B3; Wed, 1 Jul 2020 07:45:53 +0200 (CEST) IronPort-SDR: LWLLugYYwGwBYPYwC9ZpTP4UtvhNoifebKMOwuX3sMaa5XiWQUQgQAUCbRaO/82NhoP2K9funB gG/dxesJB2Yw== X-IronPort-AV: E=McAfee;i="6000,8403,9668"; a="148033630" X-IronPort-AV: E=Sophos;i="5.75,299,1589266800"; d="scan'208";a="148033630" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 22:45:53 -0700 IronPort-SDR: BQy1MTvrGzz6Ia4gRroAbko75KhdCS/dR0pA8XJjEsKDQAPeTDc/ENxyoTX1umfy/w9WTeGGGE voZGQ3fcBJjg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,299,1589266800"; d="scan'208";a="454875967" Received: from dpdk51.sh.intel.com ([10.67.111.82]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2020 22:45:52 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , stable@dpdk.org, Junfeng Guo Date: Wed, 1 Jul 2020 13:49:44 +0800 Message-Id: <20200701054951.2393-2-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20200701054951.2393-1-qi.z.zhang@intel.com> References: <20200701054951.2393-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH v2 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" 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 patterh eth / ipv4 / udp / gtpu / \ gtpu_psc / ipv4 / udp / end actions rss types ipv4-udp end key_len \ 0 queues end / end testpmd> flow create 0 ingress patterh eth / ipv4 / udp / gtpu / \ gtpu_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 --- drivers/net/ice/base/ice_flow.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index 6adcda844..180fe4466 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -3557,6 +3557,13 @@ 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)) { + printf("ignore gtpu\n"); + 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 +3680,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, @@ -3706,6 +3714,10 @@ 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); -- 2.13.6