cryptodev: remove crypto device type enumeration
[dpdk.git] / drivers / crypto / qat / qat_crypto.h
index d680364..4151456 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2015-2016 Intel Corporation. All rights reserved.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
 #include <rte_cryptodev_pmd.h>
 #include <rte_memzone.h>
 
+#include "qat_crypto_capabilities.h"
+
 /*
  * This macro rounds up a number to a be a multiple of
  * the alignment when the alignment is a power of 2
  */
 #define ALIGN_POW2_ROUNDUP(num, align) \
        (((num) + (align) - 1) & ~((align) - 1))
+#define QAT_64_BTYE_ALIGN_MASK (~0x3f)
 
 /**
  * Structure associated with each queue.
@@ -68,20 +71,24 @@ struct qat_qp {
        struct  qat_queue       tx_q;
        struct  qat_queue       rx_q;
        struct  rte_cryptodev_stats stats;
+       struct rte_mempool *op_cookie_pool;
+       void **op_cookies;
+       uint32_t nb_descriptors;
 } __rte_cache_aligned;
 
 /** private data structure for each QAT device */
 struct qat_pmd_private {
-       char sess_mp_name[RTE_MEMPOOL_NAMESIZE];
-       struct rte_mempool *sess_mp;
-
        unsigned max_nb_queue_pairs;
        /**< Max number of queue pairs supported by device */
        unsigned max_nb_sessions;
        /**< Max number of sessions supported by device */
+       const struct rte_cryptodev_capabilities *qat_dev_capabilities;
 };
 
-int qat_dev_config(struct rte_cryptodev *dev);
+extern uint8_t cryptodev_qat_driver_id;
+
+int qat_dev_config(struct rte_cryptodev *dev,
+               struct rte_cryptodev_config *config);
 int qat_dev_start(struct rte_cryptodev *dev);
 void qat_dev_stop(struct rte_cryptodev *dev);
 int qat_dev_close(struct rte_cryptodev *dev);
@@ -109,16 +116,32 @@ qat_crypto_sym_session_init(struct rte_mempool *mempool, void *priv_sess);
 
 extern void *
 qat_crypto_sym_configure_session(struct rte_cryptodev *dev,
-               struct rte_crypto_xform *xform, void *session_private);
+               struct rte_crypto_sym_xform *xform, void *session_private);
+
+struct qat_session *
+qat_crypto_sym_configure_session_aead(struct rte_crypto_sym_xform *xform,
+                               struct qat_session *session_private);
+
+struct qat_session *
+qat_crypto_sym_configure_session_auth(struct rte_cryptodev *dev,
+                               struct rte_crypto_sym_xform *xform,
+                               struct qat_session *session_private);
+
+void *
+qat_crypto_sym_configure_session_cipher(struct rte_cryptodev *dev,
+               struct rte_crypto_sym_xform *xform, void *session_private);
+
 
 extern void
 qat_crypto_sym_clear_session(struct rte_cryptodev *dev, void *session);
 
 
-uint16_t
-qat_crypto_pkt_tx_burst(void *txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts);
+extern uint16_t
+qat_pmd_enqueue_op_burst(void *qp, struct rte_crypto_op **ops,
+               uint16_t nb_ops);
 
-uint16_t
-qat_crypto_pkt_rx_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts);
+extern uint16_t
+qat_pmd_dequeue_op_burst(void *qp, struct rte_crypto_op **ops,
+               uint16_t nb_ops);
 
 #endif /* _QAT_CRYPTO_H_ */