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 DC7A9A04DD; Wed, 28 Oct 2020 15:08:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EC8F7CCA8; Wed, 28 Oct 2020 15:05:00 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 96536CB3E for ; Wed, 28 Oct 2020 15:04:23 +0100 (CET) IronPort-SDR: c2ZUnWfjtvWrHNW0ays8Jyy6DlkPMgHWNEql8eKpwRcqG6Jwnc1z+iMni7yfHsPnIQwWXW9zG0 bxXG1q+lOZ8w== X-IronPort-AV: E=McAfee;i="6000,8403,9787"; a="148116838" X-IronPort-AV: E=Sophos;i="5.77,426,1596524400"; d="scan'208";a="148116838" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 07:04:11 -0700 IronPort-SDR: Tt3iSAUhoYTmm6aG6iNh1BE6dJCFr9T4dtD7AoNy1XsPOe50vsGTNN4EeBDCDW7x95L0W2W+r8 a59pICxWOp4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,426,1596524400"; d="scan'208";a="536241484" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga005.jf.intel.com with ESMTP; 28 Oct 2020 07:04:09 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 28 Oct 2020 07:04:05 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 28 Oct 2020 07:04:05 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.177) 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.1713.5; Wed, 28 Oct 2020 07:04:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FE3/940MbktcG/CsrACNvn0cE3/EsP9J9zjTAtvZ1m1fUcTQt8IgBO6NlM2+Nc2GLjLUnf6RljT7QfnJXA7FfTMOF/xwEMm+k2FkM4bP2eWk1M6n3KRATobUjhSYVQFnH9Hdvswqn8orBDiDKQ0c/jrKlzFK8z7AloEpURDgeFw+mhlbdcgASSVp+4D9jG8PTaHGZe7HiDKuP84BoqprC9RHkdgniKUyS8PQq6mW9uxtyyJP5LY5okbmqBenq+628hJkRs7Cid8LnnuCk7ARlY71NAmd/bVThVaphlVr6pWuo2RTsn7cHy3B8E1fp2lQp99RDOaYRB8JfRWVH9mV7w== 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=1BeuMBn1BX0vpbxJ3/F3XEzeLnRYJNfDOqUllsnNPPo=; b=Nur7r6qRwyZX2Xh/WQoBgtqI99w/IO8gsCwCRCuURya7qUYflfWyOJ+BQ0TGj57BatJht3uer7RDHY91iiGpZdIUltSC7FlCnQh5oVKBDwuA3hUwJuFDbx2VaS2nLoog8FTfLZx/nz1uCDNAw5Hwz+r17/bu7fyKxFLiGAfiuSAKHrhuLJvwB4SB3zRkHkEA8eEgpuYqOtNer5VFaNQH6+nHIz0QcaZZ66IaDUzE0tesnwWcX22r7AK3FgbsnqzLDPeu4zybAgJ/snU/M/93la52SEnYDeGGhpKJU1ch9oJ+YPLBteIe96Fd8Ee+zJ5EoGBUy+qJBSC1aXliH5go4A== 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=1BeuMBn1BX0vpbxJ3/F3XEzeLnRYJNfDOqUllsnNPPo=; b=I0BKizMUWZ5JErLdphR8SoANibDCVe+aO+9nF4yN15kFuurEgr4NIfH0uZr6DTX7EGVjVcSG8M2xGIxrPL7rpSzMyymMxjSYcrn2t1OM/i6UhSvV4N02MDlC4v3lHTLO3CePNBXR9xdV89V1aZ//lCgB/PcnCYBBKm3cjGXi5+c= Received: from MWHPR11MB1838.namprd11.prod.outlook.com (2603:10b6:300:10c::11) by MWHPR1101MB2222.namprd11.prod.outlook.com (2603:10b6:301:57::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.27; Wed, 28 Oct 2020 14:03:57 +0000 Received: from MWHPR11MB1838.namprd11.prod.outlook.com ([fe80::20fb:cc03:ce89:f0ea]) by MWHPR11MB1838.namprd11.prod.outlook.com ([fe80::20fb:cc03:ce89:f0ea%7]) with mapi id 15.20.3499.018; Wed, 28 Oct 2020 14:03:57 +0000 From: "Gujjar, Abhinandan S" To: "Ananyev, Konstantin" , "dev@dpdk.org" , "Doherty, Declan" , "akhil.goyal@nxp.com" , "Honnappa.Nagarahalli@arm.com" CC: "Vangati, Narender" , "jerinj@marvell.com" Thread-Topic: [v5 1/2] cryptodev: support enqueue & dequeue callback functions Thread-Index: AQHWrQKwagnNbx6gy0G9nubZPUtq1qmtAcQAgAAKPcA= Date: Wed, 28 Oct 2020 14:03:57 +0000 Message-ID: References: <1603753767-79295-1-git-send-email-abhinandan.gujjar@intel.com> <1603753767-79295-2-git-send-email-abhinandan.gujjar@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: [103.5.135.70] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f4df3ec9-1ac1-4907-389b-08d87b4a5034 x-ms-traffictypediagnostic: MWHPR1101MB2222: 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:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LKGythv+n1Zoyi9ge3bslf3B8cfi0K50LXlo0rNgaNXKser0ZkY+/oTnxb1o+wONODev15UZFT/KG2QyeYigop20C3o67VvAr86gRqXkzeAQzqb3j2qkUu2Z7fpF2/hSDbzX8rX7yRSvh2JLzvzQI5b6LzX7eesF8zS8qNusX/Wqr3AN2/2aAg9NX9hbdAmdyKmSBbpMxq1KnzXDameH+8MRXMNl68814MVZefAJPSP0r4eNAwXGUUeYYYrLgDMCK9XedJemQRqMxNNIay5HO8ewhUWAwnA/urI5euYMEKDmrgW5dXNGyI+1EEgKrU2X x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1838.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(396003)(346002)(136003)(39860400002)(366004)(8936002)(71200400001)(53546011)(8676002)(6506007)(4326008)(52536014)(33656002)(66446008)(64756008)(66556008)(66476007)(66946007)(76116006)(7696005)(5660300002)(186003)(86362001)(83380400001)(110136005)(316002)(54906003)(55236004)(9686003)(55016002)(30864003)(2906002)(26005)(478600001)(559001)(579004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: gVVeVlrkbicfnaZ20+SRKkQOm4M7hW8NriGRD+iPVh6dlEwd4FLHKuf16hLw7CwAyUYkSCwkHBoXX/ki2RVf2+unrQ/ObTOE3zg+JUqFCuLdt+Cf1xQQbJ4cAhpqtC1MgbEYGJdx02dm1mQmlTN/6j6kYT/BrWgJiJJLnchSngszLhb1qW/WAZznZiewPy6FFgMGm1h5gZV3oB9r4LkJHN7JD8rlSK4zzhtXKaxpxzMnlRjaVTCjJvR2FKok2RXgzXBipVT/JpCHbXlkMETvEqz8IuGWWjNU4bl4kou8YSfD0tyehItmydfnMB8r2N/a99EFk46l0Ud7mW3aeXlfZ8Wudtl6GKKL/io3nAMOzEJL1Hz6G3NfmVJpdEH+NUS37ZF9NZq82y/o387IXlji7BNYqm5HmdLKMyN9x5pC03pMbK96x03cbGDE59uSlF4+KDrbT/XV8/PCq+D30/O06c4n8qsS1WCSi2wYWPf4Fic/PiE013amQ5T2I6FJnoMKeYS1u4YBTX+dDgIr+tycCAqdXaCuy8UrvZ3qW+83WHbJDA30EucSPBb1JcdzeF3OiRRXOQ3zl7tP6nEKPlWVU8bdUjGZhdmBnuJxkIRPcBte9jS5JG4aNRq6SzhjoDh6hnw0XyKVwUjEEwGJbrtL5A== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1838.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4df3ec9-1ac1-4907-389b-08d87b4a5034 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Oct 2020 14:03:57.4521 (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: 4w4XHsy5gX8B1FbvDMyGIh3n0/1PTBy+JnqRWxux3kXORAtUsAXOpUpLQblfbFxB3yKPDsti1Y/vJSZG0m14ck0po+ocBWaU6gw0Bmpihnc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2222 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [v5 1/2] cryptodev: support enqueue & dequeue callback functions 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" > -----Original Message----- > From: Ananyev, Konstantin > Sent: Wednesday, October 28, 2020 6:56 PM > To: Gujjar, Abhinandan S ; dev@dpdk.org; > Doherty, Declan ; akhil.goyal@nxp.com; > Honnappa.Nagarahalli@arm.com > Cc: Vangati, Narender ; jerinj@marvell.com > Subject: RE: [v5 1/2] cryptodev: support enqueue & dequeue callback funct= ions >=20 >=20 > > This patch adds APIs to add/remove callback functions on crypto > > enqueue/dequeue burst. The callback function will be called for each > > burst of crypto ops received on a given crypto device queue pair. > > > > Signed-off-by: Abhinandan Gujjar > > Acked-by: Konstantin Ananyev > > --- > > config/rte_config.h | 1 + > > doc/guides/prog_guide/cryptodev_lib.rst | 47 +++ > > doc/guides/rel_notes/release_20_11.rst | 6 + > > lib/librte_cryptodev/meson.build | 2 +- > > lib/librte_cryptodev/rte_cryptodev.c | 419 > ++++++++++++++++++++++++- > > lib/librte_cryptodev/rte_cryptodev.h | 260 ++++++++++++++- > > lib/librte_cryptodev/rte_cryptodev_version.map | 4 + > > 7 files changed, 736 insertions(+), 3 deletions(-) > > > > diff --git a/config/rte_config.h b/config/rte_config.h index > > 03d90d7..e999d93 100644 > > --- a/config/rte_config.h > > +++ b/config/rte_config.h > > @@ -61,6 +61,7 @@ > > /* cryptodev defines */ > > #define RTE_CRYPTO_MAX_DEVS 64 > > #define RTE_CRYPTODEV_NAME_LEN 64 > > +#define RTE_CRYPTO_CALLBACKS 1 > > > > /* compressdev defines */ > > #define RTE_COMPRESS_MAX_DEVS 64 > > diff --git a/doc/guides/prog_guide/cryptodev_lib.rst > > b/doc/guides/prog_guide/cryptodev_lib.rst > > index 72129e4..9d0ff59 100644 > > --- a/doc/guides/prog_guide/cryptodev_lib.rst > > +++ b/doc/guides/prog_guide/cryptodev_lib.rst > > @@ -338,6 +338,53 @@ start of private data information. The offset is > > counted from the start of the rte_crypto_op including other crypto > > information such as the IVs (since there can be an IV also for authent= ication). > > > > +User callback APIs > > +~~~~~~~~~~~~~~~~~~ > > +The add APIs configures a user callback function to be called for > > +each burst of crypto ops received/sent on a given crypto device queue > > +pair. The return value is a pointer that can be used later to remove > > +the callback API. Application is expected to register a callback > > +function of type ``rte_cryptodev_callback_fn``. Multiple callback > > +functions can be added for a given queue pair. API does not restrict o= n > maximum number of callbacks. > > + > > +Callbacks registered by application would not survive > > +rte_cryptodev_configure() as it reinitializes the callback list. It > > +is user responsibility to remove all installed callbacks before callin= g > rte_cryptodev_configure() to avoid possible memory leakage. > > + > > +So, application is expected to add user callback after > rte_cryptodev_configure(). > > +The callbacks can also be added at the runtime. These callbacks get > > +executed when > ``rte_cryptodev_enqueue_burst``/``rte_cryptodev_dequeue_burst`` is called= . > > + > > +.. code-block:: c > > + > > + struct rte_cryptodev_cb * > > + rte_cryptodev_add_enq_callback(uint8_t dev_id, > > + uint16_t qp_id, > > + rte_cryptodev_callback_fn cb_fn, > > + void *cb_arg); > > + > > + struct rte_cryptodev_cb * > > + rte_cryptodev_add_deq_callback(uint8_t dev_id, > > + uint16_t qp_id, > > + rte_cryptodev_callback_fn cb_fn, > > + void *cb_arg); > > + > > + uint16_t (*rte_cryptodev_callback_fn)(uint16_t dev_id, uint16_t qp_id= , > > + struct rte_crypto_op **ops, uint16_t nb_ops, void > *user_param); > > + > > +The remove API removes a callback function added by > > +``rte_cryptodev_add_enq_callback``/``rte_cryptodev_add_deq_callback''. > > + > > +.. code-block:: c > > + > > + int rte_cryptodev_remove_enq_callback(uint8_t dev_id, > > + uint16_t qp_id, > > + struct rte_cryptodev_cb *cb); > > + > > + int rte_cryptodev_remove_deq_callback(uint8_t dev_id, > > + uint16_t qp_id, > > + struct rte_cryptodev_cb *cb); > > + > > > > Enqueue / Dequeue Burst APIs > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > diff --git a/doc/guides/rel_notes/release_20_11.rst > > b/doc/guides/rel_notes/release_20_11.rst > > index 48717ee..d12fb31 100644 > > --- a/doc/guides/rel_notes/release_20_11.rst > > +++ b/doc/guides/rel_notes/release_20_11.rst > > @@ -174,6 +174,12 @@ New Features > > enqueue/dequeue operations but does not necessarily depends on > > mbufs and cryptodev operation mempools. > > > > +* **Added enqueue & dequeue callback APIs for cryptodev library.** > > + > > + Cryptodev libray is added with enqueue & dequeue callback APIs to > > + enable applications to add/remove user callbacks which gets called > > + for every enqueue/dequeue operation. > > + > > * **Updated the aesni_mb crypto PMD.** > > > > * Added support for AES-ECB 128, 192 and 256. > > diff --git a/lib/librte_cryptodev/meson.build > > b/lib/librte_cryptodev/meson.build > > index c4c6b3b..8c5493f 100644 > > --- a/lib/librte_cryptodev/meson.build > > +++ b/lib/librte_cryptodev/meson.build > > @@ -9,4 +9,4 @@ headers =3D files('rte_cryptodev.h', > > 'rte_crypto.h', > > 'rte_crypto_sym.h', > > 'rte_crypto_asym.h') > > -deps +=3D ['kvargs', 'mbuf'] > > +deps +=3D ['kvargs', 'mbuf', 'rcu'] > > diff --git a/lib/librte_cryptodev/rte_cryptodev.c > > b/lib/librte_cryptodev/rte_cryptodev.c > > index 3d95ac6..677c2ef 100644 > > --- a/lib/librte_cryptodev/rte_cryptodev.c > > +++ b/lib/librte_cryptodev/rte_cryptodev.c > > @@ -448,6 +448,127 @@ struct > rte_cryptodev_sym_session_pool_private_data { > > return 0; > > } > > > > +#ifdef RTE_CRYPTO_CALLBACKS > > +/* spinlock for crypto device enq callbacks */ static rte_spinlock_t > > +rte_cryptodev_callback_lock =3D RTE_SPINLOCK_INITIALIZER; > > + > > +static void > > +cryptodev_cb_cleanup(struct rte_cryptodev *dev) { > > + struct rte_cryptodev_cb_rcu *list; > > + struct rte_cryptodev_cb *cb, *next; > > + uint16_t qp_id; > > + > > + if (dev->enq_cbs =3D=3D NULL && dev->deq_cbs =3D=3D NULL) > > + return; > > + > > + for (qp_id =3D 0; qp_id < dev->data->nb_queue_pairs; qp_id++) { > > + list =3D &dev->enq_cbs[qp_id]; > > + cb =3D list->next; > > + while (cb !=3D NULL) { > > + next =3D cb->next; > > + rte_free(cb); > > + cb =3D next; > > + } > > + > > + rte_free(list->qsbr); > > + } > > + > > + for (qp_id =3D 0; qp_id < dev->data->nb_queue_pairs; qp_id++) { > > + list =3D &dev->deq_cbs[qp_id]; > > + cb =3D list->next; > > + while (cb !=3D NULL) { > > + next =3D cb->next; > > + rte_free(cb); > > + cb =3D next; > > + } > > + > > + rte_free(list->qsbr); > > + } > > + > > + rte_free(dev->enq_cbs); > > + dev->enq_cbs =3D NULL; > > + rte_free(dev->deq_cbs); > > + dev->deq_cbs =3D NULL; > > +} > > + > > +static int > > +cryptodev_cb_init(struct rte_cryptodev *dev) { > > + struct rte_cryptodev_cb_rcu *list; > > + struct rte_rcu_qsbr *qsbr; > > + uint16_t qp_id; > > + size_t size; > > + > > + /* Max thread set to 1, as one DP thread accessing a queue-pair */ > > + const uint32_t max_threads =3D 1; > > + > > + dev->enq_cbs =3D rte_zmalloc(NULL, > > + sizeof(struct rte_cryptodev_cb_rcu) * > > + dev->data->nb_queue_pairs, 0); > > + if (dev->enq_cbs =3D=3D NULL) { > > + CDEV_LOG_ERR("Failed to allocate memory for enq > callbacks"); > > + rte_errno =3D ENOMEM; >=20 > As a nit - if this function returns an error code as return value, no poi= nt to > update rte_errno too. Ok >=20 > > + return -ENOMEM; > > + } > > + > > + dev->deq_cbs =3D rte_zmalloc(NULL, > > + sizeof(struct rte_cryptodev_cb_rcu) * > > + dev->data->nb_queue_pairs, 0); > > + if (dev->deq_cbs =3D=3D NULL) { > > + CDEV_LOG_ERR("Failed to allocate memory for deq > callbacks"); > > + rte_free(dev->enq_cbs); > > + rte_errno =3D ENOMEM; > > + return -ENOMEM; > > + } > > + > > + /* Create RCU QSBR variable */ > > + size =3D rte_rcu_qsbr_get_memsize(max_threads); > > + > > + for (qp_id =3D 0; qp_id < dev->data->nb_queue_pairs; qp_id++) { > > + list =3D &dev->enq_cbs[qp_id]; > > + qsbr =3D rte_zmalloc(NULL, size, RTE_CACHE_LINE_SIZE); > > + if (qsbr =3D=3D NULL) { > > + CDEV_LOG_ERR("Failed to allocate memory for RCU > on " > > + "queue_pair_id=3D%d", qp_id); > > + goto cb_init_err; > > + } > > + > > + if (rte_rcu_qsbr_init(qsbr, max_threads)) { > > + CDEV_LOG_ERR("Failed to initialize for RCU on " > > + "queue_pair_id=3D%d", qp_id); > > + goto cb_init_err; > > + } > > + > > + list->qsbr =3D qsbr; > > + } > > + > > + for (qp_id =3D 0; qp_id < dev->data->nb_queue_pairs; qp_id++) { > > + list =3D &dev->deq_cbs[qp_id]; > > + qsbr =3D rte_zmalloc(NULL, size, RTE_CACHE_LINE_SIZE); > > + if (qsbr =3D=3D NULL) { > > + CDEV_LOG_ERR("Failed to allocate memory for RCU > on " > > + "queue_pair_id=3D%d", qp_id); > > + goto cb_init_err; > > + } > > + > > + if (rte_rcu_qsbr_init(qsbr, max_threads)) { > > + CDEV_LOG_ERR("Failed to initialize for RCU on " > > + "queue_pair_id=3D%d", qp_id); > > + goto cb_init_err; > > + } > > + > > + list->qsbr =3D qsbr; > > + } > > + > > + return 0; > > + > > +cb_init_err: > > + cryptodev_cb_cleanup(dev); > > + rte_errno =3D ENOMEM; >=20 > Same here - no need to update rte_errno. Ok >=20 > > + return -ENOMEM; > > +} > > +#endif > > > > const char * > > rte_cryptodev_get_feature_name(uint64_t flag) @@ -927,6 +1048,11 @@ > > struct rte_cryptodev * > > > > RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, - > ENOTSUP); > > > > +#ifdef RTE_CRYPTO_CALLBACKS > > + rte_spinlock_lock(&rte_cryptodev_callback_lock); > > + cryptodev_cb_cleanup(dev); > > + rte_spinlock_unlock(&rte_cryptodev_callback_lock); > > +#endif > > /* Setup new number of queue pairs and reconfigure device. */ > > diag =3D rte_cryptodev_queue_pairs_config(dev, config- > >nb_queue_pairs, > > config->socket_id); > > @@ -936,11 +1062,19 @@ struct rte_cryptodev * > > return diag; > > } > > > > +#ifdef RTE_CRYPTO_CALLBACKS > > + rte_spinlock_lock(&rte_cryptodev_callback_lock); > > + diag =3D cryptodev_cb_init(dev); > > + rte_spinlock_unlock(&rte_cryptodev_callback_lock); > > + if (diag) { > > + CDEV_LOG_ERR("Callback init failed for dev_id=3D%d", dev_id); > > + return diag; > > + } > > +#endif > > rte_cryptodev_trace_configure(dev_id, config); > > return (*dev->dev_ops->dev_configure)(dev, config); } > > > > - > > int > > rte_cryptodev_start(uint8_t dev_id) > > { > > @@ -1136,6 +1270,289 @@ struct rte_cryptodev * > > socket_id); > > } > > > > +#ifdef RTE_CRYPTO_CALLBACKS > > +struct rte_cryptodev_cb * > > +rte_cryptodev_add_enq_callback(uint8_t dev_id, > > + uint16_t qp_id, > > + rte_cryptodev_callback_fn cb_fn, > > + void *cb_arg) > > +{ > > + struct rte_cryptodev *dev; > > + struct rte_cryptodev_cb_rcu *list; > > + struct rte_cryptodev_cb *cb, *tail; > > + > > + if (!cb_fn) { > > + CDEV_LOG_ERR("Callback is NULL on dev_id=3D%d", dev_id); > > + rte_errno =3D EINVAL; > > + return NULL; > > + } > > + > > + if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > > + CDEV_LOG_ERR("Invalid dev_id=3D%d", dev_id); > > + rte_errno =3D ENODEV; > > + return NULL; > > + } > > + > > + dev =3D &rte_crypto_devices[dev_id]; > > + if (qp_id >=3D dev->data->nb_queue_pairs) { > > + CDEV_LOG_ERR("Invalid queue_pair_id=3D%d", qp_id); > > + rte_errno =3D ENODEV; > > + return NULL; > > + } > > + > > + cb =3D rte_zmalloc(NULL, sizeof(*cb), 0); > > + if (cb =3D=3D NULL) { > > + CDEV_LOG_ERR("Failed to allocate memory for callback on " > > + "dev=3D%d, queue_pair_id=3D%d", dev_id, qp_id); > > + rte_errno =3D ENOMEM; > > + return NULL; > > + } > > + > > + rte_spinlock_lock(&rte_cryptodev_callback_lock); > > + > > + cb->fn =3D cb_fn; > > + cb->arg =3D cb_arg; > > + > > + /* Add the callbacks in fifo order. */ > > + list =3D &dev->enq_cbs[qp_id]; > > + tail =3D list->next; > > + > > + if (tail) { > > + while (tail->next) > > + tail =3D tail->next; > > + /* Stores to cb->fn and cb->param should complete before > > + * cb is visible to data plane. > > + */ > > + __atomic_store_n(&tail->next, cb, __ATOMIC_RELEASE); > > + } else { > > + /* Stores to cb->fn and cb->param should complete before > > + * cb is visible to data plane. > > + */ > > + __atomic_store_n(&list->next, cb, __ATOMIC_RELEASE); > > + } > > + > > + rte_spinlock_unlock(&rte_cryptodev_callback_lock); > > + > > + return cb; > > +} > > + > > +int > > +rte_cryptodev_remove_enq_callback(uint8_t dev_id, > > + uint16_t qp_id, > > + struct rte_cryptodev_cb *cb) > > +{ > > + struct rte_cryptodev *dev; > > + struct rte_cryptodev_cb **prev_cb, *curr_cb; > > + struct rte_cryptodev_cb_rcu *list; > > + int ret; > > + > > + ret =3D -EINVAL; > > + > > + if (!cb) { > > + CDEV_LOG_ERR("Callback is NULL"); > > + rte_errno =3D EINVAL; >=20 > Same story here - no need to update rte_errno, if we provide error code a= s > return value. Ok >=20 > > + return -EINVAL; > > + } > > + > > + if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > > + CDEV_LOG_ERR("Invalid dev_id=3D%d", dev_id); > > + rte_errno =3D ENODEV; > > + return -ENODEV; > > + } > > + > > + dev =3D &rte_crypto_devices[dev_id]; > > + if (qp_id >=3D dev->data->nb_queue_pairs) { > > + CDEV_LOG_ERR("Invalid queue_pair_id=3D%d", qp_id); > > + rte_errno =3D ENODEV; > > + return -ENODEV; > > + } > > + > > + rte_spinlock_lock(&rte_cryptodev_callback_lock); > > + if (dev->enq_cbs =3D=3D NULL) { > > + CDEV_LOG_ERR("Callback not initialized"); > > + rte_errno =3D EINVAL; > > + goto cb_err; > > + } > > + > > + list =3D &dev->enq_cbs[qp_id]; > > + if (list =3D=3D NULL) { > > + CDEV_LOG_ERR("Callback list is NULL"); > > + rte_errno =3D EINVAL; > > + goto cb_err; > > + } > > + > > + if (list->qsbr =3D=3D NULL) { > > + CDEV_LOG_ERR("Rcu qsbr is NULL"); > > + rte_errno =3D EINVAL; > > + goto cb_err; > > + } > > + > > + prev_cb =3D &list->next; > > + for (; *prev_cb !=3D NULL; prev_cb =3D &curr_cb->next) { > > + curr_cb =3D *prev_cb; > > + if (curr_cb =3D=3D cb) { > > + /* Remove the user cb from the callback list. */ > > + __atomic_store_n(prev_cb, curr_cb->next, > > + __ATOMIC_RELAXED); > > + ret =3D 0; > > + break; > > + } > > + } > > + > > + if (!ret) { > > + /* Call sync with invalid thread id as this is part of > > + * control plane API > > + */ > > + rte_rcu_qsbr_synchronize(list->qsbr, > RTE_QSBR_THRID_INVALID); > > + rte_free(cb); > > + } > > + > > +cb_err: > > + rte_spinlock_unlock(&rte_cryptodev_callback_lock); > > + return ret; > > +} > > + > > +struct rte_cryptodev_cb * > > +rte_cryptodev_add_deq_callback(uint8_t dev_id, > > + uint16_t qp_id, > > + rte_cryptodev_callback_fn cb_fn, > > + void *cb_arg) > > +{ > > + struct rte_cryptodev *dev; > > + struct rte_cryptodev_cb_rcu *list; > > + struct rte_cryptodev_cb *cb, *tail; > > + > > + if (!cb_fn) { > > + CDEV_LOG_ERR("Callback is NULL on dev_id=3D%d", dev_id); > > + rte_errno =3D EINVAL; > > + return NULL; > > + } > > + > > + if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > > + CDEV_LOG_ERR("Invalid dev_id=3D%d", dev_id); > > + rte_errno =3D ENODEV; > > + return NULL; > > + } > > + > > + dev =3D &rte_crypto_devices[dev_id]; > > + if (qp_id >=3D dev->data->nb_queue_pairs) { > > + CDEV_LOG_ERR("Invalid queue_pair_id=3D%d", qp_id); > > + rte_errno =3D ENODEV; > > + return NULL; > > + } > > + > > + cb =3D rte_zmalloc(NULL, sizeof(*cb), 0); > > + if (cb =3D=3D NULL) { > > + CDEV_LOG_ERR("Failed to allocate memory for callback on " > > + "dev=3D%d, queue_pair_id=3D%d", dev_id, qp_id); > > + rte_errno =3D ENOMEM; > > + return NULL; > > + } > > + > > + rte_spinlock_lock(&rte_cryptodev_callback_lock); > > + > > + cb->fn =3D cb_fn; > > + cb->arg =3D cb_arg; > > + > > + /* Add the callbacks in fifo order. */ > > + list =3D &dev->deq_cbs[qp_id]; > > + tail =3D list->next; > > + > > + if (tail) { > > + while (tail->next) > > + tail =3D tail->next; > > + /* Stores to cb->fn and cb->param should complete before > > + * cb is visible to data plane. > > + */ > > + __atomic_store_n(&tail->next, cb, __ATOMIC_RELEASE); > > + } else { > > + /* Stores to cb->fn and cb->param should complete before > > + * cb is visible to data plane. > > + */ > > + __atomic_store_n(&list->next, cb, __ATOMIC_RELEASE); > > + } > > + > > + rte_spinlock_unlock(&rte_cryptodev_callback_lock); > > + > > + return cb; > > +} > > + > > +int > > +rte_cryptodev_remove_deq_callback(uint8_t dev_id, > > + uint16_t qp_id, > > + struct rte_cryptodev_cb *cb) > > +{ > > + struct rte_cryptodev *dev; > > + struct rte_cryptodev_cb **prev_cb, *curr_cb; > > + struct rte_cryptodev_cb_rcu *list; > > + int ret; > > + > > + ret =3D -EINVAL; > > + > > + if (!cb) { > > + CDEV_LOG_ERR("Callback is NULL"); > > + rte_errno =3D EINVAL; > > + return -EINVAL; > > + } > > + > > + if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > > + CDEV_LOG_ERR("Invalid dev_id=3D%d", dev_id); > > + rte_errno =3D ENODEV; > > + return -ENODEV; > > + } > > + > > + dev =3D &rte_crypto_devices[dev_id]; > > + if (qp_id >=3D dev->data->nb_queue_pairs) { > > + CDEV_LOG_ERR("Invalid queue_pair_id=3D%d", qp_id); > > + rte_errno =3D ENODEV; > > + return -ENODEV; > > + } > > + > > + rte_spinlock_lock(&rte_cryptodev_callback_lock); > > + if (dev->enq_cbs =3D=3D NULL) { > > + CDEV_LOG_ERR("Callback not initialized"); > > + rte_errno =3D EINVAL; > > + goto cb_err; > > + } > > + > > + list =3D &dev->deq_cbs[qp_id]; > > + if (list =3D=3D NULL) { > > + CDEV_LOG_ERR("Callback list is NULL"); > > + rte_errno =3D EINVAL; > > + goto cb_err; > > + } > > + > > + if (list->qsbr =3D=3D NULL) { > > + CDEV_LOG_ERR("Rcu qsbr is NULL"); > > + rte_errno =3D EINVAL; > > + goto cb_err; > > + } > > + > > + prev_cb =3D &list->next; > > + for (; *prev_cb !=3D NULL; prev_cb =3D &curr_cb->next) { > > + curr_cb =3D *prev_cb; > > + if (curr_cb =3D=3D cb) { > > + /* Remove the user cb from the callback list. */ > > + __atomic_store_n(prev_cb, curr_cb->next, > > + __ATOMIC_RELAXED); > > + ret =3D 0; > > + break; > > + } > > + } > > + > > + if (!ret) { > > + /* Call sync with invalid thread id as this is part of > > + * control plane API > > + */ > > + rte_rcu_qsbr_synchronize(list->qsbr, > RTE_QSBR_THRID_INVALID); > > + rte_free(cb); > > + } > > + > > +cb_err: > > + rte_spinlock_unlock(&rte_cryptodev_callback_lock); > > + return ret; > > +} > > +#endif > > > > int > > rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats > > *stats) diff --git a/lib/librte_cryptodev/rte_cryptodev.h > > b/lib/librte_cryptodev/rte_cryptodev.h > > index 0935fd5..3477a37 100644 > > --- a/lib/librte_cryptodev/rte_cryptodev.h > > +++ b/lib/librte_cryptodev/rte_cryptodev.h > > @@ -23,6 +23,7 @@ > > #include "rte_dev.h" > > #include > > #include > > +#include > > > > #include "rte_cryptodev_trace_fp.h" > > > > @@ -522,6 +523,32 @@ struct rte_cryptodev_qp_conf { > > /**< The mempool for creating sess private data in sessionless mode > > */ }; > > > > +#ifdef RTE_CRYPTO_CALLBACKS > > +/** > > + * Function type used for processing crypto ops when enqueue/dequeue > > +burst is > > + * called. > > + * > > + * The callback function is called on enqueue/dequeue burst immediatel= y. > > + * > > + * @param dev_id The identifier of the device. > > + * @param qp_id The index of the queue pair on which ops are > > + * enqueued/dequeued. The value must be in the > > + * range [0, nb_queue_pairs - 1] previously > > + * supplied to *rte_cryptodev_configure*. > > + * @param ops The address of an array of *nb_ops* pointers > > + * to *rte_crypto_op* structures which contain > > + * the crypto operations to be processed. > > + * @param nb_ops The number of operations to process. > > + * @param user_param The arbitrary user parameter passed in by the > > + * application when the callback was originally > > + * registered. > > + * @return The number of ops to be enqueued to the > > + * crypto device. > > + */ > > +typedef uint16_t (*rte_cryptodev_callback_fn)(uint16_t dev_id, uint16_= t > qp_id, > > + struct rte_crypto_op **ops, uint16_t nb_ops, void > *user_param); > > +#endif > > + > > /** > > * Typedef for application callback function to be registered by appli= cation > > * software for notification of device events @@ -822,7 +849,6 @@ > > struct rte_cryptodev_config { > > enum rte_cryptodev_event_type event, > > rte_cryptodev_cb_fn cb_fn, void *cb_arg); > > > > - > > typedef uint16_t (*dequeue_pkt_burst_t)(void *qp, > > struct rte_crypto_op **ops, uint16_t nb_ops); > > /**< Dequeue processed packets from queue pair of a device. */ @@ > > -839,6 +865,33 @@ typedef uint16_t (*enqueue_pkt_burst_t)(void *qp, > > /** Structure to keep track of registered callbacks */ > > TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback); > > > > +#ifdef RTE_CRYPTO_CALLBACKS > > +/** > > + * @internal > > + * Structure used to hold information about the callbacks to be > > +called for a > > + * queue pair on enqueue/dequeue. > > + */ > > +struct rte_cryptodev_cb { > > + struct rte_cryptodev_cb *next; > > + /** < Pointer to next callback */ > > + rte_cryptodev_callback_fn fn; > > + /** < Pointer to callback function */ > > + void *arg; > > + /** < Pointer to argument */ > > +}; > > + > > +/** > > + * @internal > > + * Structure used to hold information about the RCU for a queue pair. > > + */ > > +struct rte_cryptodev_cb_rcu { > > + struct rte_cryptodev_cb *next; > > + /** < Pointer to next callback */ > > + struct rte_rcu_qsbr *qsbr; > > + /** < RCU QSBR variable per queue pair */ }; #endif > > + > > /** The data structure associated with each crypto device. */ struct > > rte_cryptodev { > > dequeue_pkt_burst_t dequeue_burst; > > @@ -867,6 +920,12 @@ struct rte_cryptodev { > > __extension__ > > uint8_t attached : 1; > > /**< Flag indicating the device is attached */ > > + > > + struct rte_cryptodev_cb_rcu *enq_cbs; > > + /**< User application callback for pre enqueue processing */ > > + > > + struct rte_cryptodev_cb_rcu *deq_cbs; > > + /**< User application callback for post dequeue processing */ > > } __rte_cache_aligned; > > > > void * > > @@ -945,6 +1004,30 @@ struct rte_cryptodev_data { { > > struct rte_cryptodev *dev =3D &rte_cryptodevs[dev_id]; > > > > +#ifdef RTE_CRYPTO_CALLBACKS > > + if (unlikely(dev->deq_cbs !=3D NULL)) { > > + struct rte_cryptodev_cb_rcu *list; > > + struct rte_cryptodev_cb *cb; > > + > > + /* __ATOMIC_RELEASE memory order was used when the > > + * call back was inserted into the list. > > + * Since there is a clear dependency between loading > > + * cb and cb->fn/cb->next, __ATOMIC_ACQUIRE memory order > is > > + * not required. > > + */ > > + list =3D &dev->deq_cbs[qp_id]; > > + rte_rcu_qsbr_thread_online(list->qsbr, 0); > > + cb =3D __atomic_load_n(&list->next, __ATOMIC_RELAXED); > > + > > + while (cb !=3D NULL) { > > + nb_ops =3D cb->fn(dev_id, qp_id, ops, nb_ops, > > + cb->arg); > > + cb =3D cb->next; > > + }; > > + > > + rte_rcu_qsbr_thread_offline(list->qsbr, 0); > > + } > > +#endif > > nb_ops =3D (*dev->dequeue_burst) > > (dev->data->queue_pairs[qp_id], ops, nb_ops); > > > > @@ -989,6 +1072,31 @@ struct rte_cryptodev_data { { > > struct rte_cryptodev *dev =3D &rte_cryptodevs[dev_id]; > > > > +#ifdef RTE_CRYPTO_CALLBACKS > > + if (unlikely(dev->enq_cbs !=3D NULL)) { > > + struct rte_cryptodev_cb_rcu *list; > > + struct rte_cryptodev_cb *cb; > > + > > + /* __ATOMIC_RELEASE memory order was used when the > > + * call back was inserted into the list. > > + * Since there is a clear dependency between loading > > + * cb and cb->fn/cb->next, __ATOMIC_ACQUIRE memory order > is > > + * not required. > > + */ > > + list =3D &dev->enq_cbs[qp_id]; > > + rte_rcu_qsbr_thread_online(list->qsbr, 0); > > + cb =3D __atomic_load_n(&list->next, __ATOMIC_RELAXED); > > + > > + while (cb !=3D NULL) { > > + nb_ops =3D cb->fn(dev_id, qp_id, ops, nb_ops, > > + cb->arg); > > + cb =3D cb->next; > > + }; > > + > > + rte_rcu_qsbr_thread_offline(list->qsbr, 0); > > + } > > +#endif > > + > > rte_cryptodev_trace_enqueue_burst(dev_id, qp_id, (void **)ops, > nb_ops); > > return (*dev->enqueue_burst)( > > dev->data->queue_pairs[qp_id], ops, nb_ops); @@ - > 1730,6 +1838,156 > > @@ struct rte_crypto_raw_dp_ctx { > > rte_cryptodev_raw_dequeue_done(struct rte_crypto_raw_dp_ctx *ctx, > > uint32_t n); > > > > +#ifdef RTE_CRYPTO_CALLBACKS > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this API may change without prior notice > > + * > > + * Add a user callback for a given crypto device and queue pair which > > +will be > > + * called on crypto ops enqueue. > > + * > > + * This API configures a function to be called for each burst of > > +crypto ops > > + * received on a given crypto device queue pair. The return value is > > +a pointer > > + * that can be used later to remove the callback using > > + * rte_cryptodev_remove_enq_callback(). > > + * > > + * Callbacks registered by application would not survive > > + * rte_cryptodev_configure() as it reinitializes the callback list. > > + * It is user responsibility to remove all installed callbacks before > > + * calling rte_cryptodev_configure() to avoid possible memory leakage. > > + * Application is expected to call add API after rte_cryptodev_configu= re(). > > + * > > + * Multiple functions can be registered per queue pair & they are > > +called > > + * in the order they were added. The API does not restrict on maximum > > +number > > + * of callbacks. > > + * > > + * @param dev_id The identifier of the device. > > + * @param qp_id The index of the queue pair on which ops are > > + * to be enqueued for processing. The value > > + * must be in the range [0, nb_queue_pairs - 1] > > + * previously supplied to > > + * *rte_cryptodev_configure*. > > + * @param cb_fn The callback function > > + * @param cb_arg A generic pointer parameter which will be > passed > > + * to each invocation of the callback function on > > + * this crypto device and queue pair. > > + * > > + * @return > > + * NULL on error. >=20 > Need to add that rte_errno will contain error code. Ok >=20 > > + * On success, a pointer value which can later be used to remove the > callback. > > + */ > > + > > +__rte_experimental > > +struct rte_cryptodev_cb * > > +rte_cryptodev_add_enq_callback(uint8_t dev_id, > > + uint16_t qp_id, > > + rte_cryptodev_callback_fn cb_fn, > > + void *cb_arg); > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this API may change without prior notice > > + * > > + * Remove a user callback function for given crypto device and queue p= air. > > + * > > + * This function is used to remove enqueue callbacks that were added > > +to a > > + * crypto device queue pair using rte_cryptodev_add_enq_callback(). > > + * > > + * > > + * > > + * @param dev_id The identifier of the device. > > + * @param qp_id The index of the queue pair on which ops are > > + * to be enqueued. The value must be in the > > + * range [0, nb_queue_pairs - 1] previously > > + * supplied to *rte_cryptodev_configure*. > > + * @param cb Pointer to user supplied callback created via > > + * rte_cryptodev_add_enq_callback(). > > + * > > + * @return > > + * - 0: Success. Callback was removed. > > + * - -EINVAL: The dev_id or the qp_id is out of range, or the callb= ack > > + * is NULL or not found for the crypto device queue pair= . > > + */ > > + > > +__rte_experimental > > +int rte_cryptodev_remove_enq_callback(uint8_t dev_id, > > + uint16_t qp_id, > > + struct rte_cryptodev_cb *cb); > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this API may change without prior notice > > + * > > + * Add a user callback for a given crypto device and queue pair which > > +will be > > + * called on crypto ops dequeue. > > + * > > + * This API configures a function to be called for each burst of > > +crypto ops > > + * received on a given crypto device queue pair. The return value is > > +a pointer > > + * that can be used later to remove the callback using > > + * rte_cryptodev_remove_deq_callback(). > > + * > > + * Callbacks registered by application would not survive > > + * rte_cryptodev_configure() as it reinitializes the callback list. > > + * It is user responsibility to remove all installed callbacks before > > + * calling rte_cryptodev_configure() to avoid possible memory leakage. > > + * Application is expected to call add API after rte_cryptodev_configu= re(). > > + * > > + * Multiple functions can be registered per queue pair & they are > > +called > > + * in the order they were added. The API does not restrict on maximum > > +number > > + * of callbacks. > > + * > > + * @param dev_id The identifier of the device. > > + * @param qp_id The index of the queue pair on which ops are > > + * to be dequeued. The value must be in the > > + * range [0, nb_queue_pairs - 1] previously > > + * supplied to *rte_cryptodev_configure*. > > + * @param cb_fn The callback function > > + * @param cb_arg A generic pointer parameter which will be > passed > > + * to each invocation of the callback function on > > + * this crypto device and queue pair. > > + * > > + * @return > > + * NULL on error. > > + * On success, a pointer value which can later be used to remove the > callback. > > + */ > > + > > +__rte_experimental > > +struct rte_cryptodev_cb * > > +rte_cryptodev_add_deq_callback(uint8_t dev_id, > > + uint16_t qp_id, > > + rte_cryptodev_callback_fn cb_fn, > > + void *cb_arg); > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this API may change without prior notice > > + * > > + * Remove a user callback function for given crypto device and queue p= air. > > + * > > + * This function is used to remove dequeue callbacks that were added > > +to a > > + * crypto device queue pair using rte_cryptodev_add_deq_callback(). > > + * > > + * > > + * > > + * @param dev_id The identifier of the device. > > + * @param qp_id The index of the queue pair on which ops are > > + * to be dequeued. The value must be in the > > + * range [0, nb_queue_pairs - 1] previously > > + * supplied to *rte_cryptodev_configure*. > > + * @param cb Pointer to user supplied callback created via > > + * rte_cryptodev_add_deq_callback(). > > + * > > + * @return > > + * - 0: Success. Callback was removed. > > + * - -EINVAL: The dev_id or the qp_id is out of range, or the callb= ack > > + * is NULL or not found for the crypto device queue pair= . > > + */ > > +__rte_experimental > > +int rte_cryptodev_remove_deq_callback(uint8_t dev_id, > > + uint16_t qp_id, > > + struct rte_cryptodev_cb *cb); #endif > > + > > #ifdef __cplusplus > > } > > #endif > > diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map > > b/lib/librte_cryptodev/rte_cryptodev_version.map > > index 7e4360f..429b03e 100644 > > --- a/lib/librte_cryptodev/rte_cryptodev_version.map > > +++ b/lib/librte_cryptodev/rte_cryptodev_version.map > > @@ -101,6 +101,8 @@ EXPERIMENTAL { > > rte_cryptodev_get_qp_status; > > > > # added in 20.11 > > + rte_cryptodev_add_deq_callback; > > + rte_cryptodev_add_enq_callback; > > rte_cryptodev_configure_raw_dp_ctx; > > rte_cryptodev_get_raw_dp_ctx_size; > > rte_cryptodev_raw_dequeue; > > @@ -109,4 +111,6 @@ EXPERIMENTAL { > > rte_cryptodev_raw_enqueue; > > rte_cryptodev_raw_enqueue_burst; > > rte_cryptodev_raw_enqueue_done; > > + rte_cryptodev_remove_deq_callback; > > + rte_cryptodev_remove_enq_callback; > > }; > > -- > > 1.9.1