common/qat: read slice configuration
Checks
Commit Message
Read slice configuration of QAT capabilities.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
drivers/common/qat/qat_device.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
@@ -368,6 +368,7 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
{ SYM_ENQ_THRESHOLD_NAME, 0 },
{ ASYM_ENQ_THRESHOLD_NAME, 0 },
{ COMP_ENQ_THRESHOLD_NAME, 0 },
+ { "DISABLE SLICE", 0},
{ NULL, 0 },
};
@@ -390,6 +391,17 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
return -ENODEV;
}
+ if (qat_pci_dev->qat_dev_gen == QAT_GEN3) {
+ uint32_t capa = 0;
+ const uint32_t offset = 0x4c;
+
+ if (rte_pci_read_config(pci_dev, &capa, 4, offset) < 0) {
+ RTE_LOG(ERR, EAL,
+ "Cannot read slice configuration\n");
+ }
+ qat_dev_cmd_param[4].val |= (0x400 & capa) | (0x800 & capa);
+ }
+
sym_ret = qat_sym_dev_create(qat_pci_dev, qat_dev_cmd_param);
if (sym_ret == 0) {
num_pmds_created++;