[1/4] crypto/qat: add new gen3 device
Checks
Commit Message
Add new gen3 QAT device ID.
This device has a wireless slice, but other gen3 devices do not, so we
must set a flag to indicate this wireless enabled device.
Capabilities for the device are slightly different from base gen3
capabilities, some are removed from the list for this device.
Signed-off-by: Ciara Power <ciara.power@intel.com>
---
drivers/common/qat/qat_device.c | 13 +++++++++++++
drivers/common/qat/qat_device.h | 2 ++
drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c | 11 +++++++++++
3 files changed, 26 insertions(+)
@@ -53,6 +53,9 @@ static const struct rte_pci_id pci_id_qat_map[] = {
{
RTE_PCI_DEVICE(0x8086, 0x18a1),
},
+ {
+ RTE_PCI_DEVICE(0x8086, 0x578b),
+ },
{
RTE_PCI_DEVICE(0x8086, 0x4941),
},
@@ -194,6 +197,7 @@ pick_gen(const struct rte_pci_device *pci_dev)
case 0x18ef:
return QAT_GEN2;
case 0x18a1:
+ case 0x578b:
return QAT_GEN3;
case 0x4941:
case 0x4943:
@@ -205,6 +209,12 @@ pick_gen(const struct rte_pci_device *pci_dev)
}
}
+static int
+wireless_slice_support(uint16_t pci_dev_id)
+{
+ return pci_dev_id == 0x578b;
+}
+
struct qat_pci_device *
qat_pci_device_allocate(struct rte_pci_device *pci_dev,
struct qat_dev_cmd_param *qat_dev_cmd_param)
@@ -282,6 +292,9 @@ qat_pci_device_allocate(struct rte_pci_device *pci_dev,
qat_dev->qat_dev_id = qat_dev_id;
qat_dev->qat_dev_gen = qat_dev_gen;
+ if (wireless_slice_support(pci_dev->id.device_id))
+ qat_dev->has_wireless_slice = 1;
+
ops_hw = qat_dev_hw_spec[qat_dev->qat_dev_gen];
NOT_NULL(ops_hw->qat_dev_get_misc_bar, goto error,
"QAT internal error! qat_dev_get_misc_bar function not set");
@@ -135,6 +135,8 @@ struct qat_pci_device {
/**< Per generation specific information */
uint32_t slice_map;
/**< Map of the crypto and compression slices */
+ uint16_t has_wireless_slice;
+ /**< Wireless Slices supported */
};
struct qat_gen_hw_data {
@@ -255,6 +255,17 @@ qat_sym_crypto_cap_get_gen3(struct qat_cryptodev_private *internals,
RTE_CRYPTO_AUTH_SM3_HMAC))) {
continue;
}
+ if (internals->qat_dev->has_wireless_slice && (
+ check_auth_capa(&capabilities[iter],
+ RTE_CRYPTO_AUTH_KASUMI_F9) ||
+ check_cipher_capa(&capabilities[iter],
+ RTE_CRYPTO_CIPHER_KASUMI_F8) ||
+ check_cipher_capa(&capabilities[iter],
+ RTE_CRYPTO_CIPHER_DES_CBC) ||
+ check_cipher_capa(&capabilities[iter],
+ RTE_CRYPTO_CIPHER_DES_DOCSISBPI)))
+ continue;
+
memcpy(addr + curr_capa, capabilities + iter,
sizeof(struct rte_cryptodev_capabilities));
curr_capa++;