From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B8E5CDE3 for ; Fri, 18 Jan 2019 17:57:42 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jan 2019 08:57:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,491,1539673200"; d="scan'208";a="115720422" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by fmsmga007.fm.intel.com with ESMTP; 18 Jan 2019 08:57:41 -0800 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.213]) by IRSMSX154.ger.corp.intel.com ([169.254.12.253]) with mapi id 14.03.0415.000; Fri, 18 Jan 2019 16:57:39 +0000 From: "Trahe, Fiona" To: Changchun Zhang , "Pathak, Pravin" , "users@dpdk.org" CC: "Trahe, Fiona" Thread-Topic: [dpdk-users] Run-to-completion or Pipe-line for QAT PMD in DPDK Thread-Index: AQHUrriXjo1+JKJBjkaH5GQU9xCtbKW0/cFQgAAZIACAABUogIAACJIwgAAHYoCAAAGjsA== Date: Fri, 18 Jan 2019 16:57:39 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B435896CD61A@IRSMSX101.ger.corp.intel.com> References: <03fd164b-112b-4e44-a5b0-15c6e3703662@default> <348A99DA5F5B7549AA880327E580B435896CD08F@IRSMSX101.ger.corp.intel.com> <168A68C163D584429EF02A476D5274424DEA9B7C@FMSMSX108.amr.corp.intel.com> <5e87ae90-94b9-4e85-9172-46b95365ec36@default> <348A99DA5F5B7549AA880327E580B435896CD528@IRSMSX101.ger.corp.intel.com> <400475b7-869e-4281-9d31-058f96957fe1@default> In-Reply-To: <400475b7-869e-4281-9d31-058f96957fe1@default> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTRmZTA2ZjUtZDNjZS00ZWYxLWEwNzYtMWJiM2Q0MDdkMzNiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoid1RGQTM0Z2c2dlFTdlg1REtoYVpYV3pZQWpjamV4dVNyMVg1aGJ3dG1EcXFOMzNOUkVBbnFTM1Z0elZxTWZVQiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-users] Run-to-completion or Pipe-line for QAT PMD in DPDK X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 16:57:43 -0000 Hi Alex, > -----Original Message----- > From: Changchun Zhang [mailto:changchun.zhang@oracle.com] > Sent: Friday, January 18, 2019 4:42 PM > To: Trahe, Fiona ; Pathak, Pravin ; > users@dpdk.org > Subject: RE: [dpdk-users] Run-to-completion or Pipe-line for QAT PMD in D= PDK >=20 >=20 >=20 > Thanks! > Changchun (Alex) >=20 >=20 > -----Original Message----- > From: Trahe, Fiona [mailto:fiona.trahe@intel.com] > Sent: Friday, January 18, 2019 11:26 AM > To: Changchun Zhang ; Pathak, Pravin ; > users@dpdk.org > Cc: Trahe, Fiona > Subject: RE: [dpdk-users] Run-to-completion or Pipe-line for QAT PMD in D= PDK >=20 > Hi Alex, > > [changchun] In the same thread, but how about to dequeuer at the > > beginning of the thread each time, if data presents then processing > > them, if no data just do other work, and equeue the packets at some tim= e but does not wait. > > For example: > > While(1) > > { > > Nb_ops =3D dequeuer(); > > If(nb_ops > ) > > { > > process_dequeued_data(); > > continue; > > } > > > > Other_work(); > > If(ipsec) > > Enqueuer(); > > } > > Does it make sense? > [Fiona] It can, though on the first loop ro after a queit time youll proa= bly get very few back on first and > second dequeue as It'll be called immediately after the enqueue. Once it = gets busy that could be ok > though > [changchun] Thank you Fiona. One more question, as you said, enqueuer/deq= ueue should be called > within the same thread. Why? Is it because the other thread(lcore 1) cann= ot dequeuer the processed > data from other thread(lcore 2)? But as the cryptograph device lib doc sa= ys, "it is howerver possible to > use a different logical core to dequeuer an operation on a queue pair fro= m the logical core which it > was enqueued on". Looking forward to more details. It's because the QAT inflight counter would be incremented and decremented = by both threads so would need to be an atomic. It used to be atomic until 1= 7.11 release but we got a good reduction in offload cycle-count by replacing this with a normal variable and as all the feedbac= k we got was that applications were not using in pipeline mode we decided to=20 trade off this limitation for the added performance. The limitation is docu= mented here: http://doc.dpdk.org/guides/cryptodevs/qat.html You can look at code before 17.11 release to see the difference.