From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 3232C5F35 for ; Tue, 10 Jul 2018 13:48:53 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jul 2018 04:48:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,334,1526367600"; d="scan'208";a="55395848" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by orsmga007.jf.intel.com with ESMTP; 10 Jul 2018 04:48:42 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by irsmsx105.ger.corp.intel.com (163.33.3.28) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 10 Jul 2018 12:48:41 +0100 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.193]) by irsmsx111.ger.corp.intel.com ([169.254.2.118]) with mapi id 14.03.0319.002; Tue, 10 Jul 2018 12:48:41 +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: AQHUE57gR2CTqXqjzUiLE2ic2yfLyqSISvLwgAAKoDCAAAlxwA== Date: Tue, 10 Jul 2018 11:48:41 +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:48:54 -0000 > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Tuesday, July 10, 2018 12:17 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: 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 > > > > > > > > > -----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 > > > > ... > > > > > --- a/app/test-crypto-perf/cperf_test_common.c > > > +++ b/app/test-crypto-perf/cperf_test_common.c > > > > ... > > > > > 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; > > > > 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 nu= mber > of segments required. > Then, headroom size needs to be checked in case it is bigger than segment= size, > so data might need to start in the next segment. > Similar thing for tailroom. Actually, forget about this. I have been thinking about it, and it looks ar= tificial to do this. Generally, in a mbuf pool, headroom is the same for all mbufs/segments. In any case, I have a concern though about this. Headroom size is got from = a compile time option: CONFIG_RTE_PKTMBUF_HEADROOM=3D128. PMDs generally use this value to set "da= ta_off", but they could use another different value. So what happens if min_mbuf_headroom is more than this value? since this is not configurable, this won't work. Also, generally, headroom and tailroom are used for encapsulation, so I am = not sure if this is the best place. What about using the private size of the mbuf? That is actually configurabl= e, even though that data is not necessarily contiguous to the mbuf data. Sorry for the confusion and this last minute concern. Thanks, Pablo >=20 > Thanks, > Pablo >=20 >=20