X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fcommon%2Fqat%2Fqat_device.h;h=09a4c55ed40da3fe083e70a51d5119ef2674217e;hb=ac882a0eda6950f58271ee507b46f1a0a7ff9672;hp=eb81c78f9c2720112edf092f48df5591e9f19ea0;hpb=a124830a6f00cf767372f98542449b7470f3dfab;p=dpdk.git diff --git a/drivers/common/qat/qat_device.h b/drivers/common/qat/qat_device.h index eb81c78f9c..09a4c55ed4 100644 --- a/drivers/common/qat/qat_device.h +++ b/drivers/common/qat/qat_device.h @@ -16,6 +16,16 @@ #define QAT_DEV_NAME_MAX_LEN 64 +#define SYM_ENQ_THRESHOLD_NAME "qat_sym_enq_threshold" +#define ASYM_ENQ_THRESHOLD_NAME "qat_asym_enq_threshold" +#define COMP_ENQ_THRESHOLD_NAME "qat_comp_enq_threshold" +#define MAX_QP_THRESHOLD_SIZE 32 + +struct qat_dev_cmd_param { + const char *name; + uint16_t val; +}; + enum qat_comp_num_im_buffers { QAT_NUM_INTERM_BUFS_GEN1 = 12, QAT_NUM_INTERM_BUFS_GEN2 = 20, @@ -31,6 +41,7 @@ enum qat_comp_num_im_buffers { * - runtime data */ struct qat_sym_dev_private; +struct qat_asym_dev_private; struct qat_comp_dev_private; struct qat_pci_device { @@ -57,7 +68,16 @@ struct qat_pci_device { 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. + /**< This represents the crypto sym 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 asymmetric crypto service */ + struct qat_asym_dev_private *asym_dev; + /**< link back to cryptodev private data */ + struct rte_device asym_rte_dev; + /**< This represents the crypto asym 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 */ @@ -84,7 +104,8 @@ struct qat_gen_hw_data { extern struct qat_gen_hw_data qat_gen_config[]; struct qat_pci_device * -qat_pci_device_allocate(struct rte_pci_device *pci_dev); +qat_pci_device_allocate(struct rte_pci_device *pci_dev, + struct qat_dev_cmd_param *qat_dev_cmd_param); int qat_pci_device_release(struct rte_pci_device *pci_dev); @@ -94,10 +115,12 @@ qat_get_qat_dev_from_pci_dev(struct rte_pci_device *pci_dev); /* declaration needed for weak functions */ int -qat_sym_dev_create(struct qat_pci_device *qat_pci_dev __rte_unused); +qat_sym_dev_create(struct qat_pci_device *qat_pci_dev __rte_unused, + struct qat_dev_cmd_param *qat_dev_cmd_param); int -qat_asym_dev_create(struct qat_pci_device *qat_pci_dev __rte_unused); +qat_asym_dev_create(struct qat_pci_device *qat_pci_dev __rte_unused, + struct qat_dev_cmd_param *qat_dev_cmd_param); int qat_sym_dev_destroy(struct qat_pci_device *qat_pci_dev __rte_unused); @@ -106,7 +129,8 @@ int qat_asym_dev_destroy(struct qat_pci_device *qat_pci_dev __rte_unused); int -qat_comp_dev_create(struct qat_pci_device *qat_pci_dev __rte_unused); +qat_comp_dev_create(struct qat_pci_device *qat_pci_dev __rte_unused, + struct qat_dev_cmd_param *qat_dev_cmd_param); int qat_comp_dev_destroy(struct qat_pci_device *qat_pci_dev __rte_unused);