[v2] drivers/qat: fix failure to create PMD
Checks
Commit Message
If QAT crypto pmd failed to be created due to reaching MAX
cryptodevs it prevented QAT comp PMD being created. And vice versa.
Change to warning in these cases and allow the other PMD to be created.
Clarify in documentation.
Fixes: c0c90bc4cade ("compress/qat: add create and destroy functions")
Cc: stable@dpdk.org
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
v2 changes:
- clarified documentation
doc/guides/cryptodevs/qat.rst | 6 +++---
drivers/compress/qat/qat_comp_pmd.c | 6 ++++--
drivers/crypto/qat/qat_sym_pmd.c | 6 ++++--
3 files changed, 11 insertions(+), 7 deletions(-)
@@ -166,9 +166,9 @@ options and is built by default.
The number of VFs per PF varies - see table below. If multiple QAT packages are
installed on a platform then CONFIG_RTE_PMD_QAT_MAX_PCI_DEVICES should be
adjusted to the number of VFs which the QAT common code will need to handle.
-Note, there is a separate config item for max cryptodevs CONFIG_RTE_CRYPTO_MAX_DEVS,
-if necessary this should be adjusted to handle the total of QAT and other devices
-which the process will use.
+Note, there are separate config items for max cryptodevs CONFIG_RTE_CRYPTO_MAX_DEVS
+and max compressdevs CONFIG_RTE_COMPRESS_MAX_DEVS, if necessary these should
+be adjusted to handle the total of QAT and other devices which the process will use.
QAT allocates internal structures to handle SGLs. For the compression service
CONFIG_RTE_PMD_QAT_COMP_SGL_MAX_SEGMENTS can be changed if more segments are needed.
@@ -389,8 +389,10 @@ qat_comp_dev_create(struct qat_pci_device *qat_pci_dev)
sizeof(struct qat_comp_dev_private),
&init_params);
- if (compressdev == NULL)
- return -ENODEV;
+ if (compressdev == NULL) {
+ QAT_LOG(WARNING, "Failed to create QAT COMP device %s", name);
+ return 0;
+ }
compressdev->dev_ops = &compress_qat_ops;
@@ -261,8 +261,10 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
cryptodev = rte_cryptodev_pmd_create(name,
&(qat_pci_dev->sym_rte_dev), &init_params);
- if (cryptodev == NULL)
- return -ENODEV;
+ if (cryptodev == NULL) {
+ QAT_LOG(WARNING, "Failed to create QAT SYM device %s", name);
+ return 0;
+ }
qat_pci_dev->sym_rte_dev.name = cryptodev->data->name;
cryptodev->driver_id = cryptodev_qat_driver_id;