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 39F5EA034F; Mon, 11 Oct 2021 20:21:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A62841102; Mon, 11 Oct 2021 20:21:52 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id AEF36410FF for ; Mon, 11 Oct 2021 20:21:50 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10134"; a="224351630" X-IronPort-AV: E=Sophos;i="5.85,365,1624345200"; d="scan'208";a="224351630" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2021 11:21:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,365,1624345200"; d="scan'208";a="562319760" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by FMSMGA003.fm.intel.com with ESMTP; 11 Oct 2021 11:21:45 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 11 Oct 2021 11:21:44 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 11 Oct 2021 11:21:44 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Mon, 11 Oct 2021 11:21:44 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.41) 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.2242.12; Mon, 11 Oct 2021 11:21:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O3w0JKMZ04aQeUbeqUlME3Nix/HW2lE3OfRGJcwpkLZUZE/b1P0jTO5+Di63PpoDZWN3G9JVfjt8FLcw03Jx513NmQ/D8LzH3kVY4FbWYRfx0mt+3BX0ECDqvlPtAN42UQ04Z/zg38DDO/vjLz6renZiwrLJ/zgOrdhOV22bYYYKFvp9+fV4KDLI1+dRKWx9w7E438qFjpwa4pUpAkdFraD2h2Y2WYiGk1TkWK4f2xZSzt0pmSxKw8UvV6T3AA+PxO5dmybDjZsjQOcygcEbTdW3K6e0f8qGksJX7fQvJVl+rfxH0IhztK4Eb1E7PNfMRAKiti5dVYt2sCykK8KRng== 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=RTXKxJxi+Ta7e/ZRhL/SVjlJWSqayT5Jh8RhisCjCVM=; b=iRvNToaqh2GKyfGjCdnhPoL71vDXQa/eshCkmz7wn/d5IToP9I1A06XsojIKeiXxlTmK0Apy0k9YQD+oQsl5Cg1TllMy6+zbr4Ie0XDeVdHohC/4rERAVG+X7ectXKQxPrXSaLcSo2SkOvE6l8IwQvGEzq/QEAYsnYks7xsTek7whXaMz+cX1tJEPU8kuRKquktp8t2lIsp86WWzAo/c6255nrmyfp5VvR96Px5KTv8kozWBrvGHEGrboEsrfeEmUaoN15X3MdzmxWJOZdARJWw1u1emB3uuxbNQj+wkW2A9CFNs9HsB8S6r/IHHH8ci8fYTH6MP22vOUkfCURp2oA== 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=RTXKxJxi+Ta7e/ZRhL/SVjlJWSqayT5Jh8RhisCjCVM=; b=YfjZPhZm4K/GlSmJXq0eSxwIcALIGsJLLUBp6yfgBu96jXeGaVvxpFb4WermzNjQJQ8/71cVNJ3pDCPB8WHsQlISHkUcqmdaJ377lHSfsbNR0GyDpcwSVZejiobPEWlnqTsaPlREqj1UFuY2Rtwg5Hha4+GYeO/225TGHJdTG7g= Received: from MW5PR11MB5809.namprd11.prod.outlook.com (2603:10b6:303:197::6) by MWHPR11MB1808.namprd11.prod.outlook.com (2603:10b6:300:10f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.22; Mon, 11 Oct 2021 18:21:42 +0000 Received: from MW5PR11MB5809.namprd11.prod.outlook.com ([fe80::2c31:1470:3036:959b]) by MW5PR11MB5809.namprd11.prod.outlook.com ([fe80::2c31:1470:3036:959b%6]) with mapi id 15.20.4587.026; Mon, 11 Oct 2021 18:21:42 +0000 From: "Zhang, Roy Fan" To: "Ji, Kai" , Akhil Goyal , "dev@dpdk.org" CC: "thomas@monjalon.net" , "david.marchand@redhat.com" , "hemant.agrawal@nxp.com" , "anoobj@marvell.com" , "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" , "rnagadheeraj@marvell.com" , "adwivedi@marvell.com" , "Power, Ciara" Thread-Topic: [PATCH v2 0/5] cryptodev: hide internal structures Thread-Index: AQHXvp2izGQK7LR18kWSzsvlQ41zrqvN9UtAgAASSwCAABMQIA== Date: Mon, 11 Oct 2021 18:21:42 +0000 Message-ID: References: <20210829125139.2173235-1-gakhil@marvell.com> <20211011124309.4066491-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: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fa478593-2660-4ec0-9bdc-08d98ce3f9e5 x-ms-traffictypediagnostic: MWHPR11MB1808: 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: 9Gr8pkVRW3Lm0NbCSPszvymRUFTnr4lln7QqSClU4lkCBnmmNyHlVvOyLWvrft3JM4Nnz9DuIUxAoe1qTi+0Rd3tuv+9HJpxzn3t8sI/GzWyOXo+tfN6OivPMDKqkJ67I1EUuS2/nMSpzJlvZK4g7YSdkoNOk8z+X4FvaFeS+XGJJ5+Ymoyh6ub7VzMyVz64ZgnfvewN/Yjxradj/3N8I6zAhKe4orpngyDpRyoJKQ3KWaErwh4AtWgT8dUVch1FvWQDkTT1/XKnOOMTYQ+xfGCnUHdEqnxnTysziijSV1goGUZ7UkUZjR7iwFpqwMcbQ0F5nOcUUshtdL8mdD3+DmpvKEjVdW8ep2Dwygn8JMVfj2upMCJw8Q5rAL+p8GPGVuyOpvYaPbyWKbdepot/IwJzX+blJLjLw+zZmdR8E3MOVT8OG+nTr/KR8ZtggUKyDBIfwRwROtEYhy8P24B0/P68yjotVkGvDPmpF1tkF+h5YYXsS/YGgjI6n2fIsbnSG6Nz/7+mAHn1HNIy5I3hDYHgJBh22pHVjtmBn57tGGpWAGlUjLdj964/1ak3AtJTqvqoPCKDBXm5f6dpQvmD3Az5yuxnfS8iQigHEMn/FxSXf1wPHUINi+p7LmPnEaqiXH3OPSLvF/6KEpzYdPzErUf7pZ6Ljun2rFxKw3q/b0RIrjc/purNQdyKcKlHKC7QkOmgSHlih29UwlIChM2KAYLcibp9VdaBXq/sc4yAZ84k+8dm5AnEVvMwVITV4buuipzE27lQ9hkpu5U6PR3bRPtkSdnmC5/4H8zS6UjJSZnyrFDfne9aiiiSHNB+98XaR2f9+cUNMorPBboQl6vuxA== 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:(4636009)(366004)(5660300002)(71200400001)(107886003)(2906002)(53546011)(52536014)(508600001)(38100700002)(38070700005)(122000001)(7696005)(6506007)(186003)(26005)(66946007)(66476007)(76116006)(66446008)(64756008)(66556008)(966005)(9686003)(316002)(33656002)(8936002)(86362001)(4326008)(8676002)(110136005)(55016002)(54906003)(7416002)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?9IWhyaXapAWJ7XKtYWs4zHtkObgHbMKQiIyGwHUaq6qS2FSYPfrOsNUE?= =?Windows-1252?Q?mR7+c06t04nyrHbfwX01OUv04OhPtt6TmWD3Wn7rJiHoYZhEMqk4FcD7?= =?Windows-1252?Q?ko8+2j5HJVcVqqaZJNsPdXtsaHN98J3q/sUGYzPIJdXhyf6PtbzwYaCU?= =?Windows-1252?Q?vG0RSz2RJMAUGevPd6oJJszES0YUh241ExRRPbWCQyFSaRuEUmpwF8fo?= =?Windows-1252?Q?jNZZwxzINbcCh4arVqcclAPRAjbNbpaj6dA/EqWd6jIVDAwIPlBTotnA?= =?Windows-1252?Q?gpjY0zPv3/n2Jzet259zRdB+6U40ghy65nIgAGe3CwTaz06ZkkKbK3oP?= =?Windows-1252?Q?p9/EwuFNJ/6myDp+ZAtKUlY5dJL21AL28i2WLCGROnQbOrj1umTcC2/G?= =?Windows-1252?Q?pKYzpa6qsstf/yJtFTFiXC0M5DDz2yhcRUyBGCAaXBJb9kcf6QdGREuB?= =?Windows-1252?Q?nEwt8nCV1E9pjkyY8eZLU12/h57+II645+EX6Gu/tL5Bp8aW7tXOJOPE?= =?Windows-1252?Q?l8itpsfv8ru/CaLKuqx63j6O0uwamXR/GkAmkDTrMxwkmlTQcEKXL8Af?= =?Windows-1252?Q?lgYDswCNWrfOh2NCoZ5OPlf3fOqcDpYvXkXDpk4K4Fyabi/wTdgqxMDw?= =?Windows-1252?Q?QdPkpLiJUh/hAflCRRY4noD5FpvOHVVO9rx4A3qTcxLThfEosPz1rpLt?= =?Windows-1252?Q?4rPoesW2Spk8Dk9yt+KsPTQoidpmh+d4Gn+EoWC5sD69su7uRqPaq2Ki?= =?Windows-1252?Q?Nalq/4OI15XCiVFDUEshD7kSK3Hrdb4Nqtm82V5s3NyhpL1Exvyl+OXY?= =?Windows-1252?Q?kLaseS9HyNnTbeNVFzEsqi0pKh7bZt/XXQTeimbay8hyUAmnepVaSWCf?= =?Windows-1252?Q?/NfHgsBjgkj5BrFBhEA7givOzv3TKmACIP25XQp3ZV0pxMsz1SxckKvr?= =?Windows-1252?Q?+sOmBBpeK9OGwl1hdGQ1Kwd4nV0bqM1qeMp2SKpxOm6D9ex1JknLEVQP?= =?Windows-1252?Q?whH1ctUNNvCla+IndliekwSWirhbgpeisyUd4rYNPG+P11IJkOxy7g86?= =?Windows-1252?Q?J76zhs65ZHcAhpd/VSL5XBk6Ew3+qrQYmHGsQdXsW5zb507qWgE/G+fl?= =?Windows-1252?Q?g3rGGFSRyPvQd11jzgEqGR3ASD7RXAWrhKGGtwzQCE54rKPZvfzY/5bB?= =?Windows-1252?Q?uyAO4n0qxLAsCDoq+1gyUZrvb74Z/51/zIDiGPd53q5yLwKYSUdnOCq0?= =?Windows-1252?Q?GU8bT/AtkqWoEiXk5mVko5wh3Pb/9jY/Nzc0ePLqO82QFJRMI/HKuaRs?= =?Windows-1252?Q?AtVMaoWmMoZKSehoygqvVUdzOqfla14FDqz9rQzlOmqOV2Li213P67tZ?= =?Windows-1252?Q?u2+c3i7Y+8Ji454bgQyaYENp7PRfhdnojLZkmEvIzmP5t9xLTuox9EBB?= 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: fa478593-2660-4ec0-9bdc-08d98ce3f9e5 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2021 18:21:42.4723 (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: DSLXXAN0eL1HoOqA8dOGAy39hXitSuS8CuN02uTJ3lWFxTDtUSv1hVAUSLM9fLc7JV6M2NE6m5ycZ6eNDHl18w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1808 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 0/5] cryptodev: hide internal structures 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 Kai and Akhil, Thanks Kai for finding the problem.=20 To resolve the seg fault for multi-process and keep the structure private, Instead of creating the fp_ops we may ditch making rte_cryptodev_enqueue_burst() and rte_cryptodev_dequeue_burst()=20 inline, and keep everything else as it was? To me these inlines looks not very useful on performance wise anyway. Regards, Fan > -----Original Message----- > From: Ji, Kai > Sent: Monday, October 11, 2021 6:07 PM > To: Zhang, Roy Fan ; Akhil Goyal > ; dev@dpdk.org > Cc: thomas@monjalon.net; david.marchand@redhat.com; > hemant.agrawal@nxp.com; anoobj@marvell.com; 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; rnagadheeraj@marvell.com; > adwivedi@marvell.com; Power, Ciara > Subject: RE: [PATCH v2 0/5] cryptodev: hide internal structures >=20 > Hi Akhil, >=20 > Just ran a quick mutli process test against the patch set, unfortunately = it > failed on the secondary process enqueue or dequeue. >=20 > USER1: Configuring vector 0, using session 0 > USER1: Start enqueuing packets on dev 0 qp 0 > USER1: Start dequeuing packets on dev 0 qp 0 > USER1: Enqueuing - Dequeueing -Segmentation fault (core dumped) >=20 > It will happen on any PMD type. >=20 > Regards >=20 > Kai >=20 >=20 > > -----Original Message----- > > From: dev On Behalf Of Zhang, Roy Fan > > Sent: Monday, October 11, 2021 5:03 PM > > To: Akhil Goyal ; dev@dpdk.org > > Cc: thomas@monjalon.net; david.marchand@redhat.com; > > hemant.agrawal@nxp.com; anoobj@marvell.com; 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; rnagadheeraj@marvell.com; > > adwivedi@marvell.com; Power, Ciara > > Subject: Re: [dpdk-dev] [PATCH v2 0/5] cryptodev: hide internal structu= res > > > > Hi Akhil, > > > > The approach looks great but we may have to check if it works in multi- > > process environment - since all enqueue/dequeue handlers are set by > > primary process the secondary process may not recognize the fp_ops data= . > > > > We will run a quick test to see if it is true. > > > > Regards, > > Fan > > > > > -----Original Message----- > > > From: Akhil Goyal > > > Sent: Monday, October 11, 2021 1:43 PM > > > To: dev@dpdk.org > > > Cc: thomas@monjalon.net; david.marchand@redhat.com; > > > hemant.agrawal@nxp.com; anoobj@marvell.com; De Lara Guarch, Pablo > > > ; Trahe, Fiona > > > ; Doherty, Declan ; > > > matan@nvidia.com; g.singh@nxp.com; Zhang, Roy Fan > > > ; jianjay.zhou@huawei.com; > > asomalap@amd.com; > > > ruifeng.wang@arm.com; Ananyev, Konstantin > > > ; Nicolau, Radu > > > ; ajit.khaparde@broadcom.com; > > > rnagadheeraj@marvell.com; adwivedi@marvell.com; Power, Ciara > > > ; Akhil Goyal > > > Subject: [PATCH v2 0/5] cryptodev: hide internal structures > > > > > > Structures rte_cryptodev and rte_cryptodev_data are not supposed to > be > > > directly used by the application. These are made public as they are > > > used by inline datapath public APIs. > > > This patchset, creates a new rte_cryptodev_core.h file which helps in > > > defining a data structure to hold datapath APIs in a flat array based > > > on the device identifier which is filled by the PMD. > > > > > > Similar series for ethdev and eventdev are also floated on ML. > > > https://patchwork.dpdk.org/project/dpdk/list/?series=3D19428 > > > https://patchwork.dpdk.org/project/dpdk/list/?series=3D19405 > > > > > > changes in v2: align with the latest versions of above series. > > > > > > Akhil Goyal (5): > > > cryptodev: separate out internal structures > > > cryptodev: allocate max space for internal qp array > > > cryptodev: move inline APIs into separate structure > > > cryptodev: update fast path APIs to use new flat array > > > cryptodev: move device specific structures > > > > > > drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 1 - > > > drivers/crypto/ccp/ccp_dev.h | 2 +- > > > drivers/crypto/cnxk/cn10k_ipsec.c | 2 +- > > > drivers/crypto/cnxk/cn9k_ipsec.c | 2 +- > > > .../crypto/cnxk/cnxk_cryptodev_capabilities.c | 2 +- > > > drivers/crypto/cnxk/cnxk_cryptodev_sec.c | 2 +- > > > drivers/crypto/nitrox/nitrox_sym_reqmgr.c | 2 +- > > > drivers/crypto/octeontx/otx_cryptodev.c | 1 - > > > .../crypto/octeontx/otx_cryptodev_hw_access.c | 2 +- > > > .../crypto/octeontx/otx_cryptodev_hw_access.h | 2 +- > > > drivers/crypto/octeontx/otx_cryptodev_ops.h | 2 +- > > > .../crypto/octeontx2/otx2_cryptodev_mbox.c | 2 +- > > > drivers/crypto/scheduler/scheduler_failover.c | 2 +- > > > .../crypto/scheduler/scheduler_multicore.c | 2 +- > > > .../scheduler/scheduler_pkt_size_distr.c | 2 +- > > > .../crypto/scheduler/scheduler_roundrobin.c | 2 +- > > > drivers/event/cnxk/cnxk_eventdev.h | 2 +- > > > drivers/event/dpaa/dpaa_eventdev.c | 2 +- > > > drivers/event/dpaa2/dpaa2_eventdev.c | 2 +- > > > drivers/event/octeontx/ssovf_evdev.c | 2 +- > > > .../event/octeontx2/otx2_evdev_crypto_adptr.c | 2 +- > > > lib/cryptodev/cryptodev_pmd.c | 51 +++ > > > lib/cryptodev/cryptodev_pmd.h | 82 +++- > > > lib/cryptodev/meson.build | 4 +- > > > lib/cryptodev/rte_cryptodev.c | 50 ++- > > > lib/cryptodev/rte_cryptodev.h | 367 +++++++---------= -- > > > lib/cryptodev/rte_cryptodev_core.h | 62 +++ > > > lib/cryptodev/version.map | 7 +- > > > 28 files changed, 398 insertions(+), 265 deletions(-) create mode > > > 100644 lib/cryptodev/rte_cryptodev_core.h > > > > > > -- > > > 2.25.1