From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 90C88A0C43; Wed, 20 Oct 2021 18:48:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4CE6840150; Wed, 20 Oct 2021 18:48:38 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 03E9940142 for ; Wed, 20 Oct 2021 18:48:36 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19KEcs3X003983; Wed, 20 Oct 2021 09:48:31 -0700 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by mx0b-0016f401.pphosted.com with ESMTP id 3btjwdh7ys-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Oct 2021 09:48:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QevXxLOPIjyLxpW0mSBQH3IpTNYG7Q53j/TnY40ag4wWrCP+7RSZxpiImdETsrGbVR9NFM6GKAOXhz0+VepeZyASt46esxD0OxAvl3o4m+vW7AzOF+bT0AixJNIbQQ56r25wYtS/J/uUHAB3lIPVQ8n5YxF64nUVXpeAc4ACtZ0hJaH65XambKPTzL8zyobSERkhxOuDkdHHJD8ac5V9424uK2KeYE4RaOixx2bsLeyUEbQyp1FwSluhv+PzDoiqJw42c8FUziOKBWQ6UcK3wlshJ9o6kseliWo2Ft295liQhY33NwOKP9ANNdfZngIdq8ycmDuDvngXXo49D+1KVg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oZZ/eTxAuURmwTlajHsnQL9cq40c21RGwZh6ahEjYFM=; b=Tn42EUUXgtmJQ5SYwDTDQd5kLMdmpcRDUfVQnADW2G4b7eLXcf5SpIs+cv9+KDWBYiAlB5wFEEuUEn0EW8//m488VFCRDqlMdP/1JNAdanVdRxByFkIqG3xQYnx1//H5tiWDlsFw56wz5/0yvsp5ErS9hTzU8zejEP3aLl71GnhwSDeJNBP8/aj+LzBVsCOzD4rr7DQqPcj3VEtBTAI4RG0+augXTUna0+OkKp8BGbwT0UCI90UxlU0AW3tPcAr91EEaMuQ0cYLVWQnuRHeF0gRcgjG5IsPg/RieiPZDdqhuoL7wohEJVUFvmoaFCPuLm0AnZWqEeS6Nr8C3HiVXcQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oZZ/eTxAuURmwTlajHsnQL9cq40c21RGwZh6ahEjYFM=; b=VNEshEKkBdMvPW6C3mpToucMcX9mueh/VYiYV2Uw7ykr8q6Ha5F58MGKslB3HsoKqNTtsYvbkbU77qO3rfDfgh9gBBAAO53PMXwSTDrpZcDeoyHguPEb0/eqwPpwQwxlw4PKGD2trMAEEOiXw8QX5MWnLNOzD4QjiKh0ftDiMNg= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CO1PR18MB4745.namprd18.prod.outlook.com (2603:10b6:303:e8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.18; Wed, 20 Oct 2021 16:48:29 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::c41e:707:3f91:71b8]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::c41e:707:3f91:71b8%8]) with mapi id 15.20.4608.019; Wed, 20 Oct 2021 16:48:28 +0000 From: Akhil Goyal To: "Power, Ciara" , "dev@dpdk.org" , "Ananyev, Konstantin" , "thomas@monjalon.net" , "roy.fan.zhang@intel.com" , "pablo.de.lara.guarch@intel.com" CC: "david.marchand@redhat.com" , "hemant.agrawal@nxp.com" , Anoob Joseph , "Trahe, Fiona" , "Doherty, Declan" , "matan@nvidia.com" , "g.singh@nxp.com" , "jianjay.zhou@huawei.com" , "asomalap@amd.com" , "ruifeng.wang@arm.com" , "Nicolau, Radu" , "ajit.khaparde@broadcom.com" , Nagadheeraj Rottela , Ankur Dwivedi , "Wang, Haiyue" , "jiawenwu@trustnetic.com" , "jianwang@trustnetic.com" , Jerin Jacob Kollanukkaran , Nithin Kumar Dabilpuram Thread-Topic: [PATCH v3 0/8] crypto/security session framework rework Thread-Index: AQHXxGgHgrreuE8Noky70dvpBQ6UMavcClQAgAALT4CAAAUxcA== Date: Wed, 20 Oct 2021 16:48:28 +0000 Message-ID: References: <20211013192222.1582631-2-gakhil@marvell.com> <20211018213452.2734720-1-gakhil@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bc64457d-94c2-4774-f906-08d993e97170 x-ms-traffictypediagnostic: CO1PR18MB4745: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vlFj6QlraFZiWQiubu+jfe65vQFsdqoKg1eVlrEH6+iGP8BFFQxRiqont5AgnZwVWw6+8FMo56uhoOd1Zsfmd7IT0otqnpi8T9UYxSNLD5iERanVjY3bv1STrpyGSGBF8hlT8yR7ktTtcQRnaTIcAbfDeWHFbjOnc1sHWgLnpCKU7w/W5L9c418T1k/5kZMd84POrhQcJz8IUVzJga5iDVWmAmdJg+tyw0rECj4XEcTzuxCN7GPDyupRHz9lNBJrJN7CPgmJ6TWx2s+bdFqGVQyCDqgLA2G0XquZbBwIhwSdyxl0wCbvBYeWshmm9Hn2iLKC54BqJ7hOmkyVBfG7sXe/NWV7gpPTUfDeszE56fbtOCXwj++p61+gB/y0pPDczIsQ/6mfkJjO+0beeZaTyMWxTuXc3fXtI2zixLsYSt8d6a4TqLXZaAhIdymQ1hivA33BfSN/6lJzJJIFb5Bs/tLVKVQMB5CInfbIMPTSPN4lq7FOimvuR0zq03BXxDup2Jp40XKADj1wKnWlbxWlZUHFfP8MCtLSDm7V58Xs2uzkbOG1w7p+bA3alzzDGS8xH52yegEXYnIoBjYtB0K9xmgJHKyPnQ3Ck26zq+tC3rALvD+KT+RzO3NFxhsRjCW+KK0ax4tK5/Y3KIyZ0kWRH7G4nEQnxXJJCkwEUVs2X9/p97cF+7hTc3QSnnwrfllmZ3AzcTPOjNK+Ucf4znDPVQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(71200400001)(15650500001)(2906002)(2940100002)(66446008)(186003)(8936002)(86362001)(122000001)(38100700002)(26005)(7416002)(508600001)(9686003)(316002)(66476007)(66556008)(5660300002)(64756008)(76116006)(55016002)(107886003)(83380400001)(6506007)(66946007)(54906003)(4326008)(33656002)(38070700005)(7696005)(110136005)(55236004)(8676002)(52536014); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MdhbFK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qCc54QoQYJb0taRtuvcSWIeZ?= =?us-ascii?Q?YFAghhKlRe+9yManNk1ITKQRCtzI8JLflJCLfXouHWa7jQT9lW3QHMBHl3DF?= =?us-ascii?Q?wrMmqazh/sepA2SxwHW0QyMFR7BSHLOFteceYdGQ7FPvbeLoH1A3vxsyUov5?= =?us-ascii?Q?/TWxARiTf4Ud1//RjVCWB4rA9TzY06MY9E/5Xey0FO8H5M/GjgszyakO+6En?= =?us-ascii?Q?ddxzohVsXll5QYsG/1Jxw6Un3HDOaPAKO+aNy4oYJbo/m3oP29OmRxwaPHIm?= =?us-ascii?Q?pZg3oY9bz1HGIceHyXY5OkfUi2aDobPjv3WGH1ZZKRzhN1bA2vun573jVy6g?= =?us-ascii?Q?ZWy5voPnziIj+EYfCrPBg+jMLPLr4HLfaeILkyIE1ipY+wzPOfPUZRAIeRhO?= =?us-ascii?Q?87Joo+/eObImpE3hEH85pfQq5aKqlCtBQu3PeulXi2vQujhpXIScgc5OSvkN?= =?us-ascii?Q?93EXQN9FnTQhG0sWFzxffjK6?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc64457d-94c2-4774-f906-08d993e97170 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2021 16:48:28.7029 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: y9r6BF9+ZDboSRy+0PvCtYIxyKQ6hWyDvmZOIohbylx4NgSMNaBN9WZWNM26iKvWkdmFgIi3ZviwTX6BiWzvHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4745 X-Proofpoint-GUID: QZJmk60R0ireT-7xZTRqkKmp6EhAHMOi X-Proofpoint-ORIG-GUID: QZJmk60R0ireT-7xZTRqkKmp6EhAHMOi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-20_05,2021-10-20_02,2020-04-07_01 Subject: Re: [dpdk-dev] [PATCH v3 0/8] crypto/security session framework rework X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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, > > > > >Subject: [PATCH v3 0/8] crypto/security session framework rework > > > > > >As discussed in last release deprecation notice, crypto and security s= ession > > >framework are reworked to reduce the need of two mempool objects and > > >remove the requirement to expose the rte_security_session and > > >rte_cryptodev_sym_session structures. > > >Design methodology is explained in the patch description. > > > > > >Similar work will need to be done for asymmetric sessions as well. > > Asymmetric > > >session need another rework and is postponed to next release. Since it= is > > still > > >in experimental stage, we can modify the APIs in next release as well. > > > > > >The patches are compilable with all affected PMDs and tested with dpdk= - > > test > > >and test-crypto-perf app on CN9k platform. > > > > > > I am seeing test failures for cryptodev_scheduler_autotest: > > + Tests Total : 638 > > + Tests Skipped : 280 > > + Tests Executed : 638 > > + Tests Unsupported: 0 > > + Tests Passed : 18 > > + Tests Failed : 340 > > > > The error showing for each testcase: > > scheduler_pmd_sym_session_configure() line 487: unable to config sym > > session > > CRYPTODEV: rte_cryptodev_sym_session_init() line 1743: dev_id 2 failed = to > > configure session details > > > > I believe the problem happens in scheduler_pmd_sym_session_configure. > > The full sess object is no longer accessible in here, but it is require= d to be > > passed to rte_cryptodev_sym_session_init. > > The init function expects access to sess rather than the private data, = and > now > > fails as a result. > > > > static int > > scheduler_pmd_sym_session_configure(struct rte_cryptodev *dev, > > struct rte_crypto_sym_xform *xform, void *sess, > > rte_iova_t sess_iova __rte_unused) > > { > > struct scheduler_ctx *sched_ctx =3D dev->data->dev_private; > > uint32_t i; > > int ret; > > for (i =3D 0; i < sched_ctx->nb_workers; i++) { > > struct scheduler_worker *worker =3D &sched_ctx->workers= [i]; > > ret =3D rte_cryptodev_sym_session_init(worker->dev_id, = sess, > > xform); > > if (ret < 0) { > > CR_SCHED_LOG(ERR, "unable to config sym session= "); > > return ret; > > } > > } > > return 0; > > } > > > It looks like scheduler PMD is managing the stuff on its own for other PM= Ds. > The APIs are designed such that the app can call session_init multiple ti= mes > With different dev_id on same sess. > But here scheduler PMD internally want to configure other PMDs sess_priv > By calling session_init. >=20 > I wonder, why we have this 2 step session_create and session_init? > Why can't we have it similar to security session create and let the sched= uler > PMD have its big session private data which can hold priv_data of as many > PMDs > as it want to schedule. >=20 > Konstantin/Fan/Pablo what are your thoughts on this issue? > Can we resolve this issue at priority in RC1(or probably RC2) for this re= lease > or > else we defer it for next ABI break release? >=20 > Thomas, > Can we defer this for RC2? It does not seem to be fixed in 1 day. On another thought, this can be fixed with current patch also by having a b= ig session Private data for scheduler PMD which is big enough to hold all other PMDs d= ata which it want to schedule and then call the sess_configure function pointer of de= v directly. What say? And this PMD change can be done in RC2. And this patchset go as i= s in RC1.