From: Fiona Trahe <fiona.trahe@intel.com>
To: dev@dpdk.org
Cc: pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com,
tomaszx.jozwiak@intel.com
Subject: [dpdk-dev] [PATCH v5 13/16] compress/qat: create and populate the ops structure
Date: Wed, 11 Jul 2018 12:57:06 +0100 [thread overview]
Message-ID: <1531310229-17448-14-git-send-email-fiona.trahe@intel.com> (raw)
In-Reply-To: <1531183311-32619-1-git-send-email-fiona.trahe@intel.com>
Create an ops structure and populate it with the
qat-specific functions.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
---
drivers/compress/qat/qat_comp_pmd.c | 38 ++++++++++++++++++++++++++++---------
drivers/compress/qat/qat_comp_pmd.h | 30 -----------------------------
2 files changed, 29 insertions(+), 39 deletions(-)
diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
index 1ab5cf7..013ff6e 100644
--- a/drivers/compress/qat/qat_comp_pmd.c
+++ b/drivers/compress/qat/qat_comp_pmd.c
@@ -5,7 +5,7 @@
#include "qat_comp.h"
#include "qat_comp_pmd.h"
-void
+static void
qat_comp_stats_get(struct rte_compressdev *dev,
struct rte_compressdev_stats *stats)
{
@@ -25,7 +25,7 @@ qat_comp_stats_get(struct rte_compressdev *dev,
stats->dequeue_err_count = qat_stats.dequeue_err_count;
}
-void
+static void
qat_comp_stats_reset(struct rte_compressdev *dev)
{
struct qat_comp_dev_private *qat_priv;
@@ -40,7 +40,7 @@ qat_comp_stats_reset(struct rte_compressdev *dev)
}
-int
+static int
qat_comp_qp_release(struct rte_compressdev *dev, uint16_t queue_pair_id)
{
struct qat_comp_dev_private *qat_private = dev->data->dev_private;
@@ -55,7 +55,7 @@ qat_comp_qp_release(struct rte_compressdev *dev, uint16_t queue_pair_id)
&(dev->data->queue_pairs[queue_pair_id]));
}
-int
+static int
qat_comp_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
uint32_t max_inflight_ops, int socket_id)
{
@@ -149,7 +149,7 @@ _qat_comp_dev_config_clear(struct qat_comp_dev_private *comp_dev)
}
}
-int
+static int
qat_comp_dev_config(struct rte_compressdev *dev,
struct rte_compressdev_config *config)
{
@@ -176,19 +176,19 @@ qat_comp_dev_config(struct rte_compressdev *dev,
return ret;
}
-int
+static int
qat_comp_dev_start(struct rte_compressdev *dev __rte_unused)
{
return 0;
}
-void
+static void
qat_comp_dev_stop(struct rte_compressdev *dev __rte_unused)
{
}
-int
+static int
qat_comp_dev_close(struct rte_compressdev *dev)
{
int i;
@@ -207,7 +207,7 @@ qat_comp_dev_close(struct rte_compressdev *dev)
}
-void
+static void
qat_comp_dev_info_get(struct rte_compressdev *dev,
struct rte_compressdev_info *info)
{
@@ -238,3 +238,23 @@ qat_comp_pmd_dequeue_op_burst(void *qp, struct rte_comp_op **ops,
{
return qat_dequeue_op_burst(qp, (void **)ops, nb_ops);
}
+
+
+struct rte_compressdev_ops compress_qat_ops = {
+
+ /* Device related operations */
+ .dev_configure = qat_comp_dev_config,
+ .dev_start = qat_comp_dev_start,
+ .dev_stop = qat_comp_dev_stop,
+ .dev_close = qat_comp_dev_close,
+ .dev_infos_get = qat_comp_dev_info_get,
+
+ .stats_get = qat_comp_stats_get,
+ .stats_reset = qat_comp_stats_reset,
+ .queue_pair_setup = qat_comp_qp_setup,
+ .queue_pair_release = qat_comp_qp_release,
+
+ /* Compression related operations */
+ .private_xform_create = qat_comp_private_xform_create,
+ .private_xform_free = qat_comp_private_xform_free
+};
diff --git a/drivers/compress/qat/qat_comp_pmd.h b/drivers/compress/qat/qat_comp_pmd.h
index 22cbefb..7ba1b8d 100644
--- a/drivers/compress/qat/qat_comp_pmd.h
+++ b/drivers/compress/qat/qat_comp_pmd.h
@@ -30,30 +30,6 @@ struct qat_comp_dev_private {
};
-void
-qat_comp_stats_reset(struct rte_compressdev *dev);
-
-void
-qat_comp_stats_get(struct rte_compressdev *dev,
- struct rte_compressdev_stats *stats);
-int
-qat_comp_qp_release(struct rte_compressdev *dev, uint16_t queue_pair_id);
-
-int
-qat_comp_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
- uint32_t max_inflight_ops, int socket_id);
-
-int
-qat_comp_dev_config(struct rte_compressdev *dev,
- struct rte_compressdev_config *config);
-
-int
-qat_comp_dev_close(struct rte_compressdev *dev);
-
-void
-qat_comp_dev_info_get(struct rte_compressdev *dev,
- struct rte_compressdev_info *info);
-
uint16_t
qat_comp_pmd_enqueue_op_burst(void *qp, struct rte_comp_op **ops,
uint16_t nb_ops);
@@ -62,11 +38,5 @@ uint16_t
qat_comp_pmd_dequeue_op_burst(void *qp, struct rte_comp_op **ops,
uint16_t nb_ops);
-int
-qat_comp_dev_start(struct rte_compressdev *dev __rte_unused);
-
-void
-qat_comp_dev_stop(struct rte_compressdev *dev __rte_unused);
-
#endif
#endif /* _QAT_COMP_PMD_H_ */
--
2.7.4
next prev parent reply other threads:[~2018-07-11 11:57 UTC|newest]
Thread overview: 106+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-23 18:40 [dpdk-dev] [PATCH] compress/qat: add compression PMD Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 00/16] " Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 " Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 " Fiona Trahe
2018-07-11 11:56 ` [dpdk-dev] [PATCH v5 " Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 " Fiona Trahe
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 " Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 01/16] common/qat: updated firmware headers Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 02/16] compress/qat: add makefiles for PMD Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 03/16] compress/qat: add meson build Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 04/16] compress/qat: add xform processing Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 05/16] compress/qat: create FW request and process response Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 06/16] compress/qat: check that correct firmware is in use Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 07/16] compress/qat: add stats functions Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 08/16] compress/qat: setup queue-pairs for compression service Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 09/16] compress/qat: add fns to configure and clear device Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 10/16] compress/qat: add fn to return device info Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 11/16] compress/qat: add enqueue/dequeue functions Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 12/16] compress/qat: add device start and stop fns Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 13/16] compress/qat: create and populate the ops structure Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 14/16] compress/qat: add fns to create and destroy the PMD Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 15/16] compress/qat: prevent device usage if incorrect firmware Pablo de Lara
2018-07-13 2:28 ` [dpdk-dev] [PATCH v7 16/16] doc/qat: refactor docs adding compression guide Pablo de Lara
2018-07-13 14:22 ` [dpdk-dev] [PATCH v7 00/16] compress/qat: add compression PMD De Lara Guarch, Pablo
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 01/16] common/qat: updated firmware headers Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 02/16] compress/qat: add makefiles for PMD Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 03/16] compress/qat: add meson build Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 04/16] compress/qat: add xform processing Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 05/16] compress/qat: create fw request and process response Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 06/16] compress/qat: check that correct firmware is in use Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 07/16] compress/qat: add stats functions Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 08/16] compress/qat: setup queue-pairs for compression service Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 09/16] compress/qat: add fns to configure and clear device Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 10/16] compress/qat: add fn to return device info Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 11/16] compress/qat: add enqueue/dequeue functions Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 12/16] compress/qat: add device start and stop fns Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 13/16] compress/qat: create and populate the ops structure Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 14/16] compress/qat: add fns to create and destroy the PMD Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 15/16] compress/qat: prevent device usage if incorrect firmware Fiona Trahe
2018-07-12 16:04 ` [dpdk-dev] [PATCH v6 16/16] docs/qat: refactor docs adding compression guide Fiona Trahe
2018-07-11 11:56 ` [dpdk-dev] [PATCH v5 01/16] common/qat: updated firmware headers Fiona Trahe
2018-07-11 11:56 ` [dpdk-dev] [PATCH v5 02/16] compress/qat: add makefiles for PMD Fiona Trahe
2018-07-12 12:41 ` De Lara Guarch, Pablo
2018-07-11 11:56 ` [dpdk-dev] [PATCH v5 03/16] compress/qat: add meson build Fiona Trahe
2018-07-11 11:56 ` [dpdk-dev] [PATCH v5 04/16] compress/qat: add xform processing Fiona Trahe
2018-07-11 11:56 ` [dpdk-dev] [PATCH v5 05/16] compress/qat: create fw request and process response Fiona Trahe
2018-07-11 11:56 ` [dpdk-dev] [PATCH v5 06/16] compress/qat: check that correct firmware is in use Fiona Trahe
2018-07-11 11:57 ` [dpdk-dev] [PATCH v5 07/16] compress/qat: add stats functions Fiona Trahe
2018-07-11 11:57 ` [dpdk-dev] [PATCH v5 08/16] compress/qat: setup queue-pairs for compression service Fiona Trahe
2018-07-11 11:57 ` [dpdk-dev] [PATCH v5 09/16] compress/qat: add fns to configure and clear device Fiona Trahe
2018-07-11 11:57 ` [dpdk-dev] [PATCH v5 10/16] compress/qat: add fn to return device info Fiona Trahe
2018-07-11 11:57 ` [dpdk-dev] [PATCH v5 11/16] compress/qat: add enqueue/dequeue functions Fiona Trahe
2018-07-11 11:57 ` [dpdk-dev] [PATCH v5 12/16] compress/qat: add device start and stop fns Fiona Trahe
2018-07-11 11:57 ` Fiona Trahe [this message]
2018-07-11 11:57 ` [dpdk-dev] [PATCH v5 14/16] compress/qat: add fns to create and destroy the PMD Fiona Trahe
2018-07-11 11:57 ` [dpdk-dev] [PATCH v5 15/16] compress/qat: prevent device usage if incorrect firmware Fiona Trahe
2018-07-11 11:57 ` [dpdk-dev] [PATCH v5 16/16] docs/qat: refactor docs adding compression guide Fiona Trahe
2018-07-12 15:56 ` De Lara Guarch, Pablo
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 01/16] common/qat: updated firmware headers Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 02/16] compress/qat: add makefiles for PMD Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 03/16] compress/qat: add meson build Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 04/16] compress/qat: add xform processing Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 05/16] compress/qat: create fw request and process response Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 06/16] compress/qat: check that correct firmware is in use Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 07/16] compress/qat: add stats functions Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 08/16] compress/qat: setup queue-pairs for compression service Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 09/16] compress/qat: add fns to configure and clear device Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 10/16] compress/qat: add fn to return device info Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 11/16] compress/qat: add enqueue/dequeue functions Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 12/16] compress/qat: add device start and stop fns Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 13/16] compress/qat: create and populate the ops structure Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 14/16] compress/qat: add fns to create and destroy the PMD Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 15/16] compress/qat: prevent device usage if incorrect firmware Fiona Trahe
2018-07-10 0:41 ` [dpdk-dev] [PATCH v4 16/16] docs/qat: refactor docs adding compression guide Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 01/16] common/qat: updated firmware headers Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 02/16] compress/qat: add makefiles for PMD Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 03/16] compress/qat: add meson build Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 04/16] compress/qat: add xform processing Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 05/16] compress/qat: create fw request and process response Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 06/16] compress/qat: check that correct firmware is in use Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 07/16] compress/qat: add stats functions Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 08/16] compress/qat: setup queue-pairs for compression service Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 09/16] compress/qat: add fns to configure and clear device Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 10/16] compress/qat: add fn to return device info Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 11/16] compress/qat: add enqueue/dequeue functions Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 12/16] compress/qat: add device start and stop fns Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 13/16] compress/qat: create and populate the ops structure Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 14/16] compress/qat: add fns to create and destroy the PMD Fiona Trahe
2018-07-05 17:32 ` [dpdk-dev] [PATCH v3 15/16] compress/qat: prevent device usage if incorrect firmware Fiona Trahe
2018-07-05 17:33 ` [dpdk-dev] [PATCH v3 16/16] docs/qat: refactor docs adding compression guide Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 01/16] common/qat: updated firmware headers Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 02/16] compress/qat: add makefiles for PMD Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 03/16] compress/qat: add meson build Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 04/16] compress/qat: add xform processing Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 05/16] compress/qat: create fw request and process response Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 06/16] compress/qat: check that correct firmware is in use Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 07/16] compress/qat: add stats functions Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 08/16] compress/qat: setup queue-pairs for compression service Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 09/16] compress/qat: add fns to configure and clear device Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 10/16] compress/qat: add fn to return device info Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 11/16] compress/qat: add enqueue/dequeue functions Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 12/16] compress/qat: add device start and stop fns Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 13/16] compress/qat: create and populate the ops structure Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 14/16] compress/qat: add fns to create and destroy the PMD Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 15/16] compress/qat: prevent device usage if incorrect firmware Fiona Trahe
2018-07-05 16:05 ` [dpdk-dev] [PATCH v2 16/16] docs/qat: refactor docs adding compression guide Fiona Trahe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1531310229-17448-14-git-send-email-fiona.trahe@intel.com \
--to=fiona.trahe@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.com \
--cc=tomaszx.jozwiak@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).