From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 7FC3C23A for ; Mon, 7 May 2018 14:26:53 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 May 2018 05:26:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,373,1520924400"; d="scan'208";a="52156286" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga004.fm.intel.com with ESMTP; 07 May 2018 05:26:51 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.150]) by IRSMSX104.ger.corp.intel.com ([169.254.5.96]) with mapi id 14.03.0319.002; Mon, 7 May 2018 13:26:50 +0100 From: "De Lara Guarch, Pablo" To: "Chalupnik, KamilX" , "dev@dpdk.org" CC: "Mokhtar, Amr" Thread-Topic: [PATCH 04/13] baseband/turbo_sw: memcpy changed or removed from driver Thread-Index: AQHT3WMO4l/8zR0FWEydLFpradoPbKQkQCCQ Date: Mon, 7 May 2018 12:26:50 +0000 Message-ID: References: <20180426133008.12388-1-kamilx.chalupnik@intel.com> <20180426133008.12388-4-kamilx.chalupnik@intel.com> In-Reply-To: <20180426133008.12388-4-kamilx.chalupnik@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjdiODFmZDUtZThkYS00NWFkLWI4MmEtYjg0YmViNWE1ZDAzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Ing1ZVQ2ZjNBS3F0cjVyV3NFazhOSlkyNTBjbzJRWkdjMnlycHkzeUFlOVE9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 04/13] baseband/turbo_sw: memcpy changed or removed from driver 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: , X-List-Received-Date: Mon, 07 May 2018 12:26:53 -0000 > -----Original Message----- > From: Chalupnik, KamilX > Sent: Thursday, April 26, 2018 2:30 PM > To: dev@dpdk.org > Cc: Mokhtar, Amr ; De Lara Guarch, Pablo > ; Chalupnik, KamilX > > Subject: [PATCH 04/13] baseband/turbo_sw: memcpy changed or removed from > driver >=20 It is not clear what this patch is trying to do, based on the title? Minimizing memory copying? Please, modify the title to be more clear. > From: KamilX Chalupnik >=20 > Optimization of Turbo Software driver: > - usage of memcpy changed or removed > - minor changes in defines definitions Could you split this patch in two patches? One with the macro changes and the other one making changes on the memory copying? Also, do those macros need to be in bbdev layer? Will they be used in other PMDs? >=20 > Signed-off-by: Kamil Chalupnik > --- > drivers/baseband/turbo_sw/bbdev_turbo_software.c | 143 +++++++++++++----= - > ----- > lib/librte_bbdev/rte_bbdev_op.h | 18 ++- > 2 files changed, 100 insertions(+), 61 deletions(-) >=20 > diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c > b/drivers/baseband/turbo_sw/bbdev_turbo_software.c > index 26b8560..2728b30 100644 > --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c > +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c ... > - /* copy the input to the temporary buffer to be able to extend > - * it by 3 CRC bytes > - */ > - rte_memcpy(q->enc_in, in, (k - 24) >> 3); > crc_req.data =3D in; > crc_req.len =3D (k - 24) >> 3; > - crc_resp.data =3D q->enc_in; > - bblib_lte_crc24a_gen(&crc_req, &crc_resp); > + /* Check if there is a room for CRC bits if not use > + * the temporary buffer. > + */ Check if there is room for CRC bits. If not.... > + if (rte_pktmbuf_append(m_in, 3) =3D=3D NULL) { > + rte_memcpy(q->enc_in, in, (k - 24) >> 3); > + in =3D q->enc_in; > + } else { > + /* Store 3 first bytes of next CB as they will be > + * overwritten by CRC bytes. If it is the last CB then > + * there is no point to store 3 next bytes and this > + * if..else branch will be omitted. > + */ > + first_3_bytes =3D *((uint64_t *)&in[(k - 32) >> 3]); >=20 ... > - rte_memcpy(q->enc_in, in, (k - 24) >> 3); > crc_req.data =3D in; > crc_req.len =3D (k - 24) >> 3; > - crc_resp.data =3D q->enc_in; > - bblib_lte_crc24b_gen(&crc_req, &crc_resp); > + /* Check if there is a room for CRC bits if this is the last > + * CB in TB. If not use temporary buffer. Same as above. > + */