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 5E4FDA0613 for ; Mon, 23 Sep 2019 09:11:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C02891DB9; Mon, 23 Sep 2019 09:11:02 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 7245444C3 for ; Mon, 23 Sep 2019 09:11:00 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Sep 2019 00:10:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,539,1559545200"; d="scan'208";a="339627806" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 23 Sep 2019 00:10:59 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Sep 2019 00:10:58 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Sep 2019 00:10:57 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.92]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.235]) with mapi id 14.03.0439.000; Mon, 23 Sep 2019 15:10:56 +0800 From: "Yang, Qiming" To: "Zhang, Qi Z" , "Lu, Wenzhuo" CC: "dev@dpdk.org" , "Ye, Xiaolong" , "Allan, Bruce W" , "Stillwell Jr, Paul M" Thread-Topic: [PATCH v4 26/30] net/ice/base: use bitmap copy where appropriate Thread-Index: AQHVcdemBvm9XXWOwkC4CHJ5tyavjKc418Ig Date: Mon, 23 Sep 2019 07:10:55 +0000 Message-ID: References: <20190902035551.16852-1-qi.z.zhang@intel.com> <20190923062702.3836-1-qi.z.zhang@intel.com> <20190923062702.3836-27-qi.z.zhang@intel.com> In-Reply-To: <20190923062702.3836-27-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzY3Zjg3NTYtMDMzNi00OWQxLThjMjItOGQ1NTJhYmQwZTU2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTktCaWZVb1FuXC9PeGx6Y0NuQnJybWtlUmQ2bjNKSFUxdFNlYUt6OU15T3JOenFxTFdpNE8xWnlkMm9XS2pCRnIifQ== 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 26/30] net/ice/base: use bitmap copy where appropriate 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 > ; Allan, Bruce W ; Stillwe= ll > Jr, Paul M > Subject: [PATCH v4 26/30] net/ice/base: use bitmap copy where appropriate >=20 > ice_cp_bitmap() already exists and should be used instead of using > ice_memcpy(). Note, there are a couple comments that sugges t using a More than one space before 'Note' Sugges t/suggest? > bitmap-specific copy function, but those are not correct since the source > block of memory is not a bitmap. >=20 > Signed-off-by: Bruce Allan > Signed-off-by: Paul M Stillwell Jr > Signed-off-by: Qi Zhang > --- > drivers/net/ice/base/ice_switch.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) >=20 > diff --git a/drivers/net/ice/base/ice_switch.c > b/drivers/net/ice/base/ice_switch.c > index 7681ba38b..10dfc720a 100644 > --- a/drivers/net/ice/base/ice_switch.c > +++ b/drivers/net/ice/base/ice_switch.c > @@ -615,8 +615,7 @@ ice_get_recp_frm_fw(struct ice_hw *hw, struct > ice_sw_recipe *recps, u8 rid, > goto err_unroll; >=20 > /* Copy result indexes */ > - ice_memcpy(recps[rid].res_idxs, result_bm, sizeof(recps[rid].res_idxs), > - ICE_NONDMA_TO_NONDMA); > + ice_cp_bitmap(recps[rid].res_idxs, result_bm, ICE_MAX_FV_WORDS); > recps[rid].recp_created =3D true; >=20 > err_unroll: > @@ -645,8 +644,8 @@ ice_get_recp_to_prof_map(struct ice_hw *hw) > ice_zero_bitmap(r_bitmap, ICE_MAX_NUM_RECIPES); > if (ice_aq_get_recipe_to_profile(hw, i, (u8 *)r_bitmap, NULL)) > continue; > - ice_memcpy(profile_to_recipe[i], r_bitmap, > - sizeof(profile_to_recipe[i]), > ICE_NONDMA_TO_NONDMA); > + ice_cp_bitmap(profile_to_recipe[i], r_bitmap, > + ICE_MAX_NUM_RECIPES); > for (j =3D 0; j < ICE_MAX_NUM_RECIPES; j++) > if (ice_is_bit_set(r_bitmap, j)) > ice_set_bit(i, recipe_to_profile[j]); @@ - > 5586,8 +5585,8 @@ ice_add_adv_recipe(struct ice_hw *hw, struct > ice_adv_lkup_elem *lkups, > goto err_unroll; >=20 > /* Update profile to recipe bitmap array */ > - ice_memcpy(profile_to_recipe[fvit->profile_id], r_bitmap, > - sizeof(r_bitmap), ICE_NONDMA_TO_NONDMA); > + ice_cp_bitmap(profile_to_recipe[fvit->profile_id], r_bitmap, > + ICE_MAX_NUM_RECIPES); >=20 > /* Update recipe to profile bitmap array */ > for (j =3D 0; j < ICE_MAX_NUM_RECIPES; j++) > -- > 2.13.6