From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 5FEEFD004 for ; Mon, 21 May 2018 15:08:27 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 May 2018 06:08:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,426,1520924400"; d="scan'208";a="230284264" Received: from silpixa00399464.ir.intel.com (HELO silpixa00399464.ger.corp.intel.com) ([10.237.222.157]) by fmsmga005.fm.intel.com with ESMTP; 21 May 2018 06:08:25 -0700 From: Pablo de Lara To: declan.doherty@intel.com, akhil.goyal@nxp.com, shally.verma@cavium.com Cc: dev@dpdk.org, Pablo de Lara Date: Mon, 21 May 2018 14:08:38 +0100 Message-Id: <20180521130841.40219-4-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180521130841.40219-1-pablo.de.lara.guarch@intel.com> References: <20180126090355.25903-1-pablo.de.lara.guarch@intel.com> <20180521130841.40219-1-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH v5 3/6] doc: announce deprecation for attach/detach crypto session 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: , X-List-Received-Date: Mon, 21 May 2018 13:08:27 -0000 Functions rte_cryptodev_queue_pair_attach_sym_session and rte_cryptodev_queue_pair_detach_sym_sessions are not really used in any of the crypto drivers (only one driver implements it and it just return 0). Therefore, this API can be deprecated from 18.05 and removed in 18.08. Signed-off-by: Pablo de Lara Acked-by: Fiona Trahe Acked-by: Akhil Goyal --- doc/guides/rel_notes/deprecation.rst | 4 ++++ examples/ipsec-secgw/ipsec.c | 12 ------------ lib/librte_cryptodev/rte_cryptodev.h | 4 ++++ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 85945ee72..b5d1cc0d5 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -80,3 +80,7 @@ Deprecation Notices is not internal in the crypto device anymore. - Replacement of ``pci_dev`` field with the more generic ``rte_device`` structure. + - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and + ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from + 18.05 and removed in 18.08, as there are no drivers doing anything useful + with them. diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c index 6c896477c..3d415f1af 100644 --- a/examples/ipsec-secgw/ipsec.c +++ b/examples/ipsec-secgw/ipsec.c @@ -327,18 +327,6 @@ create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa) rte_cryptodev_info_get(ipsec_ctx->tbl[cdev_id_qp].id, &cdev_info); - if (cdev_info.sym.max_nb_sessions_per_qp > 0) { - ret = rte_cryptodev_queue_pair_attach_sym_session( - ipsec_ctx->tbl[cdev_id_qp].id, - ipsec_ctx->tbl[cdev_id_qp].qp, - sa->crypto_session); - if (ret < 0) { - RTE_LOG(ERR, IPSEC, - "Session cannot be attached to qp %u\n", - ipsec_ctx->tbl[cdev_id_qp].qp); - return -1; - } - } } sa->cdev_id_qp = cdev_id_qp; diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index 261a359dc..efd3270e5 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -986,6 +986,7 @@ unsigned int rte_cryptodev_get_private_session_size(uint8_t dev_id); /** + * @deprecated * Attach queue pair with sym session. * * @param dev_id Device to which the session will be attached. @@ -997,11 +998,13 @@ rte_cryptodev_get_private_session_size(uint8_t dev_id); * - On success, zero. * - On failure, a negative value. */ +__rte_deprecated int rte_cryptodev_queue_pair_attach_sym_session(uint8_t dev_id, uint16_t qp_id, struct rte_cryptodev_sym_session *session); /** + * @deprecated * Detach queue pair with sym session. * * @param dev_id Device to which the session is attached. @@ -1013,6 +1016,7 @@ rte_cryptodev_queue_pair_attach_sym_session(uint8_t dev_id, uint16_t qp_id, * - On success, zero. * - On failure, a negative value. */ +__rte_deprecated int rte_cryptodev_queue_pair_detach_sym_session(uint8_t dev_id, uint16_t qp_id, struct rte_cryptodev_sym_session *session); -- 2.17.0