X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fcrypto%2Fqat%2Fqat_device.h;h=e18c8a706752dc56ee1b8bbade88dd8332132e23;hb=91614c73b67cad33750b04b9904dd99666b9a91e;hp=d1615e2a7ef1caaa988754657f318626cabba159;hpb=e1c6aa1f776f845db2c27172b289a25864ec6243;p=dpdk.git diff --git a/drivers/crypto/qat/qat_device.h b/drivers/crypto/qat/qat_device.h index d1615e2a7e..e18c8a7067 100644 --- a/drivers/crypto/qat/qat_device.h +++ b/drivers/crypto/qat/qat_device.h @@ -4,26 +4,18 @@ #ifndef _QAT_DEVICE_H_ #define _QAT_DEVICE_H_ -#include #include + #include "qat_common.h" #include "qat_logs.h" #include "adf_transport_access_macros.h" #include "qat_qp.h" - #define QAT_DETACHED (0) #define QAT_ATTACHED (1) -#define QAT_MAX_PCI_DEVICES 48 #define QAT_DEV_NAME_MAX_LEN 64 - -extern uint8_t cryptodev_qat_driver_id; - -extern int qat_sym_qp_release(struct rte_cryptodev *dev, - uint16_t queue_pair_id); - /* * This struct holds all the data about a QAT pci device * including data about all services it supports. @@ -50,12 +42,17 @@ struct qat_pci_device { uint8_t attached : 1; /**< Flag indicating the device is attached */ - struct qat_qp *qps_in_use[QAT_MAX_SERVICES][ADF_MAX_QPS_PER_BUNDLE]; + struct qat_qp *qps_in_use[QAT_MAX_SERVICES][ADF_MAX_QPS_ON_ANY_SERVICE]; /**< links to qps set up for each service, index same as on API */ /* Data relating to symmetric crypto service */ struct qat_sym_dev_private *sym_dev; /**< link back to cryptodev private data */ + struct rte_device sym_rte_dev; + /**< This represents the crypto subset of this pci device. + * Register with this rather than with the one in + * pci_dev so that its driver can have a crypto-specific name + */ /* Data relating to compression service */ @@ -63,34 +60,12 @@ struct qat_pci_device { }; -/** private data structure for a QAT device. - * This QAT device is a device offering only symmetric crypto service, - * there can be one of these on each qat_pci_device (VF), - * in future there may also be private data structures for other services. - */ -struct qat_sym_dev_private { - struct qat_pci_device *qat_dev; - /**< The qat pci device hosting the service */ - uint8_t sym_dev_id; - /**< Device instance for this rte_cryptodev */ - const struct rte_cryptodev_capabilities *qat_dev_capabilities; - /* QAT device symmetric crypto capabilities */ -}; - struct qat_gen_hw_data { enum qat_device_gen dev_gen; - const struct qat_qp_hw_data (*qp_hw_data)[ADF_MAX_QPS_PER_BUNDLE]; + const struct qat_qp_hw_data (*qp_hw_data)[ADF_MAX_QPS_ON_ANY_SERVICE]; }; -extern struct qat_gen_hw_data qp_gen_config[]; - -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); -void qat_sym_dev_info_get(struct rte_cryptodev *dev, - struct rte_cryptodev_info *info); +extern struct qat_gen_hw_data qat_gen_config[]; struct qat_pci_device * qat_pci_device_allocate(struct rte_pci_device *pci_dev); @@ -99,4 +74,5 @@ qat_pci_device_release(struct rte_pci_device *pci_dev); struct qat_pci_device * qat_get_qat_dev_from_pci_dev(struct rte_pci_device *pci_dev); + #endif /* _QAT_DEVICE_H_ */