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 E21BDA0613 for ; Mon, 23 Sep 2019 09:19:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B1DA11BE9D; Mon, 23 Sep 2019 09:19:07 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 69BA01BE85 for ; Mon, 23 Sep 2019 09:19:05 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Sep 2019 00:19:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,539,1559545200"; d="scan'208";a="195292086" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by FMSMGA003.fm.intel.com with ESMTP; 23 Sep 2019 00:19:04 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Sep 2019 00:19:04 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 23 Sep 2019 00:19:03 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 23 Sep 2019 00:19:03 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.92]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.146]) with mapi id 14.03.0439.000; Mon, 23 Sep 2019 15:19:02 +0800 From: "Yang, Qiming" To: "Zhang, Qi Z" , "Lu, Wenzhuo" CC: "dev@dpdk.org" , "Ye, Xiaolong" , "Yan, Zhirun" , "Stillwell Jr, Paul M" Thread-Topic: [PATCH v4 21/30] net/ice/base: fix segment in remove existing RSS rule Thread-Index: AQHVcdehVq00lFzDJ0iEKbcaQ3/Iiac42o3w Date: Mon, 23 Sep 2019 07:19:01 +0000 Message-ID: References: <20190902035551.16852-1-qi.z.zhang@intel.com> <20190923062702.3836-1-qi.z.zhang@intel.com> <20190923062702.3836-22-qi.z.zhang@intel.com> In-Reply-To: <20190923062702.3836-22-qi.z.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzQxODAwMjYtZDYyYS00Y2JlLWFkZmMtOTc0NzdhMjJhYzUzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQ1R6N2tvbnd1QWRcL1FjaEQ2Nm9OdFFlN1MydHBcL2Q3T09VUGpUckVFSnU4SXpCb284VzRSU1BJNEZ1SHpVUVg0In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 21/30] net/ice/base: fix segment in remove existing RSS rule 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" > -----Original Message----- > From: Zhang, Qi Z > Sent: Monday, September 23, 2019 2:27 PM > To: Lu, Wenzhuo ; Yang, Qiming > > Cc: dev@dpdk.org; Ye, Xiaolong ; Zhang, Qi Z > ; Yan, Zhirun ; Stillwell Jr, > Paul M > Subject: [PATCH v4 21/30] net/ice/base: fix segment in remove existing RS= S > rule >=20 > Before this patch, RSS tunneled rules can not be destroyed at runtime. > This is because it can not find the existing matching profile for tunnels= . > segs[0] should always be zero and all matched, segs[1] for inner part. > It only construct one segment. >=20 > This patch modifies construct segment in ice_rem_rss_cfg_sync() to match > ice_add_rss_cfg_sync(). >=20 > Fixes: 75bc2ea04af4 ("net/ice/base: packet encapsulation for RSS") >=20 +CC stable > Signed-off-by: Zhirun Yan > Signed-off-by: Paul M Stillwell Jr > Signed-off-by: Qi Zhang > --- > drivers/net/ice/base/ice_flow.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_f= low.c > index 6782dfaa8..f9c65d6a2 100644 > --- a/drivers/net/ice/base/ice_flow.c > +++ b/drivers/net/ice/base/ice_flow.c > @@ -2185,12 +2185,14 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 > vsi_handle, u64 hashed_flds, > struct ice_flow_prof *prof; > enum ice_status status; >=20 > - segs =3D (struct ice_flow_seg_info *)ice_malloc(hw, sizeof(*segs)); > + segs =3D (struct ice_flow_seg_info *)ice_calloc(hw, segs_cnt, > + sizeof(*segs)); > if (!segs) > return ICE_ERR_NO_MEMORY; >=20 > /* Construct the packet segment info from the hashed fields */ > - status =3D ice_flow_set_rss_seg_info(segs, hashed_flds, addl_hdrs); > + status =3D ice_flow_set_rss_seg_info(&segs[segs_cnt - 1], hashed_flds, > + addl_hdrs); > if (status) > goto out; >=20 > -- > 2.13.6