From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 3F4CA2BE5 for ; Tue, 10 Jul 2018 13:16:37 +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 orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jul 2018 04:16:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,334,1526367600"; d="scan'208";a="214817782" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by orsmga004.jf.intel.com with ESMTP; 10 Jul 2018 04:16:33 -0700 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.193]) by IRSMSX152.ger.corp.intel.com ([169.254.6.61]) with mapi id 14.03.0319.002; Tue, 10 Jul 2018 12:16:32 +0100 From: "De Lara Guarch, Pablo" To: Anoob Joseph , "Doherty, Declan" CC: Akhil Goyal , Ankur Dwivedi , Jerin Jacob , Narayana Prasad , "dev@dpdk.org" Thread-Topic: [PATCH v1 2/3] app/crypto-perf: honour cryptodev's min headroom/tailroom Thread-Index: AQHUE57gR2CTqXqjzUiLE2ic2yfLyqSISvLwgAAKoDA= Date: Tue, 10 Jul 2018 11:16:32 +0000 Message-ID: References: <1529389574-6643-1-git-send-email-anoob.joseph@caviumnetworks.com> <1530712550-18099-1-git-send-email-anoob.joseph@caviumnetworks.com> <1530712550-18099-3-git-send-email-anoob.joseph@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzFlNzIzOTgtYTcwOC00YjJhLTlhYTUtNWNlZGVlMGJkN2JjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiOEVjUjFKRTcyOEVaK0t2dkMyVnBnaUJwbFIrcjhxXC91aDRySVwvRHpNWUlSeEZ2cFFGNmlcL2RNUlFjanRUTU9MNiJ9 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 v1 2/3] app/crypto-perf: honour cryptodev's min headroom/tailroom 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: Tue, 10 Jul 2018 11:16:37 -0000 > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Tuesday, July 10, 2018 12:08 PM > To: 'Anoob Joseph' ; Doherty, Declan > > Cc: Akhil Goyal ; Ankur Dwivedi > ; Jerin Jacob > ; Narayana Prasad > ; dev@dpdk.org > Subject: RE: [PATCH v1 2/3] app/crypto-perf: honour cryptodev's min > headroom/tailroom >=20 >=20 >=20 > > -----Original Message----- > > From: Anoob Joseph [mailto:anoob.joseph@caviumnetworks.com] > > Sent: Wednesday, July 4, 2018 2:56 PM > > To: Doherty, Declan ; De Lara Guarch, Pablo > > > > Cc: Anoob Joseph ; Akhil Goyal > > ; Ankur Dwivedi > > ; Jerin Jacob > > ; Narayana Prasad > > ; dev@dpdk.org > > Subject: [PATCH v1 2/3] app/crypto-perf: honour cryptodev's min > > headroom/tailroom > > > > Crypto dev would specify its headroom and tailroom requirement and the > > application is expected to honour this while creating buffers. > > > > Signed-off-by: Anoob Joseph >=20 > ... >=20 > > --- a/app/test-crypto-perf/cperf_test_common.c > > +++ b/app/test-crypto-perf/cperf_test_common.c >=20 > ... >=20 > > fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp, > > m->buf_iova =3D next_seg_phys_addr; > > next_seg_phys_addr +=3D mbuf_hdr_size + segment_sz; > > m->buf_len =3D segment_sz; > > - m->data_len =3D segment_sz; > > + m->data_len =3D data_len; > > > > - /* No headroom needed for the buffer */ > > - m->data_off =3D 0; > > + /* Use headroom specified for the buffer */ > > + m->data_off =3D headroom; >=20 > Headroom is only applicable for the first segment/s. > This is adding headroom in all the segments, which looks wrong. >=20 I think "max_size" needs to be recalculated in "cperf_alloc_common_memory", adding headroom and tailroom size, which will potentially increase the numb= er of segments required. Then, headroom size needs to be checked in case it is bigger than segment s= ize, so data might need to start in the next segment. Similar thing for tailroom. Thanks, Pablo