From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72F64C433E1 for ; Tue, 9 Jun 2020 13:50:25 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 0E1EA20737 for ; Tue, 9 Jun 2020 13:50:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=intel.onmicrosoft.com header.i=@intel.onmicrosoft.com header.b="Ikl1ghOb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E1EA20737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5197A1BE97; Tue, 9 Jun 2020 15:50:24 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 3BE981BE88 for ; Tue, 9 Jun 2020 15:50:22 +0200 (CEST) IronPort-SDR: JOTjeAduPm1mzhh/BdE/aCpGLi2NXSfKuYW1pIF7jsyfIMVzM9WKxW+6MLJsUGZoUq0lflD0wd zzrzT3d/ub0g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2020 06:50:21 -0700 IronPort-SDR: 2Vk/336mVBPEnv0EbZvuBXa3hZAELd+z4gSNX16iI9BoulLd1LltQKzYz02QFs3G3fYY7NBDue ukmE3p1r6dRA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,492,1583222400"; d="scan'208";a="473071110" Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by fmsmga005.fm.intel.com with ESMTP; 09 Jun 2020 06:50:20 -0700 Received: from orsmsx114.amr.corp.intel.com (10.22.240.10) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 9 Jun 2020 06:50:20 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX114.amr.corp.intel.com (10.22.240.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 9 Jun 2020 06:50:20 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.175) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 9 Jun 2020 06:50:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PfQQ+0dFA6wcpJKC1ItouxdvH2bLc4wBFCw6snogOuURQejkJIJqEWpaOTrh6s+tB08wPmw0prVdUtqlrsZfrO+4Cy8loTIh4cY48GI3gOaYu+wCzfAm/Kph/Z9ycpAf9ICMpb8dd4xXJ7B0OJw3qkFvsAohCC01uLIj9FPHQN4JFa4UgQnqn3dY3HgNKJW1xEnJK56KJ1+Rn92vl37jbhlN6MVOuI8gADJL9DZN8bazLy/bVRYQ6BpBUZ9KILwZNyUZvfjquSC7Qhj60WTK6TuIx5C4qKOoZARgKDatLo1M+d19giWcL6EkcA6qaJDkRfoDyReUZqByDmaY577zsg== 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=dWOF4fB8IZONSXzVWCxEIm87sIhdpfuLHICZIB0YvJs=; b=gxoRqnunN5W1KYx17ugRwdgx/SI060x7E5aI1x/TOuABLGdmb5KfyIsnM7R0JAVekBxyvn+HNVNu0paiXZ5XDp2Lh+suvKWmlRUPE30JqeL4N7alkiUKyoOjfHtxQdx3JiBhZUGxCBy/2PvrSu+k9G/j8NqdI2LH/ChpAgvDa/4CmlXGXKqMwGIPCJEBortFEJBhGxccImElDmf5EFjjAq6DsmAyJzTsRkaZlKJLLC9AAV+7SFN5QmUzCISdVuh5cgbqyR77MwFdUNwjvzoqsDZcGdYPQPS6x0w4kr6fgqbok1YpC0/uF0aaGxy5MJixlC4sla30XWo/4gL4vJUy8g== 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=dWOF4fB8IZONSXzVWCxEIm87sIhdpfuLHICZIB0YvJs=; b=Ikl1ghObI+vRRp4rFM9dV9zr9Ga5Kf3OyHdR2dJ07sRr8kVzlE8xyfhVTAQilhJ6zim95syVenOT5MqjRtGk0UAftiM2dNt9o49X6++WKS9NUhydvHStx/m85xMPhF9++K4ilJ/pxNvImWn4eJL2AgdP9uLv+rdYZ00Jhe8Ew7k= Received: from MN2PR11MB3550.namprd11.prod.outlook.com (2603:10b6:208:ee::21) by MN2PR11MB4431.namprd11.prod.outlook.com (2603:10b6:208:18c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Tue, 9 Jun 2020 13:50:18 +0000 Received: from MN2PR11MB3550.namprd11.prod.outlook.com ([fe80::8181:d8ec:fef7:532f]) by MN2PR11MB3550.namprd11.prod.outlook.com ([fe80::8181:d8ec:fef7:532f%2]) with mapi id 15.20.3066.023; Tue, 9 Jun 2020 13:50:18 +0000 From: "Coyle, David" To: "Ananyev, Konstantin" , "akhil.goyal@nxp.com" , "Doherty, Declan" , "De Lara Guarch, Pablo" , "Trahe, Fiona" , "Zhang, Roy Fan" CC: "dev@dpdk.org" , "thomas@monjalon.net" , "Yigit, Ferruh" , "Ryan, Brendan" , "hemant.agrawal@nxp.com" , "anoobj@marvell.com" , "ruifeng.wang@arm.com" , "lironh@marvell.com" , "rnagadheeraj@marvell.com" , "jsrikanth@marvell.com" , "G.Singh@nxp.com" , "jianjay.zhou@huawei.com" , "ravi1.kumar@amd.com" , "Richardson, Bruce" , "olivier.matz@6wind.com" , "honnappa.nagarahalli@arm.com" , "stephen@networkplumber.org" , "alexr@mellanox.com" , "jerinj@marvell.com" , "O'loingsigh, Mairtin" Thread-Topic: [dpdk-dev] [PATCH 2/3] cryptodev: add security operation to crypto operation Thread-Index: AQHWPmEdkfXrksBA+U2sUEh94t53P6jQRvZA Date: Tue, 9 Jun 2020 13:50:17 +0000 Message-ID: References: <20200410142757.31508-1-david.coyle@intel.com> <20200604151324.50704-1-david.coyle@intel.com> <20200604151324.50704-3-david.coyle@intel.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.173] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 125e90d0-4049-4b12-3934-08d80c7c0b6d x-ms-traffictypediagnostic: MN2PR11MB4431: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 042957ACD7 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: v2lQQbmeWzSfC/jVxnpcHuxIWeNjGxGmIf/AmBSf14cnnCs2VWeNcUEd9tPAEuH7quaW4J/9q/lwHtt1/9/mGipkGwxBKS5us5q8VeMj9zy9Lf1V9jWFCpiUhyUqlftudweBP5EPGGMH8wtIh3Mh6xrqB1LlgbSWn+drWH/z1NKRaxSrOPrkc1PuAmuqmr9jokl5BEJgL/+FkNYGPl1SNrpnfbG8zYggmiaINcI55zqYCnH2A2T8M8F7JXSscuN4Ne17cTTHDkLFHU9JPBnnInmA1G77CSYj+XHd+0Dum2gmj7v9/OWWAg/0TSeQL7ObcLCAe4JZCPLvV+R8AyFPC6wcfkOiWpAi08EBabUXDsW613ILzknouyK+nOIvSGhp x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB3550.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(376002)(136003)(366004)(396003)(346002)(39860400002)(76116006)(66446008)(54906003)(66946007)(64756008)(110136005)(9686003)(7416002)(66476007)(15650500001)(55016002)(33656002)(6636002)(7696005)(316002)(66556008)(86362001)(71200400001)(5660300002)(8936002)(6506007)(83380400001)(478600001)(4326008)(2906002)(186003)(52536014)(107886003)(26005)(921003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: ks5ya3RIt0pi3oSiOQ22bzroi4W2QvHujayOXtNgJnbHcJJK+2MCwf+D7Yye1CPHol5nRxWR5cYZCxEwyzgD/tml6HRAaX+khaOZpwm9aa6P6nd+Qs32y1m5G9T5lKYADrwzuigpKNU5+MQ3jktA4rKnpkomMM9SScRi46VP1YRF46E+9dIWEkoXKZxQipQ385EjKOrFUfZidJ0nSYytG3eI/0e+cFlSlglFN4jHOvPV4Yf/V+hlUlteKY/SkP0PrnAQwwj6fzInomi+N5p+YSmHUImwlM+JuH+Oj60YA9Uj6AxVpRM0C75uVwDBh95BrnKb3gGr3ias8F/unH1V/SfCdFVLeUiAIsvKVbuU+dRAQ3Oc5RlzhLWAEO9RQFgRMFf/i7Am8PntX740ia8jSNA5/SgQaJ8hqsMDopw6sWwad3Dv5xK/fM7gml3u0VFtlL4q3GjZpMl0rA37Y0mWgedZn+UYUK6PudDLoDfOCpEe1GeRkEccuRmOiegO/Nki Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 125e90d0-4049-4b12-3934-08d80c7c0b6d X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jun 2020 13:50:17.6682 (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: AqKmHF0EYQ/xKXJrlbRmdjgT2rrbfN/bV00nvt8CDjVp6pHe3c5Vz0drh2pMTUZqp4RAdsEytEKvBRee2VeEvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4431 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 2/3] cryptodev: add security operation to crypto operation 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, see below > -----Original Message----- > From: Ananyev, Konstantin > Sent: Tuesday, June 9, 2020 2:23 PM >=20 >=20 > > > > /** Status of crypto operation */ > > @@ -121,6 +123,13 @@ struct rte_crypto_op { > > struct rte_crypto_asym_op asym[0]; > > /**< Asymmetric operation parameters */ > > > > +#ifdef RTE_LIBRTE_SECURITY > > + uint8_t security[0]; > > + /**< Security operation parameters > > + * - Must be accessed through a rte_security_op pointer > > + */ > > +#endif > > + > > }; /**< operation specific parameters */ }; >=20 > Is there any point to have this extra level of indirection? > Might be simply: >=20 > enum rte_crypto_op_type { > .... > + RTE_CRYPTO_OP_TYPE_SEC_DOCSIS, > }; > ... > struct rte_crypto_op { > .... > __extension__ > union { > struct rte_crypto_sym_op sym[0]; > /**< Symmetric operation parameters */ >=20 > struct rte_crypto_asym_op asym[0]; > /**< Asymmetric operation parameters */ >=20 > + struct rte_security_docsis_op docsis[0]; >=20 > }; /**< operation specific parameters */ >=20 > ? [DC] This was to allow some form of extensibility and not to limit this to = just DOCSIS. If it's felt that having the extra level of indirection is overkill, it can= be easily changed. However, we cannot include a struct of type 'struct rte_security_docsis_op'= (or 'struct rte_security_op') directly here, without creating nasty circular dependency of includes betwe= en rte_cryptodev and rte_security. I had tried defining an opaque version 'struct rte_security_op' (i.e. no fi= elds within the struct) here in rte_crypto.h, but the compiler complained that it couldn't determine the= size of the struct, even though it's a zero length array. That is why I had to use the uint8_t in 'uint8_t security[0];' - I don't li= ke this, but I couldn't find another way that kept the compiler happy and didn't create a circular depen= dency.