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 41869A04D6; Mon, 21 Sep 2020 17:49:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4B69C1D910; Mon, 21 Sep 2020 17:49:22 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80083.outbound.protection.outlook.com [40.107.8.83]) by dpdk.org (Postfix) with ESMTP id A84451D906 for ; Mon, 21 Sep 2020 17:49:20 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ckrncIOVVp/8bUJIpRznG9ohFRaijVjLdQg4WCBft9NfN5gTWAhcA0bsWdEOmn4grGBrcR7bACSVOeXmwOD/mH71FwjBG5u4zMpRSRih0fTyF6PNw1bJVvLMm3+Ms7N9zfR37RH5I5IIlSuloJ0sXRD9bBMYlasMvsgtvNva7aT2C3e1/WYCy7V0zIC9KUamJJghlODAaUGOXsj4zJwpEP4JCHBhHHnJhhN//n1as2qywrr2m6auLKl+YEr2uBp1bQNMn3AqMiNIs8JhLFoDXSxK2uTHg+t8dZ3USu/Qz0+d6ybEqbdgwXf5igEaPAQnwNLlXa7CzPmqBI7PHkMB/A== 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=TBRteKLJJ9RJroTx4Xf/5pVNX/wZX59ZxrpLfpI6XuI=; b=Airz7mVRSkcg7g3RtVYM4cD6ig4K/KOSH0llAE3rLUOvYvqfMxJH35Jp4pK5d/4Sq9a51uYb9icNXdwb/wCbDiecsAB+e4slVqBzweHqvWGUi5C3zPJEiEblnyqwr4UGS+skIRe+2osXkMBHSSU0RX1rEvrOF48GY4SuYmlpezlDQQZ5/bcue4v493TODEoiuQxMU7ezjqxg5oJTJMLuszlJB/nHHiPQA1nsq32RDfr4b51AkPVXLj20yoJgGL4Dpa5S83ClkMEZMg3eFbGsJLl/wpyw8g3ECIE9CV5OclE0Otp21XSq8JcH1gom8dS4V6FcztvuvpU8C97KYbWRog== 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=TBRteKLJJ9RJroTx4Xf/5pVNX/wZX59ZxrpLfpI6XuI=; b=nXi77T9bdz+rneTmt/Jtz7bm4ghX0iQSHhqTEysMdno/uBfJnITJPX3gICKaGB5wMwaaWIzrEnCWQmcFVYi0j4CxdE4BQ/OUh1m5YQ5c7X4vsVIY/ELopYZe25+03k6HHv85ktN0jh0SAflgWDw5sMQTlO/uxPlGOVWgADUP/7Y= Received: from VI1PR04MB3168.eurprd04.prod.outlook.com (2603:10a6:802:6::10) by VI1PR04MB4333.eurprd04.prod.outlook.com (2603:10a6:803:49::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15; Mon, 21 Sep 2020 15:49:19 +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; Mon, 21 Sep 2020 15:49:19 +0000 From: Akhil Goyal To: "Zhang, Roy Fan" , "dev@dpdk.org" , "Ananyev, Konstantin" , 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/lHViImKlu7BjQgAQPvYCAAAr4EIAASSIAgAAA7CA= Date: Mon, 21 Sep 2020 15:49:19 +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: 68fea868-fb8f-42dd-4aee-08d85e45e717 x-ms-traffictypediagnostic: VI1PR04MB4333: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: AwuzXalaSD+Q+HH6SAK4QAQAqG9CPzIe7XXT9JOS5v16XliZDLeXEuxfo4MJbyFLZTMg2oVa7u3ZpvlTD83eiCO73uQzi74tnEWaI/zaMJuChJOv+G4AfItDi2686xtURU30gXbcBuSxJPXZAA4gQmAErzGCYI+NBwRO9/YyvYSYJamJiNkrkcwY/PnezRQbjwMk6iQbb/E+3toMRSa+ZrLxh0hzVHZZ7oYSO/74dVsrfjOKObnf1eDWZWgBNFrhSUpl6ZZENPYL4m4knZQ2Text5NGyyBcACuorSbSiUflV6fzZDD8vjF9GbsvWibXgmk1tMDUZNWSgJEie/D/y5A== 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)(39860400002)(366004)(396003)(376002)(346002)(136003)(6506007)(26005)(55016002)(8676002)(52536014)(316002)(66446008)(33656002)(186003)(76116006)(66946007)(64756008)(9686003)(86362001)(66556008)(66476007)(4326008)(2906002)(44832011)(478600001)(7696005)(8936002)(54906003)(110136005)(71200400001)(5660300002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: PKHdoJHlxI2VPIawx6xfM721HOL/XE9rVrrMTOZnABey5GeuG/B3QNDfQ26fMlitScdvm3Ri7rr9kN1Iuk/VymHuYnkXPzCqtSyKixyfexnh9kP5T78TIrRb50Q3eKWKrjfUBQqWr8Ae0OF2rx+Fzy35GJoSxoMzsI75uPNLDC5x9i33QnYbKU5rakFQqF4pD8zPDw2NvR2zH6CQnM1qr+EOBeX21FHNwLac5YIjlT8Aus4V3Bvq4dEWUzwHCCDx5A5nCaSN7wfaJtJ2Oqsh9mWB18k2W9RI3TL5c0yk7RW+qp/msBcd3O/TnvOCOUCHyvga8BDTQIphJOPGt+lONCefyWjKhFPt/ujmmYVOe8X5BCiNT7yANMzyJ4u7NT25EqP9sK/3gdCnKnWmls0qidDmqvs6B6y6zugepAhw+tf0R8BgmEp/bPdlPdjQ9w7KUnTsZn6lwQ8IdAA+nHOvVlIRhS9FGYnhk1T92jPKKCtn3LMtTE7OQnqarLOesaya7Rio4jqhzAmCzo625CQbFTdBqZJGDNAn/i7M5eg8ZQNBTr1+tU4F5r97oAKhkCJfdzfzsCL2lfdM4dlDeLiv1h4k/mhY08bdEXHyVVRxLxZt8LoClbbMYgjxFIW+lAG1D7Tvym1j9oCp8MNOCC1kFg== 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: 68fea868-fb8f-42dd-4aee-08d85e45e717 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Sep 2020 15:49:19.4053 (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: 1hJv8Psu4GtIgkgB2ZFIUnv/UdflkgGnfDzqET7KWT175Do7YUilI96lsOd5pAA+llIGSi7PggD7tpbiGaew9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4333 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 Fan, > Hi AKhil >=20 > ... > > IMO, the following union can clarify all doubts. > > @Ananyev, Konstantin: Any suggestions from your side? > > > > /** IV and aad information for various use cases. */ > > 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; < or any other useful name> > > /* Supposed to be used with HW raw crypto API call. */ > > struct { > > void *cipher_iv_ptr; > > rte_iova_t cipher_iv_iova; > > void *auth_iv_ptr; > > rte_iova_t auth_iv_iova; > > void *digest_ptr; > > rte_iova_t digest_iova; > > } hw_chain; > > /* Supposed to be used with HW raw crypto API call. */ > > struct { > > void *iv_ptr; > > rte_iova_t iv_iova; > > void *digest_ptr; > > rte_iova_t digest_iova; > > void *aad_ptr; > > rte_iova_t aad_iova; > > } hw_aead; > > }; > > > > >=20 > The above structure cannot support the array of multiple jobs but a singl= e job. So was your previous structure. Was it not tested before? > So we have to use something like >=20 > struct { > void **cipher_iv_ptr; You can even drop _ptr from the name of each of them. > rtei_iova_t *cipher_iv_iova; > ... > } hw_chain; > struct { > void **iv_ptr; > rte_iova_t *iv_iova; > ... > } hw_aead; >=20 > Is it ok? >=20 > Regards, > Fan