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 CCC31A04E1; Tue, 22 Sep 2020 10:09:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 00DCB1D584; Tue, 22 Sep 2020 10:09:06 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 05EA81C226 for ; Tue, 22 Sep 2020 10:09:03 +0200 (CEST) IronPort-SDR: 8eEEcK27mJRMpVf3vXSgZY1W7DAz34MjRrqpBOaJ4N70P1KVE8ingyTw3skw7b74gr5sqvvGTc 9MmgZuQG1O+g== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="148308697" X-IronPort-AV: E=Sophos;i="5.77,289,1596524400"; d="scan'208";a="148308697" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 01:09:02 -0700 IronPort-SDR: q/S749l1lUDOhTkGQs7wG/C1FMuaJvDAKWSgUq5C3MkruHogWQB2N+R68CbehVm+H+FzeN+GKn 1ogNICUXrtaA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,289,1596524400"; d="scan'208";a="290312534" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga007.fm.intel.com with ESMTP; 22 Sep 2020 01:09:02 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 22 Sep 2020 01:09:02 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 22 Sep 2020 01:09:02 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (104.47.37.58) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 22 Sep 2020 01:09:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QurOoAKcA1feqUICAStomru0/gri50YDHb+dVF3DRJ8x87SmLZ9+dI8NYT0wAKC4WVdYCa2/qtIb8zpGbQo2I7AzxKiE8XZLQ0+b/+Ocg+7DvGq1T+RmrjmhRfL/GJpic4YXK6QaXy1CdJECRhTau0AlttcoGkipCfTlCgnUALVnRVxtFDjCFZbmkOa00RY1waoIMFGvMJMD5ZjSSYxR6wR7b7zY8Hx6NRevSIjFa94PeuZ3R2NGSWuYoedfq6jogXhxCwhnh5UQV/i06MBwJH3yN4JPRxaPbijjUkzqolu5wkpDcJdzDcLv4c8Za6cJXoliWzWgk8cfxxJBHidecw== 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=joUB2mCK8b4/mkhglETBLZ6zUSbLTKCEnmZ37ONgT0Y=; b=POrCXez1EVJIZOgz1H8f/1kph3Y2DMynGuyXCMJ3jCfclDsnF62VMpyATjdPBcmOlMpJelbmXwR+CcqSmyqYOUG0zhsel26jBW3XLG+TKTKFrEiZxv92NZQxls9sBgiNerMwnD0TWQBhNRz1nGoBSLHzajEl/7JCl4/OAn2qYBNOmVXbFqArYKVTXiu/zBQT8Pdu2KxUInxWCa+lF4ARf+XeUOD22ECbPW3OB3f2q/kIBfUT+xXKrOWIAbyQ9iRTQ4AHiTniveqiMyWgKqVF8pm1VdzLUv9nf/AIQUUxmAUfz7RAvfD1GNxh6a2J/3W+eWHgjaJ7MgTtbRlTGqOfcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=joUB2mCK8b4/mkhglETBLZ6zUSbLTKCEnmZ37ONgT0Y=; b=BU83uyj2i/soAfZrqbZS7Nmq9WTWCNMTW2/SGLaSGHOMPnhuw6HzbLnDU6nhUna+qjSdaLqtw1xcw1uiaUt63i34mC4cFkW5An0HyJBihIDfv2qS3VTBGJA5BnDOgwoyH49CkrliWA1GUIeHChYDK1/2X9lDb9onuCIrHFsQmkE= Received: from BL0PR11MB3043.namprd11.prod.outlook.com (2603:10b6:208:33::19) by MN2PR11MB4599.namprd11.prod.outlook.com (2603:10b6:208:26d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.11; Tue, 22 Sep 2020 08:08:55 +0000 Received: from BL0PR11MB3043.namprd11.prod.outlook.com ([fe80::11fa:a7fe:329d:9239]) by BL0PR11MB3043.namprd11.prod.outlook.com ([fe80::11fa:a7fe:329d:9239%5]) with mapi id 15.20.3391.024; Tue, 22 Sep 2020 08:08:55 +0000 From: "Zhang, Roy Fan" To: Akhil Goyal , "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: AQHWhbwaRQXVNw2ngE+5SqoPhUuyBqlu/9oAgAP1tgCAABxYAIAAPMewgAADYYCAARAtAA== Date: Tue, 22 Sep 2020 08:08:55 +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: zh-Hans-HK, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [95.44.220.85] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e9f4c7c8-1a78-4c59-ea98-08d85ecec03d x-ms-traffictypediagnostic: MN2PR11MB4599: x-ms-exchange-transport-forked: True 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: zl4XjvhDlzAaAhYVjPErPx/2hNmVKhILOHzhCYqu9BHpcnn5hZMo/3rEZyrExu18+9j55y76B8sGbu0XBSNn04+nXkswfV0hfUTggtTYYzAPRyDXNCkZEy31bgrNTzNUOD3vkCMZSSwp5xFLsH6l/np3/Zq7atOJE07qHDKKImvm2zpexIzuLa+pW+Py3vq8O1mJVhk6E1APsOqe5ohFsBWnFtvFcwnkswMbMHq/x+GCAMRySMjAm/8z0M7MhJ1Nr28yS7gClMCfX4Zpsu1FsYN47Vvl/GDkj6bolQM8kskcpuKNJiSWXfZegFwz4U0vduBeyafAgI7ow29IYtv5wQCYdtCMX011Jza5ACJ6Reta/RCcrJJ/fury6737sI5w x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3043.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(376002)(346002)(39860400002)(396003)(136003)(316002)(54906003)(66946007)(110136005)(5660300002)(52536014)(86362001)(55016002)(7696005)(8676002)(4326008)(66556008)(66476007)(64756008)(71200400001)(66446008)(76116006)(26005)(53546011)(478600001)(33656002)(9686003)(83380400001)(6506007)(2906002)(186003)(8936002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: twKCmIa7rNZED4M31cpXJiibWDeC9XWdWW+KU8SLSyiAx6zN3zdEUPi5zTYEP+T+P8ErlyGl3fjJLM4XF4eMVPBOx0j+Yls2UfXqD/417TJoW9MOdZp/wSW/8GOll/4yOOyiSes7RsJBBE7LvfACkIwfIqxbOVWrJoBBD1dhwgXAhOP+qzkQ45EUEeJST/uEpxgx5+ktkrJvJ/qh/aPLUJnrVC1eJ031Dm58x2h3h3gjDvNwxULKBO7pRAf95zDKGgws7eysiAL2DH97qwWm+tWX7DMQBWwn3nrQ7rnctuVFRF3nnjJnYnZwVUWYMMbiGmz1uoeH3rPLwE8ULEtyuyKXRXYANY1/NYMXF8Rb0bVNDjzSTLaKNnBGxovQVZmWjN/n/t38nOPQe89Q2VHwYBNA1AGyT0g3RlOgHogRl5tf2pOpvvjqWV8vd2pYWGmwvU/4x8CFqUCwFhVaDPJ+y1clOwegh4vjvzFEOGTBhBr5Gu1HGTddigS1UwnsjURRjCJC6ksTgI240b9A2DHIp/PhspC7EmVzEnDZMHZY4ta6UVPBXvPKnXgHGIZ8LPqiLW5oemU7PIUSjewrL+AwlVQ6Uv2TrbgZQWNfuMzyBZieBW6pgyFInUSBBKR1Zer2/ez9ptpp3WN93w118bykGg== Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL0PR11MB3043.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e9f4c7c8-1a78-4c59-ea98-08d85ecec03d X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2020 08:08:55.2503 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: sJdJ45TFLAxQ4vp8Bb79vyoj4eIquVeE7vyNoVCQ2VR7wmECebVnJZUwFRz4tYK2wbpK0mX9HEWsSrYiw9sRgQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4599 X-OriginatorOrg: intel.com 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 Akhil, > -----Original Message----- > From: Akhil Goyal > Sent: Monday, September 21, 2020 4:49 PM > To: Zhang, Roy Fan ; dev@dpdk.org; Ananyev, > Konstantin ; Thomas Monjalon > > Cc: Trahe, Fiona ; Kusztal, ArkadiuszX > ; Dybkowski, AdamX > ; Bronowski, PiotrX > ; Anoob Joseph > Subject: RE: [dpdk-dev v9 1/4] cryptodev: add crypto data-path service AP= Is >=20 > Hi Fan, > > Hi AKhil > > > > ... > > > 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; > > > }; > > > > > > > > > > The above structure cannot support the array of multiple jobs but a sin= gle > job. >=20 > So was your previous structure. Was it not tested before? Of course it was tested in both DPDK and VPP. The previous structure is an = array to the union additional_data " union rte_crypto_sym_additional_data *additional_data;". That's why the u= nion was declared in the first place. I am ok with the way you propose with "*" in the beginning of every member. >=20 > > So we have to use something like > > > > struct { > > void **cipher_iv_ptr; >=20 > You can even drop _ptr from the name of each of them. >=20 > > rtei_iova_t *cipher_iv_iova; > > ... > > } hw_chain; > > struct { > > void **iv_ptr; > > rte_iova_t *iv_iova; > > ... > > } hw_aead; > > > > Is it ok? > > > > Regards, > > Fan Regards, Fan