cryptodev: change attach session to queue pair API
[dpdk.git] / lib / librte_cryptodev / rte_cryptodev.h
index f7d248b..0ade05e 100644 (file)
@@ -514,11 +514,6 @@ struct rte_cryptodev_config {
        int socket_id;                  /**< Socket to allocate resources on */
        uint16_t nb_queue_pairs;
        /**< Number of queue pairs to configure on device */
-
-       struct {
-               uint32_t nb_objs;       /**< Number of objects in mempool */
-               uint32_t cache_size;    /**< l-core object cache size */
-       } session_mp;           /**< Session mempool configuration */
 };
 
 /**
@@ -530,13 +525,15 @@ struct rte_cryptodev_config {
  *
  * @param      dev_id          The identifier of the device to configure.
  * @param      config          The crypto device configuration structure.
+ * @param      session_pool    Pointer to device session mempool
  *
  * @return
  *   - 0: Success, device configured.
  *   - <0: Error code returned by the driver configuration function.
  */
 extern int
-rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config);
+rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config,
+               struct rte_mempool *session_pool);
 
 /**
  * Start an device.
@@ -956,7 +953,8 @@ rte_cryptodev_get_private_session_size(uint8_t dev_id);
 /**
  * Attach queue pair with sym session.
  *
- * @param      qp_id           Queue pair to which session will be attached.
+ * @param      dev_id          Device to which the session will be attached.
+ * @param      qp_id           Queue pair to which the session will be attached.
  * @param      session         Session pointer previously allocated by
  *                             *rte_cryptodev_sym_session_create*.
  *
@@ -965,13 +963,14 @@ rte_cryptodev_get_private_session_size(uint8_t dev_id);
  *  - On failure, a negative value.
  */
 int
-rte_cryptodev_queue_pair_attach_sym_session(uint16_t qp_id,
+rte_cryptodev_queue_pair_attach_sym_session(uint8_t dev_id, uint16_t qp_id,
                struct rte_cryptodev_sym_session *session);
 
 /**
  * Detach queue pair with sym session.
  *
- * @param      qp_id           Queue pair to which session is attached.
+ * @param      dev_id          Device to which the session is attached.
+ * @param      qp_id           Queue pair to which the session is attached.
  * @param      session         Session pointer previously allocated by
  *                             *rte_cryptodev_sym_session_create*.
  *
@@ -980,7 +979,7 @@ rte_cryptodev_queue_pair_attach_sym_session(uint16_t qp_id,
  *  - On failure, a negative value.
  */
 int
-rte_cryptodev_queue_pair_detach_sym_session(uint16_t qp_id,
+rte_cryptodev_queue_pair_detach_sym_session(uint8_t dev_id, uint16_t qp_id,
                struct rte_cryptodev_sym_session *session);
 
 /**