DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] compress/qat: use compression specific driver name
@ 2018-08-10 15:18 Fiona Trahe
  2018-08-13 14:38 ` Jozwiak, TomaszX
  0 siblings, 1 reply; 3+ messages in thread
From: Fiona Trahe @ 2018-08-10 15:18 UTC (permalink / raw)
  To: dev, akhil.goyal, pablo.de.lara.guarch, tomaszx.jozwiak; +Cc: fiona.trahe

The QAT compression driver was named "qat".
Rename to compress_qat for consistency with other compressdev drivers
and with crypto_qat.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
The patch depends on
https://patches.dpdk.org/patch/43673/


 doc/guides/cryptodevs/qat.rst       |  2 +-
 drivers/common/qat/qat_device.h     |  5 +++++
 drivers/compress/qat/qat_comp_pmd.c | 18 +++++++++++++++++-
 drivers/compress/qat/qat_comp_pmd.h |  3 +++
 4 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
index 67b84b3..af10799 100644
--- a/doc/guides/cryptodevs/qat.rst
+++ b/doc/guides/cryptodevs/qat.rst
@@ -190,7 +190,7 @@ Device and driver naming
 
 	The qat crypto device name is in the format of the slave parameter passed to the crypto scheduler.
 
-* The qat compressdev driver name is "qat".
+* The qat compressdev driver name is "compress_qat".
   The rte_compressdev_devices_get() returns the devices exposed by this driver.
 
 * Each qat compression device has a unique name, in format
diff --git a/drivers/common/qat/qat_device.h b/drivers/common/qat/qat_device.h
index 9599fc5..3a71cd4 100644
--- a/drivers/common/qat/qat_device.h
+++ b/drivers/common/qat/qat_device.h
@@ -59,6 +59,11 @@ struct qat_pci_device {
 	/* Data relating to compression service */
 	struct qat_comp_dev_private *comp_dev;
 	/**< link back to compressdev private data */
+	struct rte_device comp_rte_dev;
+	/**< This represents the compression subset of this pci device.
+	 * Register with this rather than with the one in
+	 * pci_dev so that its driver can have a compression-specific name
+	 */
 
 	/* Data relating to asymmetric crypto service */
 
diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
index b89975f..e34c07b 100644
--- a/drivers/compress/qat/qat_comp_pmd.c
+++ b/drivers/compress/qat/qat_comp_pmd.c
@@ -348,6 +348,16 @@ static struct rte_compressdev_ops compress_qat_ops = {
 	.private_xform_free	= qat_comp_private_xform_free
 };
 
+/* An rte_driver is needed in the registration of the device with compressdev.
+ * The actual qat pci's rte_driver can't be used as its name represents
+ * the whole pci device with all services. Think of this as a holder for a name
+ * for the compression part of the pci device.
+ */
+static const char qat_comp_drv_name[] = RTE_STR(COMPRESSDEV_NAME_QAT_PMD);
+static const struct rte_driver compdev_qat_driver = {
+	.name = qat_comp_drv_name,
+	.alias = qat_comp_drv_name
+};
 int
 qat_comp_dev_create(struct qat_pci_device *qat_pci_dev)
 {
@@ -368,8 +378,14 @@ qat_comp_dev_create(struct qat_pci_device *qat_pci_dev)
 			qat_pci_dev->name, "comp");
 	QAT_LOG(DEBUG, "Creating QAT COMP device %s", name);
 
+	/* Populate subset device to use in compressdev device creation */
+	qat_pci_dev->comp_rte_dev.driver = &compdev_qat_driver;
+	qat_pci_dev->comp_rte_dev.numa_node =
+					qat_pci_dev->pci_dev->device.numa_node;
+	qat_pci_dev->comp_rte_dev.devargs = NULL;
+
 	compressdev = rte_compressdev_pmd_create(name,
-			&qat_pci_dev->pci_dev->device,
+			&(qat_pci_dev->comp_rte_dev),
 			sizeof(struct qat_comp_dev_private),
 			&init_params);
 
diff --git a/drivers/compress/qat/qat_comp_pmd.h b/drivers/compress/qat/qat_comp_pmd.h
index 9ad2a28..b8299d4 100644
--- a/drivers/compress/qat/qat_comp_pmd.h
+++ b/drivers/compress/qat/qat_comp_pmd.h
@@ -12,6 +12,9 @@
 
 #include "qat_device.h"
 
+/**< Intel(R) QAT Compression PMD driver name */
+#define COMPRESSDEV_NAME_QAT_PMD	compress_qat
+
 /** private data structure for a QAT compression device.
  * This QAT device is a device offering only a compression service,
  * there can be one of these on each qat_pci_device (VF).
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] compress/qat: use compression specific driver name
  2018-08-10 15:18 [dpdk-dev] [PATCH] compress/qat: use compression specific driver name Fiona Trahe
@ 2018-08-13 14:38 ` Jozwiak, TomaszX
  2018-08-23 12:58   ` Akhil Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: Jozwiak, TomaszX @ 2018-08-13 14:38 UTC (permalink / raw)
  To: Trahe, Fiona, dev, akhil.goyal, De Lara Guarch, Pablo



-----Original Message-----
From: Trahe, Fiona 
Sent: Friday, August 10, 2018 5:18 PM
To: dev@dpdk.org; akhil.goyal@nxp.com; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Jozwiak, TomaszX <tomaszx.jozwiak@intel.com>
Cc: Trahe, Fiona <fiona.trahe@intel.com>
Subject: [PATCH] compress/qat: use compression specific driver name

The QAT compression driver was named "qat".
Rename to compress_qat for consistency with other compressdev drivers and with crypto_qat.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: tomaszx.jozwiak@intel.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] compress/qat: use compression specific driver name
  2018-08-13 14:38 ` Jozwiak, TomaszX
@ 2018-08-23 12:58   ` Akhil Goyal
  0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2018-08-23 12:58 UTC (permalink / raw)
  To: Jozwiak, TomaszX, Trahe, Fiona, dev, De Lara Guarch, Pablo


On 8/13/2018 8:08 PM, Jozwiak, TomaszX wrote:

>
> -----Original Message-----
> From: Trahe, Fiona
> Sent: Friday, August 10, 2018 5:18 PM
> To: dev@dpdk.org; akhil.goyal@nxp.com; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Jozwiak, TomaszX <tomaszx.jozwiak@intel.com>
> Cc: Trahe, Fiona <fiona.trahe@intel.com>
> Subject: [PATCH] compress/qat: use compression specific driver name
>
> The QAT compression driver was named "qat".
> Rename to compress_qat for consistency with other compressdev drivers and with crypto_qat.
>
> Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
> Acked-by: tomaszx.jozwiak@intel.com
>
Applied to dpdk-next-crypto

Thanks

Akhil

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-23 12:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-10 15:18 [dpdk-dev] [PATCH] compress/qat: use compression specific driver name Fiona Trahe
2018-08-13 14:38 ` Jozwiak, TomaszX
2018-08-23 12:58   ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).