doc: announce deprecation for attach/detach crypto session
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Mon, 21 May 2018 13:08:38 +0000 (14:08 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 22 May 2018 14:36:12 +0000 (16:36 +0200)
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 <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
doc/guides/rel_notes/deprecation.rst
examples/ipsec-secgw/ipsec.c
lib/librte_cryptodev/rte_cryptodev.h

index 85945ee..b5d1cc0 100644 (file)
@@ -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.
index 6c89647..3d415f1 100644 (file)
@@ -327,18 +327,6 @@ flow_create_failure:
 
                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;
 
index eb6c66f..fe1bd82 100644 (file)
@@ -989,6 +989,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.
@@ -1000,11 +1001,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.
@@ -1016,6 +1019,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);