From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id B852CA2EDB
	for <public@inbox.dpdk.org>; Fri,  6 Sep 2019 11:01:09 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 840A47CBC;
	Fri,  6 Sep 2019 11:01:09 +0200 (CEST)
Received: from EUR01-DB5-obe.outbound.protection.outlook.com
 (mail-eopbgr150073.outbound.protection.outlook.com [40.107.15.73])
 by dpdk.org (Postfix) with ESMTP id 90AD43256
 for <dev@dpdk.org>; Fri,  6 Sep 2019 11:01:07 +0200 (CEST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=k3EjbR1SQmaRvaOpgHg8d3IfM8X2Bys5CynDX0IufKXDIyu6A64nn7WuEqiNc+KhzlIZEG5lkt4xpMKd7rgdqAlIZLbOZIvDJ8w3W0JGzJfYA4abYsj/8s5W0aqAdO53iOPz9gFBKArcK/AlrpyFvuTnl7S87KlN6lwIokyVpP7AdxuQ6mgVi3w5om06bqTptngXvAKEknk16bMC2qUFHbvnwL6sW+BRnVyoAtsNrEE+UFd4cQrzs1Rl4OVWC1dzQnI6JYWE7Fu48OZODUExCoeG+wKj+S5F6MR7EFH6DsEyvTMqaf689URoEz8cQCiHr1bn5L4zxOzJ6on55VwRVA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=7GplFAbxoxavVTqFROlpDFFRRM5jooJIe8Znb2dbWl4=;
 b=mCqnbcYsyxMD1fn6Nw7FdhrzqO6BegYd1oeCeE1N5Xagcz1l4s8Y+v6vt4lmlmwifR/eCcxmv9LBUwhzrRjdImb3VgBvFWoIt+Ye2fyxdCZwnkApSSD8HyiyE+WRDvMVvCTd9COP0+w9fMhKpijpNx66RoKpelPSPMGchhd9wgztFeYVDKOCh6GxYWNYVM57K8zAQovZWyiKqPGZhvBFDe3ZQ4WfcflD316zzARS0feBwMZ6hczzTqprxNPDB0qR4/hnt/jPpCId9toNF5EigHWXSzz/PrxYTH1+6X4H1ql+F24l7xDyVutFS8jwg3c3K87OXNHnqPcirWoSH76HQw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass
 header.d=nxp.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; 
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=7GplFAbxoxavVTqFROlpDFFRRM5jooJIe8Znb2dbWl4=;
 b=P6sJXN+Ut5jfjsqgMbPnD+KR6TqsTrnYtuXvJLzacVqjfX5S7uCWGvobfxVp18iU+N1viNy4quJKu4u1YF4kag8rT/AlDsAydg0ZN3uw4TjuCCEjFYCT2bSTHVdFF1JENx2UpnBML8JsOOLITd+iHi6uzDlqWJXdcxeauzjg8XE=
Received: from VE1PR04MB6639.eurprd04.prod.outlook.com (20.179.235.82) by
 VE1PR04MB6672.eurprd04.prod.outlook.com (20.179.235.145) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.2220.18; Fri, 6 Sep 2019 09:01:06 +0000
Received: from VE1PR04MB6639.eurprd04.prod.outlook.com
 ([fe80::7092:d719:df0b:2b70]) by VE1PR04MB6639.eurprd04.prod.outlook.com
 ([fe80::7092:d719:df0b:2b70%7]) with mapi id 15.20.2220.024; Fri, 6 Sep 2019
 09:01:06 +0000
From: Akhil Goyal <akhil.goyal@nxp.com>
To: "Zhang, Roy Fan" <roy.fan.zhang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
CC: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>, "Doherty, Declan"
 <declan.doherty@intel.com>, "De Lara Guarch, Pablo"
 <pablo.de.lara.guarch@intel.com>
Thread-Topic: [RFC PATCH 1/9] security: introduce CPU Crypto action type and
 API
Thread-Index: AQHVYm4LqyJkewM9NkuUWAfAmrqx1acbUiZggAAsN4CAAtsIgA==
Date: Fri, 6 Sep 2019 09:01:06 +0000
Message-ID: <VE1PR04MB663938E4E1740B6E5D6221F4E6BA0@VE1PR04MB6639.eurprd04.prod.outlook.com>
References: <20190903154046.55992-1-roy.fan.zhang@intel.com>
 <20190903154046.55992-2-roy.fan.zhang@intel.com>
 <VE1PR04MB66398649D10623899D0F77E1E6B80@VE1PR04MB6639.eurprd04.prod.outlook.com>
 <9F7182E3F746AB4EA17801C148F3C6043369D686@IRSMSX101.ger.corp.intel.com>
In-Reply-To: <9F7182E3F746AB4EA17801C148F3C6043369D686@IRSMSX101.ger.corp.intel.com>
Accept-Language: en-IN, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: spf=none (sender IP is )
 smtp.mailfrom=akhil.goyal@nxp.com; 
x-originating-ip: [171.61.161.31]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 1c49f158-2cf3-44bf-0126-08d732a8c0e5
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0;
 RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);
 SRVR:VE1PR04MB6672; 
x-ms-traffictypediagnostic: VE1PR04MB6672:
x-microsoft-antispam-prvs: <VE1PR04MB66725DFEB6B6EC39C275DAB6E6BA0@VE1PR04MB6672.eurprd04.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8882;
x-forefront-prvs: 0152EBA40F
x-forefront-antispam-report: SFV:NSPM;
 SFS:(10009020)(4636009)(136003)(39860400002)(396003)(366004)(346002)(376002)(13464003)(189003)(199004)(2501003)(6506007)(478600001)(102836004)(44832011)(7696005)(53546011)(71190400001)(6436002)(76176011)(71200400001)(55016002)(33656002)(6116002)(14454004)(2906002)(3846002)(5660300002)(476003)(486006)(446003)(11346002)(14444005)(186003)(256004)(66556008)(26005)(8676002)(76116006)(54906003)(66446008)(66476007)(64756008)(86362001)(52536014)(110136005)(66946007)(81166006)(229853002)(81156014)(25786009)(15650500001)(99286004)(8936002)(316002)(66066001)(6246003)(9686003)(53936002)(74316002)(305945005)(4326008)(7736002);
 DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR04MB6672;
 H:VE1PR04MB6639.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en;
 PTR:InfoNoRecords; MX:1; A:1; 
received-spf: None (protection.outlook.com: nxp.com does not designate
 permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: A/CSkvmp0aTFkxg9ovTip3bZVSXc1siyuaHte4R3eVnBHSDYoCvaBkcM7YGaxNKqjty2Muq6N7xhsqiDWqetw71Q0NOG/vrlQIf8LLuwm3hmS6k+hIMus4FzK/ykJ8bPgdRV/gZoLTemrjukGdmm0kvK0xQUYQc9PdPrhCXlCvUioYsj1awjpnSwCatPgZqKPYc5VRMtcOOFgvp6+EVA02sLihHH54DREd9WX7v4O6893HgZVaLppZJRvwUxK2BCw5guf99FGyQIoYFQu7gQsxgXBGM2UlE9lQAJd+2WTYbr/DJmwrcAowlcO9eMh+gdyo0/l7cvmycVVHOG1K2XpDhMbP6ZW+WRWAa7z28cgWOLyjcstJFF/8J6mf41XNdOpY/OHq0PZ++lH56go7fgqeNKEsQyvYHHELlwg7ot0Go=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: nxp.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 1c49f158-2cf3-44bf-0126-08d732a8c0e5
X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Sep 2019 09:01:06.7283 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 4sM3v26ih+m3bWJGk5EX+JheS9N1ybJfTFkAMRPMTSHxik22ZSmAIC87PUCwmejiXkv93HIS0nyM3KI9URnB1A==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6672
Subject: Re: [dpdk-dev] [RFC PATCH 1/9] security: introduce CPU Crypto
 action type and API
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>


Hi Fan,
>=20
> Hi Akhil,
>=20
> This action type allows the burst of symmetric crypto workload using the =
same
> algorithm, key, and direction being processed by CPU cycles synchronously=
.
> This flexible action type does not require external hardware involvement,
> having the crypto workload processed synchronously, and is more performan=
t
> than Cryptodev SW PMD due to the saved cycles on removed "async mode
> simulation" as well as 3 cacheline access of the crypto ops.

Does that mean application will not call the cryptodev_enqueue_burst and co=
rresponding dequeue burst.
It would be a new API something like process_packets and it will have the c=
rypto processed packets while returning from the API?

I still do not understand why we cannot do with the conventional crypto lib=
 only.
As far as I can understand, you are not doing any protocol processing or an=
y value add
To the crypto processing. IMO, you just need a synchronous crypto processin=
g API which
Can be defined in cryptodev, you don't need to re-create a crypto session i=
n the name of
Security session in the driver just to do a synchronous processing.

>=20
> AESNI-GCM and AESNI-MB PMDs are updated with this support. There is a sma=
ll
> performance test app under app/test/security_aesni_gcm(mb)_perftest to
> prove.
>=20
> For the new API
> The packet is sent to the crypto device for symmetric crypto
> processing. The device will encrypt or decrypt the buffer based on the se=
ssion
> data specified and preprocessed in the security session. Different
> than the inline or lookaside modes, when the function exits, the user wil=
l
> expect the buffers are either processed successfully, or having the error=
 number
> assigned to the appropriate index of the status array.
>=20
> Will update the program's guide in the v1 patch.
>=20
> Regards,
> Fan
>=20
> > -----Original Message-----
> > From: Akhil Goyal [mailto:akhil.goyal@nxp.com]
> > Sent: Wednesday, September 4, 2019 11:33 AM
> > To: Zhang, Roy Fan <roy.fan.zhang@intel.com>; dev@dpdk.org
> > Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Doherty, Declan
> > <declan.doherty@intel.com>; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>
> > Subject: RE: [RFC PATCH 1/9] security: introduce CPU Crypto action type=
 and
> > API
> >
> > Hi Fan,
> >
> > >
> > > This patch introduce new RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO
> > action
> > > type to security library. The type represents performing crypto
> > > operation with CPU cycles. The patch also includes a new API to
> > > process crypto operations in bulk and the function pointers for PMDs.
> > >
> > I am not able to get the flow of execution for this action type. Could =
you
> > please elaborate the flow in the documentation. If not in documentation
> > right now, then please elaborate the flow in cover letter.
> > Also I see that there are new APIs for processing crypto operations in =
bulk.
> > What does that mean. How are they different from the existing APIs whic=
h
> > are also handling bulk crypto ops depending on the budget.
> >
> >
> > -Akhil