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 22F3FA051A; Wed, 10 Jun 2020 12:40:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5FB582C02; Wed, 10 Jun 2020 12:40:12 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 3192B2B93 for ; Wed, 10 Jun 2020 12:40:11 +0200 (CEST) IronPort-SDR: 0eVkLuNnpm4exRh8LCt4XIAgBT5D7gl06Hdx7Xdtaxme+ZL296tD/pg1yYzGjolJhrIv1jQBKw BkBb8TQL0Daw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2020 03:40:10 -0700 IronPort-SDR: kBcrq3quG6bbuxnFgOdeLKNiiBBlkQIADkrxd2Ji5fYBTBJcUtg7yeCdfg6HqJvu8bcWO2wKH7 Io6yjfp1cnxA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,495,1583222400"; d="scan'208";a="349811115" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 10 Jun 2020 03:40:09 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 10 Jun 2020 03:40:09 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 10 Jun 2020 03:40:09 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.104) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 10 Jun 2020 03:40:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gAgd/6bTFvobZ1a5zpcEK4Os4WP55JVjMFF4tk2NAgs44KF5pBW2ZAcSYKOG0dd7WqYlGznFNk8a8vOg9IUVaMLJoVHYYZwguHO+7izrQmemFKkmRETQHTXC0fWrXzqcpNuD5wpAy60itERXhSVKf4234R0LIZHA/srEVvShojtUHutbvH6o8/UvGKBH/FziY7n66g+xtHhYmZ8XZjVC14DtwB2kYK8qTL9goLnKBr7wNbP0AzoFY/N6uk1U1ep/W9mmb+yo0hjXBT0o8Ov3H5wzFIsxwg0tiS4M0U9yvq24c0E3mRybqB9K/MeMM9KUpO4QNhCuTHxk5mG0MCfJ9Q== 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=FONEJ9r3E67MacrFCosg2fL/agiPe+G0XwTYuSWB6tw=; b=BToHsGkwBi6etkAEHYb2Qya2fAAIIXdGHJ+oTYlrxsspt3jbbDtKuzzjr8G7mFUI74mSxc0xjayudS4KYE9qqw2FUN6mdp6GxHK81UYdMaW0gNVSML02+hNH+n7d9oboTb3fYlqK1d73vbxXmEJ+sP3FgjGE0ACx2JHLf0krE5ms6y+HGpgrs+fj/FG0U/vMQO2uWDLvQUjKL1YYr9ZfFw1SCsWfWASBtv2JwXQkj+sPRhUlT2gtG0Yecp1AF0mzFfDitPtzZ/GASioHVoPulVftEBKYgSs8X42B+gJDD9Nsh2oV8d5CI6J01eVLsIpuJ2jgmepMt9188ldUWrZNDg== 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=FONEJ9r3E67MacrFCosg2fL/agiPe+G0XwTYuSWB6tw=; b=mIlNwnERKYl2dhZuRldEbbzPc8Dk8A1h5EvmCo3E4UQ+OBoAcygfc3cZ5lyZAQt7svPhV64/sBGnzQtBu2IjVo8V5zPEMd4KhbGScchtbJBjjotkHpAk2Y4rf5OioKFfAlfGXkbBBXs55k8KfWp/rYSVkBOp0vmRpVkGiW0QqvY= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB2949.namprd11.prod.outlook.com (2603:10b6:a03:81::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.23; Wed, 10 Jun 2020 10:40:05 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f160:29ab:b8f9:4189]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f160:29ab:b8f9:4189%6]) with mapi id 15.20.3066.023; Wed, 10 Jun 2020 10:40:05 +0000 From: "Ananyev, Konstantin" To: "Coyle, David" , "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: AQHWOoWN4GXDndi6U0mcdOcaf+c++ajQS72ggAAJCICAAVwvYA== Date: Wed, 10 Jun 2020 10:40:04 +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-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 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.181] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b23611f2-0391-41c6-46e7-08d80d2aa32c x-ms-traffictypediagnostic: BYAPR11MB2949: 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: 0430FA5CB7 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: qL16/nwAVRPzQNTXGH04Qa2l+YBXxmrJHa5/8qyPJW64a6ojq49qVW2pUJGZlJoVTTtdtX6nVusNsQaLFB66RMitHNXGa7luZMQ46Twoy218rwpzt4Cd7UDzjTn6dAWoOVsMO/mqmixcX7WTWM/DJliHYiR+/vlsnIGoCSjMoS7+AYJGnGM2AMc2oc2htBP/MY2GHuWWGnnPSWcNCm+a0LgN6ZdT2/UiW/ReNgbLMJ5q20LQbQhU9jmDX0GPSB2y6OcASdlhuqTEfqvButgqwgVQWc93SVVX5mAX7U4Yc7zBjQc/3vqu04vnQ04G4I/VPY5kXx07JbNQNp/MfaU88Efuo0JcZ9GgpVEIhNP2BwT1rJ+GAvk/3Rw7mU9gG7Eh x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(346002)(39860400002)(136003)(376002)(366004)(396003)(66446008)(66476007)(55016002)(5660300002)(71200400001)(7416002)(110136005)(6636002)(4326008)(33656002)(52536014)(54906003)(316002)(86362001)(83380400001)(9686003)(2906002)(107886003)(8936002)(6506007)(64756008)(66946007)(66556008)(76116006)(15650500001)(186003)(478600001)(26005)(7696005)(921003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: sUapeDyyHa0sUGZUe3CtQ5nq7acMLync2wyGlMyaYBSGZewziCpfBnlNcbUt3iANhQBEBFwoM3A5tdv3v2k6JyyTFmcAuhtGlzWIJEycitpQOIFoDViWKpqXRTIIAiRAnci5L8JS/xqamBuKAcGbJFq1aOuGxwITOsuRKpi4ISZ19DaoE7KoAHaUIWkERBbYXJS9t3QnBP0aIKLk8ySV/Tm0WIdiLjepYbzVCabIuz3ZR1nCYsSHvrJr4aiRkVpDxudSNVK+x7jUfXvtnNPbXEztDkBxgu2PFa+GUwgY2k5+ksoTdyAAeIXA/8HpJoW2KLCqsEnSZjKXGYo883VWN84NKMotHPI8YCqZ422rvU2e6LNGdMJ/jKA3ssNFj1rRdpPrdQF4wqHQvhOJbUqVTsrvjOkk1ut7hbm7urhow5zl56jEmOIc9fPnVAzehP71NU4aFP94i516qTFwbI97ArbiymFuDZt096Ge51bHHLJtLBgRDiTNAGrBs+1iE6wD Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: b23611f2-0391-41c6-46e7-08d80d2aa32c X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jun 2020 10:40:04.8231 (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: iQFY6m2pmSqE3dg7Bf39mWSi471Cpyd11+AG7ODFlUKY0q2/o+0F1tz1kqqIlXnuteBhrTPSsxVdGCPp76NuaDOyCOEMMMbUJc6ZOuq4vk8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2949 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 David, > > > > > > > > /** 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 */ }; > > > > Is there any point to have this extra level of indirection? > > Might be simply: > > > > 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 */ > > > > struct rte_crypto_asym_op asym[0]; > > /**< Asymmetric operation parameters */ > > > > + struct rte_security_docsis_op docsis[0]; > > > > }; /**< operation specific parameters */ > > > > ? > [DC] This was to allow some form of extensibility and not to limit this t= o just DOCSIS. > If it's felt that having the extra level of indirection is overkill, it c= an be easily changed. >=20 > However, we cannot include a struct of type 'struct rte_security_docsis_o= p' (or 'struct rte_security_op') > directly here, without creating nasty circular dependency of includes bet= ween rte_cryptodev and > rte_security. >=20 > I had tried defining an opaque version 'struct rte_security_op' (i.e. no = fields within the struct) here > in rte_crypto.h, but the compiler complained that it couldn't determine t= he size of the struct, > even though it's a zero length array. >=20 > That is why I had to use the uint8_t in 'uint8_t security[0];' - I don't = like this, but I couldn't find > another way that kept the compiler happy and didn't create a circular dep= endency. I see... would it be an option to name this struct 'struct rte_sym_docsis_o= p and and move actual definition inside lib/librte_cryptodev/rte_crypto_sym.h?=20