From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4B7D4A04E1; Tue, 22 Sep 2020 11:05:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9650B1DCC2; Tue, 22 Sep 2020 11:05:37 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2077.outbound.protection.outlook.com [40.107.22.77]) by dpdk.org (Postfix) with ESMTP id B1D231DCB9 for ; Tue, 22 Sep 2020 11:05:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T8NR80kvH1yqRPfPi0ns3ikfhdlBQ8sLbz1BbCx+KKoTB6ZhuE87lIwgtOIxkdUj/iHyuqNE6VjfmmQMPgXz28wgBUKuYGtxUXrGosINaf7GpQS34kMksq0XYfFSNTrIUwcPHJ0CWgA87xbzFrJuQRGqZYDw93maUisSAzeP+ED1qRjKbpp5ldQ4C2gbBMzIAHA7rZCBX7X0+g68nudpxqo9zNBlnhPMOjoEb+QNBN+iTs87ceE+ANI8gRZWtkrRyiutP+b1f7b/pa9qAAW4WWBQRvHWaJFIRznx9jNFfm+SjXALdIxi1PGAhXaLQD/ck3KM93fGSN52JltCZT+95w== 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=XJ7jrqMYQhfib9toAetLtRGY7TrNhi8NI3zdNZvsl+k=; b=F5JjRaUkv4D3IJxgn19RNvhYJ1kvTddv/rJqKrlFfOeQfxZHRZeUNnzSU/Zc2v9Eq4whZCNaWRIkXOmTQx+BTibnL9nsklZZA2Ffufe9WioVaI9/isuAnD2x8+/tjf4VnvHhWyhI64zab52D6LWxYofURhunQgJeyBR3ZWDGgxmOLtQJ/njYzVYrZbsshdLHaSNtGV0NQXnXEKzB4Oo3vY3TYxVQ0P4oKWVr2tYRds5D9z7el9oPpX35aBGn9/XYb8XVFgOcIDfj2Ly3yfwClhq9uDWgHkYMY+8DA7MFJvujrj3oOgxvuy1RZHu1Gwus95UIBPiFg0B8haAmLgelDQ== 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=XJ7jrqMYQhfib9toAetLtRGY7TrNhi8NI3zdNZvsl+k=; b=JURVaIHTvUKVFcTLzsfxFfZD5u44HoRBF3OX6Rtvg4j9wddImilsJwoRcpTS9GyI7awu+vRAlU6Gfz3vgNRyGaSHgzEQ0R/4mlTRHEt1XZhgi3xhj283uEtt/1FKF2XxdBSZp5vEdv/Zd3uR0e0A08BvLzv0WKTQi3dH7oZLXt0= Received: from VI1PR04MB3168.eurprd04.prod.outlook.com (2603:10a6:802:6::10) by VI1PR0402MB2718.eurprd04.prod.outlook.com (2603:10a6:800:b2::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.14; Tue, 22 Sep 2020 09:05:35 +0000 Received: from VI1PR04MB3168.eurprd04.prod.outlook.com ([fe80::9513:3b55:931f:216e]) by VI1PR04MB3168.eurprd04.prod.outlook.com ([fe80::9513:3b55:931f:216e%4]) with mapi id 15.20.3391.026; Tue, 22 Sep 2020 09:05:35 +0000 From: Akhil Goyal To: "Ananyev, Konstantin" , "Zhang, Roy Fan" , "dev@dpdk.org" , Thomas Monjalon CC: "Trahe, Fiona" , "Kusztal, ArkadiuszX" , "Dybkowski, AdamX" , "Bronowski, PiotrX" , Anoob Joseph Thread-Topic: [dpdk-dev v9 1/4] cryptodev: add crypto data-path service APIs Thread-Index: AQHWhbwSwlDH+pOJNkGpff/lHViImKlu7BjQgAQPvYCAAAr4EIAASSIAgAAA7CCAARZzAIAAB5kAgAAB7SA= Date: Tue, 22 Sep 2020 09:05:35 +0000 Message-ID: References: <20200904152539.20608-1-roy.fan.zhang@intel.com> <20200908084253.81022-1-roy.fan.zhang@intel.com> <20200908084253.81022-2-roy.fan.zhang@intel.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nxp.com; x-originating-ip: [122.162.67.38] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 9f05457f-f95c-4580-34af-08d85ed6aafd x-ms-traffictypediagnostic: VI1PR0402MB2718: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: VEnE9JnQylBDuzAFnqyntEVnhxUEcGlqJLOZgx8RfZw94mqebmG2oYqewuWV4VhsAs6eBn404tWK6s+iPb/UjoVGgGB6zENj0o7sALJJxUJkLqtjEOk0jU/VyulFb5Ig3q1G+FcEH5O9uEglNSMI/4Y2FnBqHCfyug9phkyMekne4dpFu+1sSf/RVbabWuJcFmUBowwWl/OW2aGdHd/tNQaoStffk3QO266O1wlsmVyKBXTCOLTyIIYbcqz0IcF8eAGISdTRkOPfRmozIDXxKXdXWCOAc8jPJyO++ZG+Qpsfe2EN6iB6ed4LfvfJhWq7 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB3168.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(396003)(366004)(39860400002)(136003)(55016002)(26005)(316002)(7696005)(83380400001)(9686003)(8936002)(66476007)(86362001)(6506007)(66556008)(478600001)(64756008)(52536014)(66946007)(8676002)(66446008)(186003)(110136005)(33656002)(54906003)(4326008)(2906002)(76116006)(5660300002)(71200400001)(44832011); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: JV1sThWc/XOmQS7bBszwiNTpzjGL+ZSUJrAdvFEGlHNxRGJsuab0nTF6LhDbnmiVcuMUChWGcOdJuH1wY+LVJkZvmHuWd9vyHCWCpX1X9iqJ1ocOrBBtVDauVeV6Wc2/VXW/Ba6wdI3mfdoEKuuQp6eJ/xTKqMiUPgAEZuHUu2CM4PtrJ6xu/QBeeUvw7DMS0GdN7lK9p8JA2Rtvg/KsDsbIO8HTsdOb+ifheUkSamF9uqxU0LpyN5lVsw6VSuDWrWRcdnRe8GVP1nrKQB/52lffbItdkcizJVUDwrJDl2AU+9i92pd4rjJR6YRH7/5glJsEniYLv58JqT+i+fy5Xm/zRe24i/D1FMDglu7xRt2AFefTW7Kvd7amZs0LI5Y65KvngWE0mjtXn2L2WKs6NdUJUij7pKvVWGo5QrGx9dnIylSYISyPD7XQSOqHZZkKH1Mz7MNi1ePqUkhdvZixlITNcsJO5B7EiX3vLxUMZKbpMITU6EMOmIzpLYtvN0oJZFQcHzPzSGqvrLOOYKGPFT2ST4MrRVeeo/dm8QQ99x1+tbvZ3lBRQamuHYX8umwqILZxvDvt59ija0OYiBKlLY2/8/4uqIvZ738ejDA7tHW5CEy+F0fJDCdxVg3pF3WfsvSfH96qf+RlU+nU8wChbA== 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-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB3168.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9f05457f-f95c-4580-34af-08d85ed6aafd X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2020 09:05:35.6798 (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: N4yB/m5IYImNKNLEPTMX0p+GIxKG4ArLToI23kENuGuI+RRjTJSTqWyLgqNuDV9j7i4lPtmNx7e0sZYK+Q9VEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB2718 Subject: Re: [dpdk-dev] [dpdk-dev v9 1/4] cryptodev: add crypto data-path service APIs 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Konstantin, > Hi lads, >=20 > > > > Hi Akhil, > > > > Thanks again for the review! > > To summarize, the following places to be changed for v10. > > > > 1. Documentation update and reviewed internally in Intel first. > > 2. Add the missing comments to the structure. > > 3. Change the name "dp_service" to "raw_dp" to all APIs and documentati= on. > > 4. Change the structure > > struct rte_crypto_sym_vec { > > /** array of SGL vectors */ > > struct rte_crypto_sgl *sgl; > > > > union { > > /** Supposed to be used with CPU crypto API call. */ > > struct { > > /** array of pointers to IV */ > > void **iv; > > /** array of pointers to AAD */ > > void **aad; > > /** array of pointers to digest */ > > void **digest; > > } cpu_crypto; > > /** Supposed to be used with HW raw crypto API call. */ > > struct { > > /** array of pointers to cipher IV */ > > void **cipher_iv_ptr; > > /** array of IOVA addresses to cipher IV */ > > rte_iova_t *cipher_iv_iova; > > /** array of pointers to auth IV */ > > void **auth_iv_ptr; > > /** array of IOVA addresses to auth IV */ > > rte_iova_t *auth_iv_iova; > > /** array of pointers to digest */ > > void **digest_ptr; > > /** array of IOVA addresses to digest */ > > rte_iova_t *digest_iova; > > } hw_chain; > > /** Supposed to be used with HW raw crypto API call. */ > > struct { > > /** array of pointers to AEAD IV */ > > void **iv_ptr; > > /** array of IOVA addresses to AEAD IV */ > > rte_iova_t *iv_iova; > > /** array of pointers to AAD */ > > void **aad_ptr; > > /** array of IOVA addresses to AAD */ > > rte_iova_t *aad_iova; > > /** array of pointers to digest */ > > void **digest_ptr; > > /** array of IOVA addresses to digest */ > > rte_iova_t *digest_iova; > > } hw_aead; > > }; > > > > /** > > * array of statuses for each operation: > > * - 0 on success > > * - errno on error > > */ > > int32_t *status; > > /** number of operations to perform */ > > uint32_t num; > > }; >=20 >=20 > As I understand you just need to add pointers to iova[] for iv, aad and d= igest, > correct? > If so, why not simply: >=20 > struct rte_va_iova_ptr { > void *va; > rte_iova_t *iova; > }; >=20 > struct rte_crypto_sym_vec { > /** array of SGL vectors */ > struct rte_crypto_sgl *sgl; > /** array of pointers to IV */ > struct rte_va_iova_ptr iv; > /** array of pointers to AAD */ > struct rte_va_iova_ptr aad; > /** array of pointers to digest */ > struct rte_va_iova_ptr digest; > /** > * array of statuses for each operation: > * - 0 on success > * - errno on error > */ > int32_t *status; > /** number of operations to perform */ > uint32_t num; > }; >=20 > BTW, it would be both ABI and API breakage, > though all functions using this struct are marked as experimental, > plus it is an LTS release, so it seems to be ok. > Though I think it needs to be flagged in RN. This is a good suggestion. This will make some changes in the cpu-crypto su= pport as well And should be a separate patch. We can take the API and ABI breakage in this release. That is not an issue. >=20 > Another option obviously - introduce completely new structure for it > and leave existing one unaffected. >=20 This will create some duplicate code. Would not prefer that. > > > > 5. Remove enum rte_crypto_dp_service, let the PMDs using the session pr= ivate > data to decide function handler. > > 6. Remove is_update parameter. > > > > The main point that is uncertain is the existance of "submit_single". > > I am ok to remove "submit_single" function. In VPP we can use > rte_cryptodev_dp_sym_submit_vec() with vec.num=3D1 each time to avoid > > double looping. > > But we have to put the rte_cryptodev_dp_sym_submit_vec() as an inline > function - this will cause the API not traced in version map. > > > > Any ideas? > > > > Regards, > > Fan > >