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 96465A034F; Sat, 16 Oct 2021 15:31:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27C82410DC; Sat, 16 Oct 2021 15:31:49 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 657B44067C for ; Sat, 16 Oct 2021 15:31:47 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10138"; a="214982272" X-IronPort-AV: E=Sophos;i="5.85,378,1624345200"; d="scan'208";a="214982272" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2021 06:31:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,378,1624345200"; d="scan'208";a="549419004" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga004.fm.intel.com with ESMTP; 16 Oct 2021 06:31:45 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Sat, 16 Oct 2021 06:31:45 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Sat, 16 Oct 2021 06:31:45 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.45) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Sat, 16 Oct 2021 06:31:45 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hh/+VPpM0Ol/kRFTEe69nC2WJlt8VMlC/sFa2jMgV35GXibdeBPg6YgHNrcAy6IT3R6Mr5MunsUIRcLoTehqPPaOslSyChIqSG2pO+upH27HM57jkEgrCYrejMlSqnuWvdiaLuGHExXmYQ2bDpNPjpuSOhXgWgwFmq9TLxEjqqLSy+Ik3Po3CoXinC3AKVBo4f88URcoOc9fNq7SogylZb+ladL6iP3CsaKdzTNXhoyADVy6vEKdTMjPpB3mEhz1MZE1X5lHyOL66BHeBUS0p3kV9ea8vZuvM/pX00V2SPpq+5aloSscRq9TQhajxp9TrUVfFeSkotzaDErqEYSrpg== 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=l4Tn50wygwtwbzKVbJ2ldvVrgrISKmMPXeEoZy378QI=; b=V8Tdw8RMdabsuAYxijm1WT06CZtep4d2RygSljZ76gDZimeAJq51EN8viJwW4ufXs2MDicRAYwf+3HpT4bRxQ0MwQR5t385dq+Qrt7ZpyAkhzS78uZVuEjg/M/TqbuyHBTgOassZVStGeEI+VAhettLPmwJzFwx7Ey8oOJkd3zVJNo01l4pBvFMmhH1Ct+ZBxQVWiOHJPlxNjICOQnP/PZ9+V4FX2qqJMrNaygPAl8iAj7alFBvWvPgLtIkc6+UBWQf2fTYAemu4neHWXVyg329CMej56HMC9F3Q59OcmNEiu9FsEv9vgc0v4DyHzGhROiV3PDbJaMLnyJMoehjz7Q== 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=l4Tn50wygwtwbzKVbJ2ldvVrgrISKmMPXeEoZy378QI=; b=KiWKB8NyNg3iZ/ECXhjInFG3vbUYt+dt+RkGO7xdIRXFV5ZQoHZnhiqVFzHZ/IMzoL8bqUBcWoIRBq8Q3KyoOVxGT/wZDWjwbSRsh5NfOfhXWpeGBV/AbEyuLph6Yx4InUi6giaI91YLS+/yZkCBpzdOfAXx4O7tXyrz3QBlcwQ= Received: from MW5PR11MB5809.namprd11.prod.outlook.com (2603:10b6:303:197::6) by MW4PR11MB5822.namprd11.prod.outlook.com (2603:10b6:303:185::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.18; Sat, 16 Oct 2021 13:31:44 +0000 Received: from MW5PR11MB5809.namprd11.prod.outlook.com ([fe80::2c31:1470:3036:959b]) by MW5PR11MB5809.namprd11.prod.outlook.com ([fe80::2c31:1470:3036:959b%8]) with mapi id 15.20.4608.018; Sat, 16 Oct 2021 13:31:44 +0000 From: "Zhang, Roy Fan" To: Akhil Goyal , "dev@dpdk.org" CC: "thomas@monjalon.net" , "david.marchand@redhat.com" , "hemant.agrawal@nxp.com" , Anoob Joseph , "De Lara Guarch, Pablo" , "Trahe, Fiona" , "Doherty, Declan" , "matan@nvidia.com" , "g.singh@nxp.com" , "jianjay.zhou@huawei.com" , "asomalap@amd.com" , "ruifeng.wang@arm.com" , "Ananyev, Konstantin" , "Nicolau, Radu" , "ajit.khaparde@broadcom.com" , Nagadheeraj Rottela , Ankur Dwivedi , "Power, Ciara" , "Wang, Haiyue" , "jiawenwu@trustnetic.com" , "jianwang@trustnetic.com" Thread-Topic: [PATCH v2 0/7] crypto/security session framework rework Thread-Index: AQHXwGe76fTitYpJN0GlLW4tZSnTFKvSYb2AgABY9OCAABXEAIAACUiAgAFYU6CAACU7gIAAEf8AgAE3ciA= Date: Sat, 16 Oct 2021 13:31:43 +0000 Message-ID: References: <20210930145014.2476799-1-gakhil@marvell.com> <20211013192222.1582631-1-gakhil@marvell.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.6.200.16 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9ad4b834-1c50-4d14-5d0e-08d990a94b87 x-ms-traffictypediagnostic: MW4PR11MB5822: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hjbtr9BLVg3ffwtQ0UYRhZhENNE1jyqe69W3UuYBGfYtWBBvTb7ehqkUKQldUpdXCZABJ/4Pdj9Lc1mkxEgi0gZ7SvoWvHGOjmEQaZ0InzZyW2s399ajDxBtpK+qKbMqApp36l+Fj1LTaQKhIM85KTmy5MsK0AhySvRjeGEIPi3Ttxbr5sUWcLRxTdB0/mG5Ia+GYaw3Fd+ZMJt9D9ojIC2MAs++SO/YHiy86BLzbEUhsEZ43bHo6Bhy1jnZJstcuTkIUPU9P9k/VgIQUme07dY57KaFy07WaCPHgYLV+/EemMlcg4RVk6SGs9y48B02sQmYRbO/KxL/QQeqn+89Q7DOSGfh+w+qDgmITkke9WDCgbd3Cym0NwQjH1RUdItgJG9dffcd4Kn+qr8qaLQoATE0A/R24Q+ZRQxkhRvmX8e+y7CTsFuwPIRi2FSZxuWYBGXtCTHdGDJchF9IrEBzRs74DWYHGFFwS9U7obrMxYj0UpGL+k7reN1y7d0TX8EenHw0i8fM63aWWLrorjtQWTvOgqNdFniaq6+7gB56jzPxMcNBuPrAcIQo8/Fl6Bde6ZEx6TMKMy9fq9m9ctL78Nhw431eh6QbLM5laucuPQGv+EJwMfPcN1qbjUcJ43NBt0/IshXNXof12SlvWkNJyL1D0UklQWOK0WLJ4+PypuKcqTJcQ5wndN88xcEndjI/d0Uh3FuazeoxAUPaCIathg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW5PR11MB5809.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66946007)(82960400001)(76116006)(86362001)(83380400001)(38100700002)(122000001)(38070700005)(33656002)(186003)(5660300002)(7696005)(8676002)(7416002)(53546011)(26005)(15650500001)(66446008)(66476007)(66556008)(64756008)(2906002)(508600001)(4326008)(55016002)(6506007)(110136005)(52536014)(71200400001)(9686003)(316002)(8936002)(54906003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?jI37iJe1YdCRCo4h0alBepDaoFAwF6JOP0OmCZqkLzHWC5y2q0OFAAoV?= =?Windows-1252?Q?lSzXSGeqLAuEln7Cmyas3Tcm+EcSa1HuNLi30ychDRtad9NuSj11xDDP?= =?Windows-1252?Q?rAN4t+835SwHQWflJson9U2Qc5KeUuT/NlJ8doCNy/P7adDfx+8FiSyh?= =?Windows-1252?Q?1n3XaEkklUHS2diCQtP5s0Uub67hsFuLhyms9hIO1Mwc67ZlwqP2yY4w?= =?Windows-1252?Q?GpSvhi8RKneHQ9mzhArEh0AE9Z3zPNmD60mPpMw/oAkUCCq3ZcO8Fzyu?= =?Windows-1252?Q?xPc3MOdpB5G0yGHPeCC4zxJ+Yjqk4xiOc4eYAiQRZvreyIW2vP0GdTGR?= =?Windows-1252?Q?9TnlJ0nj4QNNoRwWBPHvYrGCdY9YyTzz826+nZQTSDvtg3bbqTVJ0gLX?= =?Windows-1252?Q?1ifVK2XVeVzDsdwFrC/UCR7Ku/Cjhh/jSms8helOEytRLUcUZAF2ck+0?= =?Windows-1252?Q?wFe3aCO0twedCrCaTBYQh+Z0QdPxu8VmhoOMOlP4JwwUaSMs5FJa9wAr?= =?Windows-1252?Q?u2D742JnY2QgKqvwTW38UqsuMd8x6VjFQ92n52MLZ3vIuzEMnpVOAzZ+?= =?Windows-1252?Q?NNtO6wBFFX62e9rtR0nVSm+TfX66XIEWUWomMNtsy5Dx/86zivb/uMI+?= =?Windows-1252?Q?shu50ZImRYLn1CqzyXqi7rQZk7QmRiKOZ9/r49hFgEUp3ZRfKon1Z0/+?= =?Windows-1252?Q?nXnjceKfYNn37oIVed2ef2p09TiHZUpCjAF49kqgqMRJrnU5CjlnAOk1?= =?Windows-1252?Q?OAViJ2b4QpyLiH/iS1a4rRg7JmBgQZi8p3PkufEN0kcHJSe4WFOiFeZJ?= =?Windows-1252?Q?VXqaRKRael1erc4KK2Q/RFHuEZ+kEekXHuEztlNtGLEKgelAhIjUFY45?= =?Windows-1252?Q?T8iuZ4ifSkt9F76ZmJ35rWk9lLXep76QRJSH7Yzuf7n0m23vDW3ozUtS?= =?Windows-1252?Q?VXTHd+NYrmZGTEzbtPMWn2B91qAL4GhYIhqx/j7FIlwTDmAC/LcyTz80?= =?Windows-1252?Q?MIZexwtUZ3PKyrbgawETTKEXfAjUsMHJukIUofL3k+slekHH+Cb6wUH4?= =?Windows-1252?Q?rqt1v/HttFgLRgj25tVvTtos40Mo54503vtUJhU2v9HvQ9YJdBOZztJN?= =?Windows-1252?Q?ihSFc2bk7BC48MhH3KEz1ZncHAMuzu1XArfyc/yjStVHuDcNj3yWjNtR?= =?Windows-1252?Q?QidNzaZ49fvhyH3531sqdmzqjayaeCM06tK92BHIGruRi8VkVnzPVsah?= =?Windows-1252?Q?UgBdkX8Dl0wcqhcbpFoFxw3vYwXUIfM1KXzUOXWQjOLf2Usyy/nhjLY8?= =?Windows-1252?Q?TjV8vz/zAvqSWjd35iCOPTmDpyeekM17hAgBT95evFc82TL585IukxUj?= =?Windows-1252?Q?9kHC1jgLJHegIqKxZVKFuW+xq+UvnuSahZ3n4pFhaX0vmYBOcY3JxXvg?= 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: MW5PR11MB5809.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ad4b834-1c50-4d14-5d0e-08d990a94b87 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2021 13:31:43.7913 (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: juiPPhhJ024DwduEgAumvF+vhFq16YxwXjVoEu2X3cqsqOMw8BVWKweBDLvsnZh5Hx5JmBjR74VK9AHaqujC0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB5822 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 0/7] 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, > -----Original Message----- > From: Akhil Goyal > Sent: Friday, October 15, 2021 7:47 PM > To: Zhang, Roy Fan ; dev@dpdk.org > Cc: thomas@monjalon.net; david.marchand@redhat.com; > hemant.agrawal@nxp.com; Anoob Joseph ; De Lara > Guarch, Pablo ; Trahe, Fiona > ; Doherty, Declan ; > matan@nvidia.com; g.singh@nxp.com; jianjay.zhou@huawei.com; > asomalap@amd.com; ruifeng.wang@arm.com; Ananyev, Konstantin > ; Nicolau, Radu ; > ajit.khaparde@broadcom.com; Nagadheeraj Rottela > ; Ankur Dwivedi ; > Power, Ciara ; Wang, Haiyue > ; jiawenwu@trustnetic.com; > jianwang@trustnetic.com > Subject: RE: [PATCH v2 0/7] crypto/security session framework rework >=20 > > > Hi Akhil, > > > > > > I tried to fix the problems of seg faults. > > > The seg-faults are gone now but all asym tests are failing too. > > > The reason is the rte_cryptodev_queue_pair_setup() checks the session > > > mempool same for sym and asym. > > > Since we don't have a rte_cryptodev_asym_session_pool_create() the > > > session mempool created by > > > test_cryptodev_asym.c with rte_mempool_create() will fail the > mempool > > > check when setting up the queue pair. > > > > > > If you think my fix may be useful (although not resolving asym issue)= I can > > > send it. > > > > > Is it a different fix than what I proposed below? If yes, you can send = the > diff. > > I already made the below changes for all the PMDs. > > I will try to fix the asym issue, but I suppose it can be dealt in the = app > > Which can be fixed separately in RC2. > > > > Also, found the root cause of multi process issue, working on making th= e > > patches. > > Will send v3 soon with all 3 issues(docsis/mp/sessless) fixed atleast. > > For Asym, may send a separate patch. > > > For Asym issue, it looks like the APIs are not written properly and has m= any > Issues compared to sym. > Looking at the API rte_cryptodev_queue_pair_setup(), it only support > mp_session(or priv_sess_mp) for symmetric sessions even without my > changes. >=20 > Hence, a qp does not have mempool for sessionless Asym processing and > looking at current > Drivers, only QAT support asym session less and it does not use mempool > stored in qp. >=20 > Hence IMO, it is safe to remove the check from > rte_cryptodev_queue_pair_setup() > if (!qp_conf->mp_session) { > CDEV_LOG_ERR("Invalid mempools\n"); > return -EINVAL; > } > Or we can have give a CDEV_LOG_INFO (to indicate session mempool not > present, session less won't work) instead of CDEV_LOG_ERR and fall throug= h. >=20 Yes this is a valid fix. It will make queue pair setup work as before. The old code was like this: if ((qp_conf->mp_session && !qp_conf->mp_session_private) || (!qp_conf->mp_session && qp_conf->mp_session_private)) { CDEV_LOG_ERR("Invalid mempools\n"); return -EINVAL; } The requirement was either you provide 2 mempools (one for session and one = for session private) or you don't provide session mempool when creating queue p= air at all. Only otherwise the error is returned. > For sym case, it is checking again in next line if session_mp is there or= not. >=20 > I hope, the asym cases will work once we remove the above check and pass > Null in the asym app while setting up queue pairs. What say? It shall be working. Thanks. >=20 >=20 >=20