From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 193A823D for ; Mon, 18 Dec 2017 17:33:55 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2017 08:33:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,422,1508828400"; d="scan'208";a="13635959" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 18 Dec 2017 08:33:54 -0800 Received: from fmsmsx108.amr.corp.intel.com ([169.254.9.65]) by FMSMSX103.amr.corp.intel.com ([169.254.2.195]) with mapi id 14.03.0319.002; Mon, 18 Dec 2017 08:33:53 -0800 From: "Eads, Gage" To: Jerin Jacob CC: "Gujjar, Abhinandan S" , "dev@dpdk.org" , "Vangati, Narender" , "Rao, Nikhil" , "hemant.agrawal@nxp.com" , "Doherty, Declan" , "nidadavolu.murthy@cavium.com" , "nithin.dabilpuram@cavium.com" , "narayanaprasad.athreya@cavium.com" Thread-Topic: [RFC] eventdev: add crypto adapter API header Thread-Index: AQHTWSeZpnLyvUOAk06zOraV312JvqMr4eoAgBY5GKCAAMUIgIAGAUOYgACYwMA= Date: Mon, 18 Dec 2017 16:33:53 +0000 Message-ID: <9184057F7FC11744A2107296B6B8EB1E2BB29E9A@FMSMSX108.amr.corp.intel.com> References: <1510210453-61428-1-git-send-email-abhinandan.gujjar@intel.com> <20171129114153.GA16467@jerin> <9184057F7FC11744A2107296B6B8EB1E2BB1B296@FMSMSX108.amr.corp.intel.com> <20171214024910.GA10018@jerin> <9184057F7FC11744A2107296B6B8EB1E2BB1B9FF@FMSMSX108.amr.corp.intel.com> <20171218063012.GA12857@jerin> In-Reply-To: <20171218063012.GA12857@jerin> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDYzNzMxZDEtMWRhNy00NDM5LWJlNzctNDMyOTYwNWUyMmNhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNi41LjkuMyIsIlRydXN0ZWRMYWJlbEhhc2giOiJyUFMwdWQwN2NUR1ROd1E2VVFrWG9sZmh4MUdhNmJTbElYMjJDdGR3RjRBPSJ9 x-ctpclassification: CTP_PUBLIC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.1.200.106] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC] eventdev: add crypto adapter API header 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, 18 Dec 2017 16:33:56 -0000 > -----Original Message----- > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Monday, December 18, 2017 12:30 AM > To: Eads, Gage > Cc: Gujjar, Abhinandan S ; dev@dpdk.org; > Vangati, Narender ; Rao, Nikhil > ; hemant.agrawal@nxp.com; Doherty, Declan > ; nidadavolu.murthy@cavium.com; > nithin.dabilpuram@cavium.com; narayanaprasad.athreya@cavium.com > Subject: Re: [RFC] eventdev: add crypto adapter API header >=20 > -----Original Message----- > > Date: Thu, 14 Dec 2017 18:52:02 +0000 > > From: "Eads, Gage" > > To: Jerin Jacob > > CC: "Gujjar, Abhinandan S" , "dev@dpdk.org= " > > , "Vangati, Narender" , > > "Rao, Nikhil" , "hemant.agrawal@nxp.com" > > , "Doherty, Declan" > > , "nidadavolu.murthy@cavium.com" > > , "nithin.dabilpuram@cavium.com" > > , "narayanaprasad.athreya@cavium.com" > > > > Subject: RE: [RFC] eventdev: add crypto adapter API header > > > > > > > > > -----Original Message----- > > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > > Sent: Wednesday, December 13, 2017 8:49 PM > > > To: Eads, Gage > > > Cc: Gujjar, Abhinandan S ; > > > dev@dpdk.org; Vangati, Narender ; Rao, > > > Nikhil ; hemant.agrawal@nxp.com; Doherty, > > > Declan ; nidadavolu.murthy@cavium.com; > > > nithin.dabilpuram@cavium.com; narayanaprasad.athreya@cavium.com > > > Subject: Re: [RFC] eventdev: add crypto adapter API header > > > > > > -----Original Message----- > > > > Date: Wed, 13 Dec 2017 23:35:48 +0000 > > > > From: "Eads, Gage" > > > > To: Jerin Jacob , "Gujjar, Abhinand= an > S" > > > > > > > > CC: "dev@dpdk.org" , "Vangati, Narender" > > > > , "Rao, Nikhil" > > > > , "hemant.agrawal@nxp.com" > , "Doherty, Declan" > > > > , "nidadavolu.murthy@cavium.com" > > > > , "nithin.dabilpuram@cavium.com" > > > > , > "narayanaprasad.athreya@cavium.com" > > > > > > > > Subject: RE: [RFC] eventdev: add crypto adapter API header > > > > > > > > Hey Jerin, > > > > > > Hey Gage, > > > > > > > > > > > > > > > > > > > > > + > > > > > > + /** > > > > > > + * @warning > > > > > > + * @b EXPERIMENTAL: this enum may change without prior notice > > > > > > + * > > > > > > + * Crypto event adapter type > > > > > > + */ > > > > > > +enum rte_event_crypto_adapter_type { > > > > > > + RTE_EVENT_CRYPTO_ADAPTER_RX_ONLY =3D 1, > > > > > > + /**< Start only Rx part of crypto adapter. > > > > > > + * Packets dequeued from cryptodev are new to eventdev and > > > > > > + * events will be treated as RTE_EVENT_OP_NEW */ > > > > > > + RTE_EVENT_CRYPTO_ADAPTER_RX_TX, > > > > > > + /**< Start both Rx & Tx part of crypto adapter. > > > > > > + * Packet's event context will be retained and > > > > > > + * event will be treated as RTE_EVENT_OP_FORWARD */ }; > > > > > > > > > > How about leveraging ev.op based schematics as mentioned above? > > > > > > > > That could work, but perhaps the ev.op should be configured once > > > > up front, as > > > I see it being a function of the application architecture. A couple > > > possible designs, for example: > > > > - Worker enqueues into cryptodev, adapter polls for response: the > > > > adapter > > > port would always use OP_NEW here. > > > > - Worker sends a crypto request event to the adapter, which gives > > > > the request to the cryptodev and polls for response: the adapter > > > > port would always use OP_FWD here. (This ties in with my implicit > > > > release patch > > > > (http://dpdk.org/ml/archives/dev/2017-December/083535.html)) > > > > - Etc. > > > > > > Yes. Semantically both approaches will work. I was trying to avoid > > > extra clutter(enum rte_event_crypto_adapter_type) in adapter API. > > > I don't see any problem in moving ev.op to adapter configuration > > > time if it helps the SW driver. > > > > > > IMO, We can change RTE_EVENT_CRYPTO_ADAPTER_RX_ONLY and > > > RTE_EVENT_CRYPTO_ADAPTER_RX_TX to more appropriate name, > something > > > like, > RTE_EVENT_CRYPTO_ADAPTER_TYPE_OP_NEW/RTE_EVENT_CRYPTO_ADAPTE > > > R_TYPE_OP_FWD > > > or something like that. > > > > > > > I agree that the two naming schemes are equivalent, but since this opti= on > would control the adapter's behavior (Rx only vs. Rx + Tx), (IMO) I think > Abhinandan's original names do a better job of conveying what effect thes= e two > options have on the adapter, compared to the op type names. >=20 > The only concern with Rx/Tx terminology was, It is mostly used in the eth= dev > domain. > In crypto domain, typically, we use enqueue/dequeue. > The only difference between two modes is if adapter enqueue the events wi= th > RTE_EVENT_OP_NEW vs RTE_EVENT_OP_FORWARD then (IMO) we can change > something related to that name to avoid adding a new terminology. >=20 Oh, sure -- enqueue/dequeue makes sense here. I'd still prefer DEQ_ONLY or = DEQ_ENQ, but the event_op names work just as well. Speaking of the crypto domain, the cryptodev enqueue and dequeue operations= both take crypto op pointers. The original RFC had the request event point= ing to an mbuf (which had a crypto_op pointer in its private metadata), but= with the suggested opaque eventdev metadata changes it makes more sense fo= r the request event to point to a crypto op. And the RFC didn't specify wha= t the response event would point to (mbuf or crypto op), but to match the c= ryptodev dequeue operation then a crypto op makes sense. Will this work wit= h your hardware? > BTW, Based on the earlier discussion, if we need to add opaque eventdev > metadata to cryptodev then it may change ABI.If so, I think, we need to > announce ABI change notice for cryptodev and plan cryptodev adapter for > v18.05. Personally I'd prefer to get this right/agreed-upon the first time around -= - even if that means breaking ABI and pushing this adapter out to 18.05.