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 406C6A0C41; Tue, 19 Oct 2021 18:01:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 22DBB41156; Tue, 19 Oct 2021 18:01:38 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id AAE03410FC for ; Tue, 19 Oct 2021 18:01:36 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10142"; a="227325606" X-IronPort-AV: E=Sophos;i="5.87,164,1631602800"; d="scan'208";a="227325606" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2021 09:00:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,164,1631602800"; d="scan'208";a="531493684" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga008.fm.intel.com with ESMTP; 19 Oct 2021 09:00:55 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 19 Oct 2021 09:00:54 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 19 Oct 2021 09:00:54 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.48) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 19 Oct 2021 09:00:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gh6DzgIOBnd44kVE+xgRVtkNybZ2Woc1+0Y/0bpphCvrs8mFO3NZQ0guneYBEnS/R/4ztpUFgUaYJokDUlucLD6kZ23CD9aTKCya7cnrgylmnJON7DyALokVXpSnCVxlT9zbNVp6S4jy3b70pFnUM1r53gaWgB0RmaQKLxOdFIVdGadxGC3VO3TXjoYA4KxIv+BDp/RkGMGO6010ZOmQLONu0pFecxVebMkmJToZaAViUBMaFmegL0n/l5K16eEACNUoRAN/EM8psp5FlMDp+iENPxp3O2gu7BlgdJbprGllgcdqCSMke3Z8Qy14ySWiXGnQWoo44dsF9pulcyRrvA== 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=7UGPLLiNnT4KEBP1DvFBv9N3attrg3VjQ41PznvokF8=; b=Rps8PUze4JkIdmmNplP0WNPD+zfg5l5sg4GRQXrBDPeFCdAxJPySubQAEDmWNBfhR7agvBk1tKIjCPlk1ZjyXRXP2wX0210OoBusPP9vzLD6Qkfurq1hibFcnGjCIGUwaSsQUVJW0HKUcCmXN6js0TZhFkNLddk9z1SyxoUzdBBnmh3ROobt23qKd9sa2QL0TDydYRxSPkhuUaLZwsPspg8o5JZRjXTl7j3d8Z4LZGeyDYHL3kMNM17NaekTUC3OoJcvgWhcyP4OUJhPytkdnMn6CU9rEo5TjP2lQhur6QnfcTEpa2h1uAjd3RDf/PR7DbSIGBkL3Q7HYM9VgCFLYQ== 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=7UGPLLiNnT4KEBP1DvFBv9N3attrg3VjQ41PznvokF8=; b=LR9D2sz6xnZEZBFmfslT/ODzlq5KpiDgBK8hOq+hcqqBDPkpLwB0/H7y9WZZQN4Wrw1iPmSLOe8mFXhph0jgJtjtKxZMAMtSH8dPmGZ206QWO9cLfJ6LA58Cj2Fm9t7igu/5XiPAQ5/jyTqgGKYCN1CuLncmqr/8kaGPpcpNIqY= Received: from MW5PR11MB5809.namprd11.prod.outlook.com (2603:10b6:303:197::6) by MWHPR1101MB2253.namprd11.prod.outlook.com (2603:10b6:301:52::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Tue, 19 Oct 2021 16:00:52 +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; Tue, 19 Oct 2021 16:00:52 +0000 From: "Zhang, Roy Fan" 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" , "Troy, Rebecca" Thread-Topic: [PATCH v3 3/7] cryptodev: move inline APIs into separate structure Thread-Index: AQHXxC5zcPavxcVjNEe9z+Zec4/FdavafEUg Date: Tue, 19 Oct 2021 16:00:52 +0000 Message-ID: References: <20211011124309.4066491-1-gakhil@marvell.com> <20211018144201.2028022-1-gakhil@marvell.com> <20211018144201.2028022-4-gakhil@marvell.com> In-Reply-To: <20211018144201.2028022-4-gakhil@marvell.com> 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: 9b7a84f5-c663-4e3b-5f3c-08d99319a08e x-ms-traffictypediagnostic: MWHPR1101MB2253: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2276; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: QAljPaGmgRk/0ol0lOWlm7m/gsapJTman18g9k381IJauWanVldRoOeIJJJu1BZXaeGRn879Rlrdfw4LoxZtlnGQFFWZueS8DHJSldA5JoAOSFb9n9Sn7V670pi4NP0vJetI0ctnRVL5b/+6s01gXQ5MQA2sbW1YlP6M9UBaEtjvVu3TlCTfEWQfk13gvfHqmSDH1jaytn3wa1TmkCjEQtV33ML1E9F6JZICwzAI/BZNCe7egQmjB1W7Mtg6QLKWT4e1qbjY9cbVl5HHR/6WzFGCRyxydK9v7om+c/yvTCXRUE4gLLtkcJG4BMSuq1d6nTD+oL18/l1mbln873f3JQkNTHAelPbaVLu8Ecef3oV5+b9OXvI4pLW17ccYHbHsN8RhBhynfpz4MSbRUZK9Qn4LK1p4KXbIorSosgOBXRqmd+oUJNoX3mrCq9vXt4NTBvk0DmioA6J98W94BpjWECguTNzogBuCtOzBrjUM1WnUky2vMcVf6j2euuNtinl4dh41sUqWR/SYGPeXRDZ5qYfK5cCSY4g4h4+XsgGd87p/8SWlIFUI4z28yGLui1qvRyfy69deOpnMZQwMZtdyhP1Yq0pL3hL2VDcwRrbDJGi0TspzkLFB/7m244/tXYXiXeV260WJnsvWHd5mDmCyOwyUqTzpI2y+Ty8KYBmCIV3Vz+IGMRC07oVh7Ar8BaJbTxPUlRvqiTu9BDFEzYFoNg== 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)(110136005)(4326008)(54906003)(38100700002)(82960400001)(7696005)(76116006)(38070700005)(2906002)(66556008)(508600001)(6506007)(66946007)(316002)(8676002)(5660300002)(55016002)(122000001)(8936002)(53546011)(9686003)(7416002)(71200400001)(64756008)(26005)(186003)(83380400001)(66446008)(107886003)(33656002)(66476007)(52536014)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?kJwqkrVCC60sQMn+0OXWiUD6zGhSQs6KOxwpXdhbVyrSE3vH+xVO5Ecl?= =?Windows-1252?Q?45Nrtxqn5q6S/oQW3AoenQGj32YAIklbV6pFw3B0sRgg1RyOFMkLuqDs?= =?Windows-1252?Q?S+Hgkh+vWpVdjLYH+qauh5YDq2XbiavX5ZAIxGM3ade+3ChWCbGgxyuJ?= =?Windows-1252?Q?ewrPODPFEufjgpLunaiNdR2Q2ZqRxO7NJPc6eg/yD7rxw5M4nthvwFKP?= =?Windows-1252?Q?cFWPBf/EyiEflS7hFxFDV/03wYS9/EtQnIkaP7hOu9ZrZ7+eodJ71TnD?= =?Windows-1252?Q?gYFA//goyedCeCVCONbmbFUZX+TG1NSMNxK7++4Ajh80lyx+4iAo90v6?= =?Windows-1252?Q?5qSOrpFouCidBWX58thhNJ8tc85JYUXg56Nu7mND5cgaYqsT4gl8bxqN?= =?Windows-1252?Q?CQ25RLO1mPB+IKH/EZXkPo/bhAWMmgzXJNYJ99Kkb0dLbW/uPmXRIiBk?= =?Windows-1252?Q?ITjagBFrce1b/ISUGTxV/eL+udU07ZtjSKukdUYh5sPytGJWb8Dvtayw?= =?Windows-1252?Q?XceIhM9CrG07QMHmMtg5Dbb5xhbwzpJgN5gM4NadnQLIhzbsw4X066MH?= =?Windows-1252?Q?x+xIoo4Bh+BdnzyPzpMQlf1OOm5M4b7nZVCywWabI+/whUw3APro39fJ?= =?Windows-1252?Q?LzSPoAtT3+rFQLaJqUzgbbuZyOu/6uuEgZAihkcx/typl8jM5CAixTUV?= =?Windows-1252?Q?kFEwLS3SveGJ5vJfNm2u5PrdC7rAr0t4Q1NPEriyMC8ccpg0n/Ncl+tg?= =?Windows-1252?Q?dUtG1LPTu82BkWHI7KXZZ1zwTV1Gdh3wjC8Ht2tJX9Va9ezlkJ2Kz6rF?= =?Windows-1252?Q?Z+xf81Js4deLU/i1v3Xju/V6+u+OLj1gsGhKiYnOQ549zquMyarkd94x?= =?Windows-1252?Q?D6pe3TqExzTiliUmghloGUPYIrnTaAaSqWiBTCOQkK6SnOMe/UGqap7p?= =?Windows-1252?Q?WPPKVpR1q1uQZueomoIlieUqIHFDcN8kcMahOlQqz0efdwDxBvcMskh3?= =?Windows-1252?Q?Hvz48YIzuHXTfXvqLYYU0DNX8IREfCj7ShfLkthqpV2YK/oBka5hxkC4?= =?Windows-1252?Q?3fsU9LvVLIU4IKtwjhxgeNy1mxSrLCplYELqHKUaO5lFBGHkEr9njj/z?= =?Windows-1252?Q?mnbiUbRIvLsln+4V05eMy4E0doLjUMcVvpNnB9GB7qtPYScI3LWYJfWQ?= =?Windows-1252?Q?gNIMjnduim572eWrL2LDnajQoIprdDWk9OgbMyb5oet6FvzleM0EwIfm?= =?Windows-1252?Q?pNYOB5LO4YU7GsgwneFdE/mtbFsectalEtWrBc1A8dxi8TdK6bzkKPiP?= =?Windows-1252?Q?ZROhP5X3BUwqviIxpSbdx0gwwLSSu4cmdDIiFQLxxVX+FhoUP6j86FH5?= =?Windows-1252?Q?A2J8urqB81H/LxXAXnydFc3wcr8oH0b5bvI=3D?= 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: 9b7a84f5-c663-4e3b-5f3c-08d99319a08e X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Oct 2021 16:00:52.5183 (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: LVHc3Z6zpWtljP02TX+93NyF7uXW7MhTUGrmlwfG+Q14q87vK6QELYtFFO8C+fmLZXtm94LNbnCCK28MkxLuRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2253 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 3/7] cryptodev: move inline APIs into separate structure 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" Apart from the scheduler PMD changes required mentioned by Ciara, re-acking this patch as all doubts are cleared on our end. Acked-by: Fan Zhang > -----Original Message----- > From: Akhil Goyal > Sent: Monday, October 18, 2021 3:42 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 ; Troy, Rebecca > > Subject: [PATCH v3 3/7] cryptodev: move inline APIs into separate structu= re >=20 > Move fastpath inline function pointers from rte_cryptodev into a > separate structure accessed via a flat array. > The intension is to make rte_cryptodev and related structures private > to avoid future API/ABI breakages. >=20 > Signed-off-by: Akhil Goyal > Tested-by: Rebecca Troy > Acked-by: Fan Zhang > --- > lib/cryptodev/cryptodev_pmd.c | 53 > +++++++++++++++++++++++++++++- > lib/cryptodev/cryptodev_pmd.h | 11 +++++++ > lib/cryptodev/rte_cryptodev.c | 19 +++++++++++ > lib/cryptodev/rte_cryptodev_core.h | 29 ++++++++++++++++ > lib/cryptodev/version.map | 5 +++ > 5 files changed, 116 insertions(+), 1 deletion(-) >=20 > diff --git a/lib/cryptodev/cryptodev_pmd.c > b/lib/cryptodev/cryptodev_pmd.c > index 44a70ecb35..fd74543682 100644 > --- a/lib/cryptodev/cryptodev_pmd.c > +++ b/lib/cryptodev/cryptodev_pmd.c > @@ -3,7 +3,7 @@ > */ >=20 > #include > - > +#include > #include > #include >=20 > @@ -160,3 +160,54 @@ rte_cryptodev_pmd_destroy(struct rte_cryptodev > *cryptodev) >=20 > return 0; > } > + > +static uint16_t > +dummy_crypto_enqueue_burst(__rte_unused void *qp, > + __rte_unused struct rte_crypto_op **ops, > + __rte_unused uint16_t nb_ops) > +{ > + CDEV_LOG_ERR( > + "crypto enqueue burst requested for unconfigured device"); > + rte_errno =3D ENOTSUP; > + return 0; > +} > + > +static uint16_t > +dummy_crypto_dequeue_burst(__rte_unused void *qp, > + __rte_unused struct rte_crypto_op **ops, > + __rte_unused uint16_t nb_ops) > +{ > + CDEV_LOG_ERR( > + "crypto dequeue burst requested for unconfigured device"); > + rte_errno =3D ENOTSUP; > + return 0; > +} > + > +void > +cryptodev_fp_ops_reset(struct rte_crypto_fp_ops *fp_ops) > +{ > + static struct rte_cryptodev_cb_rcu > dummy_cb[RTE_MAX_QUEUES_PER_PORT]; > + static void *dummy_data[RTE_MAX_QUEUES_PER_PORT]; > + static const struct rte_crypto_fp_ops dummy =3D { > + .enqueue_burst =3D dummy_crypto_enqueue_burst, > + .dequeue_burst =3D dummy_crypto_dequeue_burst, > + .qp =3D { > + .data =3D dummy_data, > + .enq_cb =3D dummy_cb, > + .deq_cb =3D dummy_cb, > + }, > + }; > + > + *fp_ops =3D dummy; > +} > + > +void > +cryptodev_fp_ops_set(struct rte_crypto_fp_ops *fp_ops, > + const struct rte_cryptodev *dev) > +{ > + fp_ops->enqueue_burst =3D dev->enqueue_burst; > + fp_ops->dequeue_burst =3D dev->dequeue_burst; > + fp_ops->qp.data =3D dev->data->queue_pairs; > + fp_ops->qp.enq_cb =3D dev->enq_cbs; > + fp_ops->qp.deq_cb =3D dev->deq_cbs; > +} > diff --git a/lib/cryptodev/cryptodev_pmd.h > b/lib/cryptodev/cryptodev_pmd.h > index 36606dd10b..a71edbb991 100644 > --- a/lib/cryptodev/cryptodev_pmd.h > +++ b/lib/cryptodev/cryptodev_pmd.h > @@ -516,6 +516,17 @@ RTE_INIT(init_ ##driver_id)\ > driver_id =3D rte_cryptodev_allocate_driver(&crypto_drv, &(drv));\ > } >=20 > +/* Reset crypto device fastpath APIs to dummy values. */ > +__rte_internal > +void > +cryptodev_fp_ops_reset(struct rte_crypto_fp_ops *fp_ops); > + > +/* Setup crypto device fastpath APIs. */ > +__rte_internal > +void > +cryptodev_fp_ops_set(struct rte_crypto_fp_ops *fp_ops, > + const struct rte_cryptodev *dev); > + > static inline void * > get_sym_session_private_data(const struct rte_cryptodev_sym_session > *sess, > uint8_t driver_id) { > diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.= c > index eb86e629aa..305e013ebb 100644 > --- a/lib/cryptodev/rte_cryptodev.c > +++ b/lib/cryptodev/rte_cryptodev.c > @@ -53,6 +53,9 @@ static struct rte_cryptodev_global cryptodev_globals = =3D { > .nb_devs =3D 0 > }; >=20 > +/* Public fastpath APIs. */ > +struct rte_crypto_fp_ops rte_crypto_fp_ops[RTE_CRYPTO_MAX_DEVS]; > + > /* spinlock for crypto device callbacks */ > static rte_spinlock_t rte_cryptodev_cb_lock =3D RTE_SPINLOCK_INITIALIZER= ; >=20 > @@ -917,6 +920,8 @@ rte_cryptodev_pmd_release_device(struct > rte_cryptodev *cryptodev) >=20 > dev_id =3D cryptodev->data->dev_id; >=20 > + cryptodev_fp_ops_reset(rte_crypto_fp_ops + dev_id); > + > /* Close device only if device operations have been set */ > if (cryptodev->dev_ops) { > ret =3D rte_cryptodev_close(dev_id); > @@ -1080,6 +1085,9 @@ rte_cryptodev_start(uint8_t dev_id) > } >=20 > diag =3D (*dev->dev_ops->dev_start)(dev); > + /* expose selection of PMD fast-path functions */ > + cryptodev_fp_ops_set(rte_crypto_fp_ops + dev_id, dev); > + > rte_cryptodev_trace_start(dev_id, diag); > if (diag =3D=3D 0) > dev->data->dev_started =3D 1; > @@ -1109,6 +1117,9 @@ rte_cryptodev_stop(uint8_t dev_id) > return; > } >=20 > + /* point fast-path functions to dummy ones */ > + cryptodev_fp_ops_reset(rte_crypto_fp_ops + dev_id); > + > (*dev->dev_ops->dev_stop)(dev); > rte_cryptodev_trace_stop(dev_id); > dev->data->dev_started =3D 0; > @@ -2411,3 +2422,11 @@ rte_cryptodev_allocate_driver(struct > cryptodev_driver *crypto_drv, >=20 > return nb_drivers++; > } > + > +RTE_INIT(cryptodev_init_fp_ops) > +{ > + uint32_t i; > + > + for (i =3D 0; i !=3D RTE_DIM(rte_crypto_fp_ops); i++) > + cryptodev_fp_ops_reset(rte_crypto_fp_ops + i); > +} > diff --git a/lib/cryptodev/rte_cryptodev_core.h > b/lib/cryptodev/rte_cryptodev_core.h > index 1633e55889..e9e9a44b3c 100644 > --- a/lib/cryptodev/rte_cryptodev_core.h > +++ b/lib/cryptodev/rte_cryptodev_core.h > @@ -25,6 +25,35 @@ typedef uint16_t (*enqueue_pkt_burst_t)(void *qp, > struct rte_crypto_op **ops, uint16_t nb_ops); > /**< Enqueue packets for processing on queue pair of a device. */ >=20 > +/** > + * @internal > + * Structure used to hold opaque pointers to internal ethdev Rx/Tx > + * queues data. > + * The main purpose to expose these pointers at all - allow compiler > + * to fetch this data for fast-path cryptodev inline functions in advanc= e. > + */ > +struct rte_cryptodev_qpdata { > + /** points to array of internal queue pair data pointers. */ > + void **data; > + /** points to array of enqueue callback data pointers */ > + struct rte_cryptodev_cb_rcu *enq_cb; > + /** points to array of dequeue callback data pointers */ > + struct rte_cryptodev_cb_rcu *deq_cb; > +}; > + > +struct rte_crypto_fp_ops { > + /** PMD enqueue burst function. */ > + enqueue_pkt_burst_t enqueue_burst; > + /** PMD dequeue burst function. */ > + dequeue_pkt_burst_t dequeue_burst; > + /** Internal queue pair data pointers. */ > + struct rte_cryptodev_qpdata qp; > + /** Reserved for future ops. */ > + uintptr_t reserved[4]; > +} __rte_cache_aligned; > + > +extern struct rte_crypto_fp_ops > rte_crypto_fp_ops[RTE_CRYPTO_MAX_DEVS]; > + > /** > * @internal > * The data part, with no function pointers, associated with each device= . > diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map > index 43cf937e40..ed62ced221 100644 > --- a/lib/cryptodev/version.map > +++ b/lib/cryptodev/version.map > @@ -45,6 +45,9 @@ DPDK_22 { > rte_cryptodev_sym_session_init; > rte_cryptodevs; >=20 > + #added in 21.11 > + rte_crypto_fp_ops; > + > local: *; > }; >=20 > @@ -109,6 +112,8 @@ EXPERIMENTAL { > INTERNAL { > global: >=20 > + cryptodev_fp_ops_reset; > + cryptodev_fp_ops_set; > rte_cryptodev_allocate_driver; > rte_cryptodev_pmd_allocate; > rte_cryptodev_pmd_callback_process; > -- > 2.25.1