From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0079.outbound.protection.outlook.com [104.47.40.79]) by dpdk.org (Postfix) with ESMTP id 3DF921B00B for ; Thu, 14 Dec 2017 03:49:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=goIdp0BVFE9h42Uf45ziP6KJ9l9YHUiPm9Jh+17FEqA=; b=TfcRJJRYYLq/fDDC3lepRBiYsUtwH1oYKfaYwlR2L1MSkBKAhzZS+8Msw2miLTBb7msfIkkyHbjtZizNdI5XLm5fMXvoMww302J6lBDBPh8ID76SqDE5a3OJOvOn0YpzxAnyUXwM7exWbXsy7/1o8wqOqS3MYSGe1S5uDe3D47I= Received: from jerin (122.167.65.15) by SN2PR07MB2525.namprd07.prod.outlook.com (2603:10b6:804:6::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Thu, 14 Dec 2017 02:49:25 +0000 Date: Thu, 14 Dec 2017 08:19:11 +0530 From: Jerin Jacob 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" Message-ID: <20171214024910.GA10018@jerin> References: <1510210453-61428-1-git-send-email-abhinandan.gujjar@intel.com> <20171129114153.GA16467@jerin> <9184057F7FC11744A2107296B6B8EB1E2BB1B296@FMSMSX108.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9184057F7FC11744A2107296B6B8EB1E2BB1B296@FMSMSX108.amr.corp.intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [122.167.65.15] X-ClientProxiedBy: PN1PR01CA0117.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00::33) To SN2PR07MB2525.namprd07.prod.outlook.com (2603:10b6:804:6::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: addaa982-5220-4e24-7d9c-08d5429d4bf1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307); SRVR:SN2PR07MB2525; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 3:BUmbetLcgqXjesizfdRA4Hma7cQYlhQLQBQ/c3AS7VAcydWsa5Nx6VFdoS+uog69Fm4G1GmvK5mCgSRi3q+F0Dv/4J71etwcC6058NTkRr4F/fccuMuQNk+Fo0NcNGnsl8eMbWQwXlqdDz3Ree8BXKj6/3rn9aaI3NjXeASEFR5hYAxzuIQL7c0P7GRv1QCg4xudyiZLyX19bVwgewHeS2RuLtKNnO6DxhURINzCG/GZ9qzAEJ0AsuRi7T4k0M0m; 25:9T1fd7lP18o0G9EvuNWjggjlQpJ2GIDVtGDOLbWsESxAU2yMEeIrxgwoF3hwVfGQ2mf2gW2UoYtwXTD7R17DiRYvslA7J905AbnGUUMoiBE1rK91hM2jEj1BiY1HsuQoLxhM42QHz1jGNitBD8YeV7E/20fD+EqvbA0rmYOGYgut3xPBqISc4r2gl8d7AY/HHCmr05k80mmjSW2VSMcpiUoOchZkJbt7bF7a5RjVTTkYaHV7awp4uqIoE21Ja62fJTZpa523VNJRrU6cdjU4Oi5CxzyJUrz/uKqfmDZnLZP6+2hlEb0yO4f/dLpPveSOz6MThfsM+35WdCT60nZRKQ==; 31:R3VYQZdOxzumIUZgiM82NlBBNOAsIfbn5BpUg+XqfH2krVPzoNcqGQSmWg0aANFbop1+gf20Ci3WSP3siTBTm2eOwg7RcYAE2Z/0Ww5PkoMvHvkEdaFoazVHwfjNdmdObi0ITk0z+WwhNE/f/2+MT9DFWNyKyFY07xBsXQFLt9rX8T3oxBYyaqTe+UD8e8ygEW/U2QQd6o7kkE//bHsKR8Y7rOFHWU8qrMOcBf3Y54w= X-MS-TrafficTypeDiagnostic: SN2PR07MB2525: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 20:l/i8B6+Fqqd/VP3jJGldgv3PsZXFZmOhNPFuvhrfTsSnLKN+B9uv12UuPCcRdccX3wGuQ+gbl2rtj9PPLuzEKt8ZLz3Gp/ZQ1hQSxoIljvroxuzFIjhxEE0J5okdIyx3iZPoQLjwIzOKTrra3CFG8GrBXilDBMcGnKBMmENBCoFyx4Ks9Sx+q0w0XAMjuMvIeNdPxMTzNDvjHNnXr4rhZGJi59Rqi/I08toakM1gnQYftQVRwPS4RessFRWNyB00JbtV6FzBEoO42PBk59qj+ijeVfXqt2wdbpg0xGynmfyHpFCc/Hn2pfyFIm4pq4eE1IBxD0hm3/9OPAk/Is7X1OuW4LmTBUWKDw8ILK+23kj5imJLewb80zcL0XLnLqMmY/gGhR81jwGMCRIf+TOm5f7mg9WVdc0j4nMuYEKEHlLDaaCh4PACM8wr/MYySzpX0ogik3I3fbAl3np9scE2gg9r1zP84ic7l7d11wMDNXqqxwOKj3c7b4AD3lfiT0e+ZBB1UBH4Lqvkthsv5NGYY0iQY7QhbWJuou18wRY51LV57RSocrchtTxS/q39ExXs+0/VrZ4p3fJPphsqJtqgImFd3VBP0pHyWessOlSBPzQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(10201501046)(3231023)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123558100)(20161123555025)(20161123562025)(6072148)(201708071742011); SRVR:SN2PR07MB2525; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:SN2PR07MB2525; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 4:ifTwv+ae+du7l+76ExEOCplyoVgvHOQ4ops9JCNWy+REJd61IhLT6q/KDO6HC3HC2LFJ4RjmLMsjU9KsVVi1y1fyr+74FRQHtz3K64T3vLOYiEno572FotYY4pwbJNttxXuNjs64leEM3uQU8iQRAzKUe4nU7dkSrpB8ms8vzogZ+BE85mdkSzh+j5+W7ttMu2V4OkeV4nRykRgBI1Hv2eaTPSPASnSeii7q4h6WMRdWO99zbMIE8qlPXnl7LVZrveJ5r5h68pXf6UFChnqqupop+aT2em8yXMx64NWsfC+5EVYw1CJAK41gsBsc92Bydxg7GP0colEkIVKXscwFhc6oakiQ5Q2UEqlnxOYwNO8= X-Forefront-PRVS: 05214FD68E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(396003)(39850400004)(366004)(376002)(199004)(189003)(13464003)(3846002)(6246003)(81156014)(50466002)(2950100002)(23726003)(72206003)(81166006)(33656002)(5660300001)(106356001)(6666003)(6916009)(25786009)(52116002)(305945005)(7736002)(83506002)(53376002)(8656006)(42882006)(229853002)(6496006)(8936002)(53936002)(6116002)(47776003)(9686003)(58126008)(478600001)(33716001)(105586002)(4326008)(68736007)(316002)(6306002)(16586007)(76176011)(97736004)(1076002)(33896004)(59450400001)(107886003)(54906003)(55016002)(66066001)(2906002)(8676002)(16526018)(386003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2525; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR07MB2525; 23:hl9rc/7SjQXw7YUmSBK//JsIfuog+pIm2wA3DcaHY?= =?us-ascii?Q?IUaWfLVq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W2KGi98rrfitdbo9xCb5Zo9fgss9+OAyPucqQz248buy0A=; 24:no2LEDRs3IVq6rSe5F7nvcqb07SeHZL3DtBYaA5O9ToIvVFXJXiJB9GyXNiUfVu5IgvBDRUl58t1mQwr619PQWqDEIqQDrg0qxZuQuXzIYQ=; 7:JA2MxCCHBUaiqLU8vqMNZW69iCRP5Cn53/9mgJYc5OlaWvRC3BhRKJCEBgdiKVzp2h6uZphVYv762Z1AafOnm+FjGWBupJgQ3jNaqEN81Q5RSmrLZ0S89ODH1NUWnraVM59wfogUV9v8QC2HBRYxkFv8ik8SDHA2FWAbrY/7m2v+PAb3i9Z/9hgTItzS3MRrsn37e0wH6r48CxqrPv9fYpT5a0wkbMCBm1vvxavXOF2WV+SgCmcb580NYUIGOkAg SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2017 02:49:25.9209 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: addaa982-5220-4e24-7d9c-08d5429d4bf1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2525 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: Thu, 14 Dec 2017 02:49:32 -0000 -----Original Message----- > Date: Wed, 13 Dec 2017 23:35:48 +0000 > From: "Eads, Gage" > To: Jerin Jacob , "Gujjar, Abhinandan 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 = 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_ADAPTER_TYPE_OP_FWD or something like that. > > So I think it makes sense to specify the op once at adapter configuration time, rather than repeatedly in the datapath. This allows for a cleaner separation of configuration and datapath code, and specifying it just once means fewer chances to accidentally set the wrong op value. > > Thanks, > Gage