From: Hanxiao Li <li.hanxiao@zte.com.cn>
To: dev@dpdk.org
Cc: wang.yong19@zte.com.cn, Hanxiao Li <li.hanxiao@zte.com.cn>
Subject: [PATCH v6 4/8] zsda: add zsda compressdev driver and interface
Date: Wed, 11 Sep 2024 15:54:26 +0800 [thread overview]
Message-ID: <20240911075447.4074486-3-li.hanxiao@zte.com.cn> (raw)
In-Reply-To: <20240911075447.4074486-1-li.hanxiao@zte.com.cn>
[-- Attachment #1.1.1: Type: text/plain, Size: 27957 bytes --]
Add zsda compressdev driver and enqueue, dequeue interface.
Signed-off-by: Hanxiao Li <li.hanxiao@zte.com.cn>
---
drivers/common/zsda/meson.build | 2 +-
drivers/compress/zsda/zsda_comp.c | 358 ++++++++++++++++++++
drivers/compress/zsda/zsda_comp.h | 27 ++
drivers/compress/zsda/zsda_comp_pmd.c | 453 ++++++++++++++++++++++++++
drivers/compress/zsda/zsda_comp_pmd.h | 39 +++
drivers/meson.build | 1 +
6 files changed, 879 insertions(+), 1 deletion(-)
create mode 100644 drivers/compress/zsda/zsda_comp.c
create mode 100644 drivers/compress/zsda/zsda_comp.h
create mode 100644 drivers/compress/zsda/zsda_comp_pmd.c
create mode 100644 drivers/compress/zsda/zsda_comp_pmd.h
diff --git a/drivers/common/zsda/meson.build b/drivers/common/zsda/meson.build
index b12ef17476..e2a214bbe8 100644
--- a/drivers/common/zsda/meson.build
+++ b/drivers/common/zsda/meson.build
@@ -17,7 +17,7 @@ zsda_compress_relpath = '../../' + zsda_compress_path
includes += include_directories(zsda_compress_relpath)
if zsda_compress
-zlib = dependency('zlib', required: false, method: 'pkg-config')
+ zlib = dependency('zlib', required: false, method: 'pkg-config')
foreach f: ['zsda_comp_pmd.c', 'zsda_comp.c']
sources += files(join_paths(zsda_compress_relpath, f))
endforeach
diff --git a/drivers/compress/zsda/zsda_comp.c b/drivers/compress/zsda/zsda_comp.c
new file mode 100644
index 0000000000..0bf0736be5
--- /dev/null
+++ b/drivers/compress/zsda/zsda_comp.c
@@ -0,0 +1,358 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2024 ZTE Corporation
+ */
+
+#include "zsda_comp.h"
+
+#define ZLIB_HEADER_SIZE 2
+#define ZLIB_TRAILER_SIZE 4
+#define GZIP_HEADER_SIZE 10
+#define GZIP_TRAILER_SIZE 8
+#define CHECKSUM_SIZE 4
+
+static uint32_t zsda_read_chksum(uint8_t *data_addr, uint8_t op_code,
+ uint32_t produced);
+
+static uint32_t
+zsda_crc32(const unsigned char *data, size_t length)
+{
+ uint32_t crc32_table[256];
+ uint32_t polynomial = 0xEDB88320;
+ uint32_t crc, i, j;
+ uint8_t index;
+
+ for (i = 0; i < 256; i++) {
+ crc = i;
+ for (j = 0; j < 8; j++) {
+ if (crc & 1)
+ crc = (crc >> 1) ^ polynomial;
+ else
+ crc >>= 1;
+ }
+ crc32_table[i] = crc;
+ }
+
+ crc = 0xFFFFFFFF;
+ for (i = 0; i < length; i++) {
+ index = (crc ^ data[i]) & 0xFF;
+ crc = (crc >> 8) ^ crc32_table[index];
+ }
+ return crc ^ 0xFFFFFFFF;
+}
+
+#define MOD_ADLER 65521
+static uint32_t
+zsda_adler32(const uint8_t *buf, uint32_t len)
+{
+ uint32_t s1 = 1;
+ uint32_t s2 = 0;
+
+ for (uint32_t i = 0; i < len; i++) {
+ s1 = (s1 + buf[i]) % MOD_ADLER;
+ s2 = (s2 + s1) % MOD_ADLER;
+ }
+
+ return (s2 << 16) | s1;
+}
+
+int
+zsda_comp_match(const void *op_in)
+{
+ const struct rte_comp_op *op = (const struct rte_comp_op *)op_in;
+ const struct zsda_comp_xform *xform =
+ (struct zsda_comp_xform *)op->private_xform;
+
+ if (op->op_type != RTE_COMP_OP_STATELESS)
+ return 0;
+
+ if (xform->type != RTE_COMP_COMPRESS)
+ return 0;
+
+ return 1;
+}
+
+static uint8_t
+get_opcode(const struct zsda_comp_xform *xform)
+{
+ if (xform->type == RTE_COMP_COMPRESS) {
+ if (xform->checksum_type == RTE_COMP_CHECKSUM_NONE ||
+ xform->checksum_type == RTE_COMP_CHECKSUM_CRC32)
+ return ZSDA_OPC_COMP_GZIP;
+ else if (xform->checksum_type == RTE_COMP_CHECKSUM_ADLER32)
+ return ZSDA_OPC_COMP_ZLIB;
+ }
+ if (xform->type == RTE_COMP_DECOMPRESS) {
+ if (xform->checksum_type == RTE_COMP_CHECKSUM_CRC32 ||
+ xform->checksum_type == RTE_COMP_CHECKSUM_NONE)
+ return ZSDA_OPC_DECOMP_GZIP;
+ else if (xform->checksum_type == RTE_COMP_CHECKSUM_ADLER32)
+ return ZSDA_OPC_DECOMP_ZLIB;
+ }
+
+ return ZSDA_OPC_INVALID;
+}
+
+int
+zsda_build_comp_request(void *op_in, const struct zsda_queue *queue,
+ void **op_cookies, const uint16_t new_tail)
+{
+ struct rte_comp_op *op = op_in;
+ struct zsda_comp_xform *xform =
+ (struct zsda_comp_xform *)op->private_xform;
+ struct zsda_wqe_comp *wqe =
+ (struct zsda_wqe_comp *)(queue->base_addr +
+ (new_tail * queue->msg_size));
+
+ struct zsda_op_cookie *cookie =
+ (struct zsda_op_cookie *)op_cookies[new_tail];
+ struct zsda_sgl *sgl_src = (struct zsda_sgl *)&cookie->sgl_src;
+ struct zsda_sgl *sgl_dst = (struct zsda_sgl *)&cookie->sgl_dst;
+ struct comp_head_info comp_head_info;
+
+ uint8_t opcode;
+ int ret = 0;
+ uint32_t op_offset;
+ uint32_t op_src_len;
+ uint32_t op_dst_len;
+ uint32_t head_len;
+
+ if ((op->m_dst == NULL) || (op->m_dst == op->m_src)) {
+ ZSDA_LOG(ERR, "Failed! m_dst");
+ return -EINVAL;
+ }
+
+ opcode = get_opcode(xform);
+ if (opcode == ZSDA_OPC_INVALID) {
+ ZSDA_LOG(ERR, E_CONFIG);
+ return -EINVAL;
+ }
+
+ cookie->used = true;
+ cookie->sid = new_tail;
+ cookie->op = op;
+
+ if (opcode == ZSDA_OPC_COMP_GZIP)
+ head_len = GZIP_HEADER_SIZE;
+ else if (opcode == ZSDA_OPC_COMP_ZLIB)
+ head_len = ZLIB_HEADER_SIZE;
+ else {
+ ZSDA_LOG(ERR, "Comp, op_code error!");
+ return -EINVAL;
+ }
+
+ comp_head_info.head_len = head_len;
+ comp_head_info.head_phys_addr = cookie->comp_head_phys_addr;
+
+ op_offset = op->src.offset;
+ op_src_len = op->src.length;
+ ret = zsda_fill_sgl(op->m_src, op_offset, sgl_src,
+ cookie->sgl_src_phys_addr, op_src_len, NULL);
+
+ op_offset = op->dst.offset;
+ op_dst_len = op->m_dst->pkt_len - op_offset;
+ op_dst_len += head_len;
+ ret |= zsda_fill_sgl(op->m_dst, op_offset, sgl_dst,
+ cookie->sgl_dst_phys_addr, op_dst_len,
+ &comp_head_info);
+
+ if (ret) {
+ ZSDA_LOG(ERR, E_FUNC);
+ return ret;
+ }
+
+ memset(wqe, 0, sizeof(struct zsda_wqe_comp));
+ wqe->rx_length = op_src_len;
+ wqe->tx_length = op_dst_len;
+ wqe->valid = queue->valid;
+ wqe->op_code = opcode;
+ wqe->sid = cookie->sid;
+ wqe->rx_sgl_type = SGL_ELM_TYPE_LIST;
+ wqe->tx_sgl_type = SGL_ELM_TYPE_LIST;
+
+ wqe->rx_addr = cookie->sgl_src_phys_addr;
+ wqe->tx_addr = cookie->sgl_dst_phys_addr;
+
+ return ret;
+}
+
+int
+zsda_decomp_match(const void *op_in)
+{
+ const struct rte_comp_op *op = (const struct rte_comp_op *)op_in;
+ const struct zsda_comp_xform *xform =
+ (struct zsda_comp_xform *)op->private_xform;
+
+ if (op->op_type != RTE_COMP_OP_STATELESS)
+ return 0;
+
+ if (xform->type != RTE_COMP_DECOMPRESS)
+ return 0;
+ return 1;
+}
+
+int
+zsda_build_decomp_request(void *op_in, const struct zsda_queue *queue,
+ void **op_cookies, const uint16_t new_tail)
+{
+ struct rte_comp_op *op = op_in;
+ struct zsda_comp_xform *xform =
+ (struct zsda_comp_xform *)op->private_xform;
+
+ struct zsda_wqe_comp *wqe =
+ (struct zsda_wqe_comp *)(queue->base_addr +
+ (new_tail * queue->msg_size));
+ struct zsda_op_cookie *cookie =
+ (struct zsda_op_cookie *)op_cookies[new_tail];
+ struct zsda_sgl *sgl_src = (struct zsda_sgl *)&cookie->sgl_src;
+ struct zsda_sgl *sgl_dst = (struct zsda_sgl *)&cookie->sgl_dst;
+ uint8_t opcode;
+ int ret = 0;
+
+ uint32_t op_offset;
+ uint32_t op_src_len;
+ uint32_t op_dst_len;
+
+ uint8_t *head_data;
+ uint16_t head_len;
+ struct comp_head_info comp_head_info;
+ uint8_t head_zlib[ZLIB_HEADER_SIZE] = {0x78, 0xDA};
+ uint8_t head_gzip[GZIP_HEADER_SIZE] = {0x1F, 0x8B, 0x08, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03};
+
+ if ((op->m_dst == NULL) || (op->m_dst == op->m_src)) {
+ ZSDA_LOG(ERR, "Failed! m_dst");
+ return -EINVAL;
+ }
+
+ opcode = get_opcode(xform);
+ if (opcode == ZSDA_OPC_INVALID) {
+ ZSDA_LOG(ERR, E_CONFIG);
+ return -EINVAL;
+ }
+
+ cookie->used = true;
+ cookie->sid = new_tail;
+ cookie->op = op;
+
+ if (opcode == ZSDA_OPC_DECOMP_GZIP) {
+ head_data = head_gzip;
+ head_len = GZIP_HEADER_SIZE;
+ } else if (opcode == ZSDA_OPC_DECOMP_ZLIB) {
+ head_data = head_zlib;
+ head_len = ZLIB_HEADER_SIZE;
+ } else {
+ ZSDA_LOG(ERR, "Comp, op_code error!");
+ return -EINVAL;
+ }
+
+ op_offset = op->src.offset;
+ op_src_len = op->src.length;
+ op_src_len += head_len;
+ comp_head_info.head_len = head_len;
+ comp_head_info.head_phys_addr = cookie->comp_head_phys_addr;
+ cookie->decomp_no_tail = true;
+ for (int i = 0; i < head_len; i++)
+ cookie->comp_head[i] = head_data[i];
+
+ ret = zsda_fill_sgl(op->m_src, op_offset, sgl_src,
+ cookie->sgl_src_phys_addr, op_src_len,
+ &comp_head_info);
+
+ op_offset = op->dst.offset;
+ op_dst_len = op->m_dst->pkt_len - op_offset;
+ ret |= zsda_fill_sgl(op->m_dst, op_offset, sgl_dst,
+ cookie->sgl_dst_phys_addr, op_dst_len, NULL);
+
+ if (ret) {
+ ZSDA_LOG(ERR, E_FUNC);
+ return ret;
+ }
+
+ memset(wqe, 0, sizeof(struct zsda_wqe_comp));
+
+ wqe->rx_length = op_src_len;
+ wqe->tx_length = op_dst_len;
+ wqe->valid = queue->valid;
+ wqe->op_code = opcode;
+ wqe->sid = cookie->sid;
+ wqe->rx_sgl_type = SGL_ELM_TYPE_LIST;
+ wqe->tx_sgl_type = SGL_ELM_TYPE_LIST;
+ wqe->rx_addr = cookie->sgl_src_phys_addr;
+ wqe->tx_addr = cookie->sgl_dst_phys_addr;
+
+ return ret;
+}
+
+void
+zsda_comp_callback(void *cookie_in, const struct zsda_cqe *cqe)
+{
+ struct zsda_op_cookie *tmp_cookie = (struct zsda_op_cookie *)cookie_in;
+ struct rte_comp_op *tmp_op = (struct rte_comp_op *)tmp_cookie->op;
+ uint8_t *data_addr =
+ (uint8_t *)tmp_op->m_dst->buf_addr + tmp_op->m_dst->data_off;
+ uint32_t chksum = 0;
+ uint16_t head_len;
+ uint16_t tail_len;
+
+ if (!(CQE_ERR0(cqe->err0) || CQE_ERR1(cqe->err1)))
+ tmp_op->status = RTE_COMP_OP_STATUS_SUCCESS;
+ else {
+ tmp_op->status = RTE_COMP_OP_STATUS_ERROR;
+ return;
+ }
+
+ /* handle chksum */
+ tmp_op->produced = cqe->tx_real_length;
+ if (cqe->op_code == ZSDA_OPC_COMP_ZLIB) {
+ head_len = ZLIB_HEADER_SIZE;
+ tail_len = ZLIB_TRAILER_SIZE;
+ chksum = zsda_read_chksum(data_addr, cqe->op_code,
+ tmp_op->produced - head_len);
+ }
+ if (cqe->op_code == ZSDA_OPC_COMP_GZIP) {
+ head_len = GZIP_HEADER_SIZE;
+ tail_len = GZIP_TRAILER_SIZE;
+ chksum = zsda_read_chksum(data_addr, cqe->op_code,
+ tmp_op->produced - head_len);
+ } else if (cqe->op_code == ZSDA_OPC_DECOMP_ZLIB) {
+ head_len = ZLIB_HEADER_SIZE;
+ tail_len = ZLIB_TRAILER_SIZE;
+ chksum = zsda_adler32(data_addr, tmp_op->produced);
+ } else if (cqe->op_code == ZSDA_OPC_DECOMP_GZIP) {
+ head_len = GZIP_HEADER_SIZE;
+ tail_len = GZIP_TRAILER_SIZE;
+ chksum = zsda_crc32(data_addr, tmp_op->produced);
+ }
+ tmp_op->output_chksum = chksum;
+
+ if (cqe->op_code == ZSDA_OPC_COMP_ZLIB ||
+ cqe->op_code == ZSDA_OPC_COMP_GZIP) {
+ /* remove tail data*/
+ rte_pktmbuf_trim(tmp_op->m_dst, GZIP_TRAILER_SIZE);
+ /* remove head and tail length */
+ tmp_op->produced = tmp_op->produced - (head_len + tail_len);
+ }
+
+}
+
+static uint32_t
+zsda_read_chksum(uint8_t *data_addr, uint8_t op_code, uint32_t produced)
+{
+ uint8_t *chk_addr;
+ uint32_t chksum = 0;
+ int i = 0;
+
+ if (op_code == ZSDA_OPC_COMP_ZLIB) {
+ chk_addr = data_addr + produced - ZLIB_TRAILER_SIZE;
+ for (i = 0; i < CHECKSUM_SIZE; i++) {
+ chksum = chksum << 8;
+ chksum |= (*(chk_addr + i));
+ }
+ } else if (op_code == ZSDA_OPC_COMP_GZIP) {
+ chk_addr = data_addr + produced - GZIP_TRAILER_SIZE;
+ for (i = 0; i < CHECKSUM_SIZE; i++)
+ chksum |= (*(chk_addr + i) << (i * 8));
+ }
+
+ return chksum;
+}
diff --git a/drivers/compress/zsda/zsda_comp.h b/drivers/compress/zsda/zsda_comp.h
new file mode 100644
index 0000000000..697d3e3564
--- /dev/null
+++ b/drivers/compress/zsda/zsda_comp.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2024 ZTE Corporation
+ */
+
+#ifndef _ZSDA_COMP_H_
+#define _ZSDA_COMP_H_
+
+#include <rte_compressdev.h>
+
+#include "zsda_common.h"
+#include "zsda_device.h"
+#include "zsda_qp.h"
+
+struct zsda_comp_xform {
+ enum rte_comp_xform_type type;
+ enum rte_comp_checksum_type checksum_type;
+};
+
+int zsda_comp_match(const void *op_in);
+int zsda_build_comp_request(void *op_in, const struct zsda_queue *queue,
+ void **op_cookies, const uint16_t new_tail);
+int zsda_decomp_match(const void *op_in);
+int zsda_build_decomp_request(void *op_in, const struct zsda_queue *queue,
+ void **op_cookies, const uint16_t new_tail);
+void zsda_comp_callback(void *cookie_in, const struct zsda_cqe *cqe);
+
+#endif
diff --git a/drivers/compress/zsda/zsda_comp_pmd.c b/drivers/compress/zsda/zsda_comp_pmd.c
new file mode 100644
index 0000000000..cd435927a6
--- /dev/null
+++ b/drivers/compress/zsda/zsda_comp_pmd.c
@@ -0,0 +1,453 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2024 ZTE Corporation
+ */
+
+#include <rte_malloc.h>
+
+#include "zsda_comp.h"
+#include "zsda_comp_pmd.h"
+
+static const struct rte_compressdev_capabilities zsda_comp_capabilities[] = {
+ {
+ .algo = RTE_COMP_ALGO_DEFLATE,
+ .comp_feature_flags = RTE_COMP_FF_HUFFMAN_DYNAMIC |
+ RTE_COMP_FF_OOP_SGL_IN_SGL_OUT |
+ RTE_COMP_FF_OOP_SGL_IN_LB_OUT |
+ RTE_COMP_FF_OOP_LB_IN_SGL_OUT |
+ RTE_COMP_FF_CRC32_CHECKSUM |
+ RTE_COMP_FF_ADLER32_CHECKSUM,
+ .window_size = {.min = 15, .max = 15, .increment = 0},
+ },
+};
+
+static void
+zsda_comp_stats_get(struct rte_compressdev *dev,
+ struct rte_compressdev_stats *stats)
+{
+ struct zsda_common_stat comm = {0};
+
+ zsda_stats_get(dev->data->queue_pairs, dev->data->nb_queue_pairs,
+ &comm);
+ stats->enqueued_count = comm.enqueued_count;
+ stats->dequeued_count = comm.dequeued_count;
+ stats->enqueue_err_count = comm.enqueue_err_count;
+ stats->dequeue_err_count = comm.dequeue_err_count;
+}
+
+static void
+zsda_comp_stats_reset(struct rte_compressdev *dev)
+{
+ zsda_stats_reset(dev->data->queue_pairs, dev->data->nb_queue_pairs);
+}
+
+static int
+zsda_comp_qp_release(struct rte_compressdev *dev, uint16_t queue_pair_id)
+{
+ return zsda_queue_pair_release(
+ (struct zsda_qp **)&(dev->data->queue_pairs[queue_pair_id]));
+}
+
+
+static int
+zsda_setup_comp_queue(struct zsda_pci_device *zsda_pci_dev, const uint16_t qp_id,
+ struct zsda_qp *qp, uint16_t nb_des, int socket_id)
+{
+ enum zsda_service_type type = ZSDA_SERVICE_COMPRESSION;
+ struct zsda_qp_config conf;
+ int ret = 0;
+ struct zsda_qp_hw *qp_hw;
+
+ qp_hw = zsda_qps_hw_per_service(zsda_pci_dev, type);
+ conf.hw = qp_hw->data + qp_id;
+ conf.service_type = type;
+ conf.cookie_size = sizeof(struct zsda_op_cookie);
+ conf.nb_descriptors = nb_des;
+ conf.socket_id = socket_id;
+ conf.service_str = "comp";
+
+ ret = zsda_common_setup_qp(zsda_pci_dev->zsda_dev_id, &qp, qp_id, &conf);
+ qp->srv[type].rx_cb = zsda_comp_callback;
+ qp->srv[type].tx_cb = zsda_build_comp_request;
+ qp->srv[type].match = zsda_comp_match;
+
+ return ret;
+}
+
+static int
+zsda_setup_decomp_queue(struct zsda_pci_device *zsda_pci_dev, const uint16_t qp_id,
+ struct zsda_qp *qp, uint16_t nb_des, int socket_id)
+{
+ enum zsda_service_type type = ZSDA_SERVICE_DECOMPRESSION;
+ struct zsda_qp_config conf;
+ int ret = 0;
+ struct zsda_qp_hw *qp_hw;
+
+ qp_hw = zsda_qps_hw_per_service(zsda_pci_dev, type);
+ conf.hw = qp_hw->data + qp_id;
+ conf.service_type = type;
+ conf.cookie_size = sizeof(struct zsda_op_cookie);
+ conf.nb_descriptors = nb_des;
+ conf.socket_id = socket_id;
+ conf.service_str = "decomp";
+
+ ret = zsda_common_setup_qp(zsda_pci_dev->zsda_dev_id, &qp, qp_id, &conf);
+ qp->srv[type].rx_cb = zsda_comp_callback;
+ qp->srv[type].tx_cb = zsda_build_decomp_request;
+ qp->srv[type].match = zsda_decomp_match;
+
+ return ret;
+}
+
+static int
+zsda_comp_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
+ uint32_t max_inflight_ops, int socket_id)
+{
+ int ret = 0;
+ struct zsda_qp *qp_new;
+
+ struct zsda_qp **qp_addr =
+ (struct zsda_qp **)&(dev->data->queue_pairs[qp_id]);
+ struct zsda_comp_dev_private *comp_priv = dev->data->dev_private;
+ struct zsda_pci_device *zsda_pci_dev = comp_priv->zsda_pci_dev;
+ uint16_t num_qps_comp =
+ zsda_qps_per_service(zsda_pci_dev, ZSDA_SERVICE_COMPRESSION);
+ uint16_t num_qps_decomp =
+ zsda_qps_per_service(zsda_pci_dev, ZSDA_SERVICE_DECOMPRESSION);
+ uint16_t nb_des = max_inflight_ops & 0xffff;
+
+ nb_des = (nb_des == NB_DES) ? nb_des : NB_DES;
+
+ if (*qp_addr != NULL) {
+ ret = zsda_comp_qp_release(dev, qp_id);
+ if (ret)
+ return ret;
+ }
+
+ qp_new = rte_zmalloc_socket("zsda PMD qp metadata", sizeof(*qp_new),
+ RTE_CACHE_LINE_SIZE, socket_id);
+ if (qp_new == NULL) {
+ ZSDA_LOG(ERR, E_MALLOC);
+ return -ENOMEM;
+ }
+
+ if (num_qps_comp == MAX_QPS_ON_FUNCTION)
+ ret = zsda_setup_comp_queue(zsda_pci_dev, qp_id, qp_new, nb_des,
+ socket_id);
+ else if (num_qps_decomp == MAX_QPS_ON_FUNCTION)
+ ret = zsda_setup_decomp_queue(zsda_pci_dev, qp_id, qp_new, nb_des,
+ socket_id);
+ else {
+ ret = zsda_setup_comp_queue(zsda_pci_dev, qp_id, qp_new, nb_des,
+ socket_id);
+ ret |= zsda_setup_decomp_queue(zsda_pci_dev, qp_id, qp_new, nb_des,
+ socket_id);
+ }
+
+ if (ret) {
+ rte_free(qp_new);
+ return ret;
+ }
+
+ qp_new->mmap_bar_addr =
+ comp_priv->zsda_pci_dev->pci_dev->mem_resource[0].addr;
+ *qp_addr = qp_new;
+
+ return ret;
+}
+
+static int
+zsda_comp_xform_size(void)
+{
+ return RTE_ALIGN_CEIL(sizeof(struct zsda_comp_xform), 8);
+}
+
+static struct rte_mempool *
+zsda_comp_create_xform_pool(struct zsda_comp_dev_private *comp_dev,
+ struct rte_compressdev_config *config,
+ uint32_t num_elements)
+{
+ char xform_pool_name[RTE_MEMPOOL_NAMESIZE];
+ struct rte_mempool *mp;
+
+ snprintf(xform_pool_name, RTE_MEMPOOL_NAMESIZE, "%s_xforms",
+ comp_dev->zsda_pci_dev->name);
+
+ ZSDA_LOG(DEBUG, "xformpool: %s", xform_pool_name);
+ mp = rte_mempool_lookup(xform_pool_name);
+
+ if (mp != NULL) {
+ ZSDA_LOG(DEBUG, "xformpool already created");
+ if (mp->size != num_elements) {
+ ZSDA_LOG(DEBUG, "xformpool wrong size - delete it");
+ rte_mempool_free(mp);
+ mp = NULL;
+ comp_dev->xformpool = NULL;
+ }
+ }
+
+ if (mp == NULL)
+ mp = rte_mempool_create(xform_pool_name, num_elements,
+ zsda_comp_xform_size(), 0, 0, NULL,
+ NULL, NULL, NULL, config->socket_id, 0);
+ if (mp == NULL) {
+ ZSDA_LOG(ERR, E_CREATE);
+ return NULL;
+ }
+
+ return mp;
+}
+
+static int
+zsda_comp_private_xform_create(struct rte_compressdev *dev,
+ const struct rte_comp_xform *xform,
+ void **private_xform)
+{
+ struct zsda_comp_dev_private *zsda = dev->data->dev_private;
+
+ if (unlikely(private_xform == NULL)) {
+ ZSDA_LOG(ERR, E_NULL);
+ return -EINVAL;
+ }
+ if (unlikely(zsda->xformpool == NULL)) {
+ ZSDA_LOG(ERR, E_NULL);
+ return -ENOMEM;
+ }
+ if (rte_mempool_get(zsda->xformpool, private_xform)) {
+ ZSDA_LOG(ERR, E_NULL);
+ return -ENOMEM;
+ }
+
+ struct zsda_comp_xform *zsda_xform =
+ (struct zsda_comp_xform *)*private_xform;
+ zsda_xform->type = xform->type;
+
+ if (zsda_xform->type == RTE_COMP_COMPRESS)
+ zsda_xform->checksum_type = xform->compress.chksum;
+ else
+ zsda_xform->checksum_type = xform->decompress.chksum;
+
+ if (zsda_xform->checksum_type == RTE_COMP_CHECKSUM_CRC32_ADLER32)
+ return -EINVAL;
+
+ return 0;
+}
+
+static int
+zsda_comp_private_xform_free(struct rte_compressdev *dev __rte_unused,
+ void *private_xform)
+{
+ struct zsda_comp_xform *zsda_xform =
+ (struct zsda_comp_xform *)private_xform;
+
+ if (zsda_xform) {
+ memset(zsda_xform, 0, zsda_comp_xform_size());
+ struct rte_mempool *mp = rte_mempool_from_obj(zsda_xform);
+
+ rte_mempool_put(mp, zsda_xform);
+ return 0;
+ }
+ return -EINVAL;
+}
+
+static int
+zsda_comp_dev_close(struct rte_compressdev *dev)
+{
+ uint16_t i;
+ struct zsda_comp_dev_private *comp_dev = dev->data->dev_private;
+
+ for (i = 0; i < dev->data->nb_queue_pairs; i++)
+ zsda_comp_qp_release(dev, i);
+
+ rte_mempool_free(comp_dev->xformpool);
+ comp_dev->xformpool = NULL;
+
+ return 0;
+}
+
+static int
+zsda_comp_dev_config(struct rte_compressdev *dev,
+ struct rte_compressdev_config *config)
+{
+ struct zsda_comp_dev_private *comp_dev = dev->data->dev_private;
+
+ if (config->max_nb_priv_xforms) {
+ comp_dev->xformpool = zsda_comp_create_xform_pool(
+ comp_dev, config, config->max_nb_priv_xforms);
+ if (comp_dev->xformpool == NULL)
+ return -ENOMEM;
+ } else
+ comp_dev->xformpool = NULL;
+
+ return 0;
+}
+
+static int
+zsda_comp_dev_start(struct rte_compressdev *dev)
+{
+ struct zsda_comp_dev_private *comp_dev = dev->data->dev_private;
+ int ret = 0;
+
+ ret = zsda_queue_start(comp_dev->zsda_pci_dev->pci_dev);
+
+ if (ret)
+ ZSDA_LOG(ERR, E_START_Q);
+
+ return ret;
+}
+
+static void
+zsda_comp_dev_stop(struct rte_compressdev *dev)
+{
+ struct zsda_comp_dev_private *comp_dev = dev->data->dev_private;
+
+ zsda_queue_stop(comp_dev->zsda_pci_dev->pci_dev);
+}
+
+static void
+zsda_comp_dev_info_get(struct rte_compressdev *dev,
+ struct rte_compressdev_info *info)
+{
+ struct zsda_comp_dev_private *comp_dev = dev->data->dev_private;
+
+ if (info != NULL) {
+ info->max_nb_queue_pairs =
+ zsda_comp_max_nb_qps(comp_dev->zsda_pci_dev);
+ info->feature_flags = dev->feature_flags;
+ info->capabilities = comp_dev->zsda_dev_capabilities;
+ }
+}
+
+static uint16_t
+zsda_comp_pmd_enqueue_op_burst(void *qp, struct rte_comp_op **ops,
+ uint16_t nb_ops)
+{
+ return zsda_enqueue_op_burst((struct zsda_qp *)qp, (void **)ops,
+ nb_ops);
+}
+
+static uint16_t
+zsda_comp_pmd_dequeue_op_burst(void *qp, struct rte_comp_op **ops,
+ uint16_t nb_ops)
+{
+ return zsda_dequeue_op_burst((struct zsda_qp *)qp, (void **)ops,
+ nb_ops);
+}
+
+static struct rte_compressdev_ops compress_zsda_ops = {
+
+ .dev_configure = zsda_comp_dev_config,
+ .dev_start = zsda_comp_dev_start,
+ .dev_stop = zsda_comp_dev_stop,
+ .dev_close = zsda_comp_dev_close,
+ .dev_infos_get = zsda_comp_dev_info_get,
+
+ .stats_get = zsda_comp_stats_get,
+ .stats_reset = zsda_comp_stats_reset,
+ .queue_pair_setup = zsda_comp_qp_setup,
+ .queue_pair_release = zsda_comp_qp_release,
+
+ .private_xform_create = zsda_comp_private_xform_create,
+ .private_xform_free = zsda_comp_private_xform_free};
+
+/* An rte_driver is needed in the registration of the device with compressdev.
+ * The actual zsda 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 zsda_comp_drv_name[] = RTE_STR(COMPRESSDEV_NAME_ZSDA_PMD);
+static const struct rte_driver compdev_zsda_driver = {
+ .name = zsda_comp_drv_name, .alias = zsda_comp_drv_name};
+
+int
+zsda_comp_dev_create(struct zsda_pci_device *zsda_pci_dev)
+{
+ struct zsda_device_info *dev_info =
+ &zsda_devs[zsda_pci_dev->zsda_dev_id];
+
+ struct rte_compressdev_pmd_init_params init_params = {
+ .name = "",
+ .socket_id = (int)rte_socket_id(),
+ };
+
+ char name[RTE_COMPRESSDEV_NAME_MAX_LEN];
+ char capa_memz_name[RTE_COMPRESSDEV_NAME_MAX_LEN];
+ struct rte_compressdev *compressdev;
+ struct zsda_comp_dev_private *comp_dev;
+ const struct rte_compressdev_capabilities *capabilities;
+ uint16_t capa_size = sizeof(struct rte_compressdev_capabilities);
+
+ snprintf(name, RTE_COMPRESSDEV_NAME_MAX_LEN, "%s_%s",
+ zsda_pci_dev->name, "comp");
+
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
+ dev_info->comp_rte_dev.driver = &compdev_zsda_driver;
+ dev_info->comp_rte_dev.numa_node = dev_info->pci_dev->device.numa_node;
+ dev_info->comp_rte_dev.devargs = NULL;
+
+ compressdev = rte_compressdev_pmd_create(
+ name, &(dev_info->comp_rte_dev),
+ sizeof(struct zsda_comp_dev_private), &init_params);
+
+ if (compressdev == NULL)
+ return -ENODEV;
+
+ compressdev->dev_ops = &compress_zsda_ops;
+
+ compressdev->enqueue_burst = zsda_comp_pmd_enqueue_op_burst;
+ compressdev->dequeue_burst = zsda_comp_pmd_dequeue_op_burst;
+
+ compressdev->feature_flags = RTE_COMPDEV_FF_HW_ACCELERATED;
+
+ snprintf(capa_memz_name, RTE_COMPRESSDEV_NAME_MAX_LEN,
+ "ZSDA_COMP_CAPA");
+
+ comp_dev = compressdev->data->dev_private;
+ comp_dev->zsda_pci_dev = zsda_pci_dev;
+ comp_dev->compressdev = compressdev;
+ capabilities = zsda_comp_capabilities;
+
+ comp_dev->capa_mz = rte_memzone_lookup(capa_memz_name);
+ if (comp_dev->capa_mz == NULL) {
+ comp_dev->capa_mz = rte_memzone_reserve(
+ capa_memz_name, capa_size, rte_socket_id(), 0);
+ }
+ if (comp_dev->capa_mz == NULL) {
+ ZSDA_LOG(DEBUG, E_MALLOC);
+ memset(&dev_info->comp_rte_dev, 0,
+ sizeof(dev_info->comp_rte_dev));
+ rte_compressdev_pmd_destroy(compressdev);
+ return -EFAULT;
+ }
+
+ memcpy(comp_dev->capa_mz->addr, capabilities, capa_size);
+ comp_dev->zsda_dev_capabilities = comp_dev->capa_mz->addr;
+
+ zsda_pci_dev->comp_dev = comp_dev;
+
+ return 0;
+}
+
+int
+zsda_comp_dev_destroy(struct zsda_pci_device *zsda_pci_dev)
+{
+ struct zsda_comp_dev_private *comp_dev;
+
+ if (zsda_pci_dev == NULL)
+ return -ENODEV;
+
+ comp_dev = zsda_pci_dev->comp_dev;
+ if (comp_dev == NULL)
+ return 0;
+
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+ rte_memzone_free(zsda_pci_dev->comp_dev->capa_mz);
+
+ zsda_comp_dev_close(comp_dev->compressdev);
+
+ rte_compressdev_pmd_destroy(comp_dev->compressdev);
+ zsda_pci_dev->comp_dev = NULL;
+
+ return 0;
+}
diff --git a/drivers/compress/zsda/zsda_comp_pmd.h b/drivers/compress/zsda/zsda_comp_pmd.h
new file mode 100644
index 0000000000..b496cb53a5
--- /dev/null
+++ b/drivers/compress/zsda/zsda_comp_pmd.h
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2024 ZTE Corporation
+ */
+
+#ifndef _ZSDA_COMP_PMD_H_
+#define _ZSDA_COMP_PMD_H_
+
+#include <rte_compressdev_pmd.h>
+
+/**< ZSDA Compression PMD driver name */
+#define COMPRESSDEV_NAME_ZSDA_PMD compress_zsda
+
+/** private data structure for a ZSDA compression device.
+ * This ZSDA device is a device offering only a compression service,
+ * there can be one of these on each zsda_pci_device (VF).
+ */
+struct zsda_comp_dev_private {
+ struct zsda_pci_device *zsda_pci_dev;
+ /**< The zsda pci device hosting the service */
+ struct rte_compressdev *compressdev;
+ /**< The pointer to this compression device structure */
+ const struct rte_compressdev_capabilities *zsda_dev_capabilities;
+ /* ZSDA device compression capabilities */
+ const struct rte_memzone *interim_buff_mz;
+ /**< The device's memory for intermediate buffers */
+ struct rte_mempool *xformpool;
+ /**< The device's pool for zsda_comp_xforms */
+ struct rte_mempool *streampool;
+ /**< The device's pool for zsda_comp_streams */
+ const struct rte_memzone *capa_mz;
+ /* Shared memzone for storing capabilities */
+ uint16_t min_enq_burst_threshold;
+};
+
+int zsda_comp_dev_create(struct zsda_pci_device *zsda_pci_dev);
+
+int zsda_comp_dev_destroy(struct zsda_pci_device *zsda_pci_dev);
+
+#endif /* _ZSDA_COMP_PMD_H_ */
diff --git a/drivers/meson.build b/drivers/meson.build
index 66931d4241..cdbd3b1c17 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -17,6 +17,7 @@ subdirs = [
'common/nitrox', # depends on bus.
'common/qat', # depends on bus.
'common/sfc_efx', # depends on bus.
+ 'common/zsda', # depends on bus.
'mempool', # depends on common and bus.
'dma', # depends on common and bus.
'net', # depends on common, bus, mempool
--
2.27.0
[-- Attachment #1.1.2: Type: text/html , Size: 63507 bytes --]
next prev parent reply other threads:[~2024-09-11 7:56 UTC|newest]
Thread overview: 283+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 8:27 [PATCH] zsda:introduce zsda drivers and examples lhx
2024-07-02 8:52 ` David Marchand
2024-07-02 13:11 ` [EXTERNAL] " Akhil Goyal
2024-09-09 8:08 ` [PATCH v4 1/8] zsda: Introduce zsda device drivers Hanxiao Li
2024-09-10 9:15 ` [PATCH v5 " Hanxiao Li
2024-09-10 9:18 ` [PATCH v5 2/8] zsda: add support for zsdadev operations Hanxiao Li
2024-09-10 9:18 ` [PATCH v5 3/8] zsda: add support for queue operation Hanxiao Li
2024-09-10 9:18 ` [PATCH v5 4/8] zsda: add zsda compressdev driver and interface Hanxiao Li
2024-09-10 9:18 ` [PATCH v5 5/8] zsda: modify files for introducing zsda cryptodev Hanxiao Li
2024-09-10 9:18 ` [PATCH v5 6/8] zsda: add zsda crypto-pmd Hanxiao Li
2024-09-10 9:18 ` [PATCH v5 7/8] zsda: add zsda crypto-sym Hanxiao Li
2024-09-10 9:18 ` [PATCH v5 8/8] zsda: add zsda crypto-session and compile file Hanxiao Li
2024-09-11 7:52 ` [PATCH v6 1/8] zsda: Introduce zsda device drivers Hanxiao Li
2024-09-11 7:54 ` [PATCH v6 2/8] zsda: add support for zsdadev operations Hanxiao Li
2024-09-11 7:54 ` [PATCH v6 3/8] zsda: add support for queue operation Hanxiao Li
2024-09-11 16:01 ` Stephen Hemminger
2024-09-11 7:54 ` Hanxiao Li [this message]
2024-09-11 7:54 ` [PATCH v6 5/8] zsda: modify files for introducing zsda cryptodev Hanxiao Li
2024-09-17 18:22 ` [EXTERNAL] " Akhil Goyal
2024-09-11 7:54 ` [PATCH v6 6/8] zsda: add zsda crypto-pmd Hanxiao Li
2024-09-17 18:25 ` [EXTERNAL] " Akhil Goyal
2024-09-11 7:54 ` [PATCH v6 7/8] zsda: add zsda crypto-sym Hanxiao Li
2024-09-11 7:54 ` [PATCH v6 8/8] zsda: add zsda crypto-session and compile file Hanxiao Li
2024-09-17 18:33 ` [EXTERNAL] " Akhil Goyal
2024-09-17 18:13 ` [EXTERNAL] [PATCH v6 1/8] zsda: Introduce zsda device drivers Akhil Goyal
2024-09-27 12:44 ` [PATCH v7 0/8] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-09-27 13:01 ` [PATCH v7 1/8] common/zsda: add common function and log macro Hanxiao Li
2024-09-27 13:09 ` [PATCH v7 0/8] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-09-27 13:09 ` [PATCH v7 2/8] common/zsda: configure device Hanxiao Li
2024-09-27 13:09 ` [PATCH v7 3/8] common/zsda: configure queues Hanxiao Li
2024-09-27 13:09 ` [PATCH v7 4/8] compress/zsda: configure drivers of compressdev Hanxiao Li
2024-09-27 13:09 ` [PATCH v7 5/8] crypto/zsda: configure drivers, sessions, capabilities of cryptodev Hanxiao Li
2024-09-27 13:09 ` [PATCH v7 6/8] lib/cryptodev: add sm4 xts for crypto Hanxiao Li
2024-09-27 13:09 ` [PATCH v7 7/8] app/test: add sm4-xts test Hanxiao Li
2024-09-27 13:09 ` [PATCH v7 8/8] doc/guides: add documents and release notes for two drivers Hanxiao Li
2024-09-29 7:35 ` Hanxiao Li
2024-10-01 7:31 ` [EXTERNAL] " Akhil Goyal
2024-09-29 14:58 ` [PATCH v8 0/8] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-09-29 14:58 ` [PATCH v8 1/8] common/zsda: add common function and log macro Hanxiao Li
2024-09-29 15:04 ` [PATCH v8 2/8] common/zsda: configure device Hanxiao Li
2024-09-29 15:05 ` [PATCH v8 3/8] common/zsda: configure queues Hanxiao Li
2024-10-01 7:39 ` [EXTERNAL] " Akhil Goyal
2024-09-29 15:05 ` [PATCH v8 4/8] compress/zsda: configure drivers of compressdev Hanxiao Li
2024-10-01 7:38 ` [EXTERNAL] " Akhil Goyal
2024-09-29 15:05 ` [PATCH v8 5/8] crypto/zsda: configure drivers, sessions, capabilities of cryptodev Hanxiao Li
2024-10-01 7:35 ` [EXTERNAL] " Akhil Goyal
2024-09-29 15:05 ` [PATCH v8 6/8] lib/cryptodev: add sm4 xts for crypto Hanxiao Li
2024-10-01 7:28 ` [EXTERNAL] " Akhil Goyal
2024-10-09 21:09 ` Akhil Goyal
2024-09-29 15:05 ` [PATCH v8 7/8] app/test: add sm4-xts test Hanxiao Li
2024-09-29 15:05 ` [PATCH v8 8/8] doc/guides: add documents and release notes for two drivers Hanxiao Li
2024-09-29 19:41 ` Stephen Hemminger
2024-10-01 7:43 ` [EXTERNAL] [PATCH v8 2/8] common/zsda: configure device Akhil Goyal
2024-10-11 1:50 ` [PATCH v9 00/12] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-10-11 1:50 ` [PATCH v9 01/12] zsda: add zsdadev driver documents Hanxiao Li
2024-10-11 1:54 ` [PATCH v9 02/12] config: add zsda device number Hanxiao Li
2024-10-11 1:56 ` [PATCH v9 03/12] common/zsda: add some common functions Hanxiao Li
2024-10-11 1:56 ` [PATCH v9 04/12] common/zsda: configure zsda device Hanxiao Li
2024-10-11 1:56 ` [PATCH v9 05/12] common/zsda: configure zsda queue base functions Hanxiao Li
2024-10-11 1:56 ` [PATCH v9 06/12] common/zsda: configure zsda queue enqueue functions Hanxiao Li
2024-10-11 1:56 ` [PATCH v9 07/12] common/zsda: configure zsda queue dequeue functions Hanxiao Li
2024-10-11 1:56 ` [PATCH v9 08/12] compress/zsda: add zsda compress driver Hanxiao Li
2024-10-11 1:56 ` [PATCH v9 09/12] compress/zsda: add zsda compress PMD Hanxiao Li
2024-10-11 1:56 ` [PATCH v9 10/12] crypto/zsda: add crypto sessions configuration Hanxiao Li
2024-10-11 1:56 ` [PATCH v9 11/12] crypto/zsda: add zsda crypto driver Hanxiao Li
2024-10-11 1:56 ` [PATCH v9 12/12] crypto/zsda: add zsda crypto PMD Hanxiao Li
2024-10-12 19:03 ` Stephen Hemminger
2024-10-16 8:33 ` [PATCH v10 00/12] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-10-16 8:33 ` [PATCH v10 01/12] zsda: add zsdadev driver documents Hanxiao Li
2024-10-16 8:37 ` [PATCH v10 02/12] config: add zsda device number Hanxiao Li
2024-10-16 8:38 ` [PATCH v10 03/12] common/zsda: add some common functions Hanxiao Li
2024-10-16 8:38 ` [PATCH v10 04/12] common/zsda: configure zsda device Hanxiao Li
2024-10-16 8:38 ` [PATCH v10 05/12] common/zsda: configure zsda queue base functions Hanxiao Li
2024-10-16 8:38 ` [PATCH v10 06/12] common/zsda: configure zsda queue enqueue functions Hanxiao Li
2024-10-16 8:38 ` [PATCH v10 07/12] common/zsda: configure zsda queue dequeue functions Hanxiao Li
2024-10-16 8:38 ` [PATCH v10 08/12] compress/zsda: add zsda compress driver Hanxiao Li
2024-10-16 8:38 ` [PATCH v10 09/12] compress/zsda: add zsda compress PMD Hanxiao Li
2024-10-16 8:38 ` [PATCH v10 10/12] crypto/zsda: add crypto sessions configuration Hanxiao Li
2024-10-16 8:38 ` [PATCH v10 11/12] crypto/zsda: add zsda crypto driver Hanxiao Li
2024-10-16 8:38 ` [PATCH v10 12/12] crypto/zsda: add zsda crypto PMD Hanxiao Li
2024-10-17 9:21 ` [PATCH v11 00/12] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-10-17 9:21 ` [PATCH v11 01/12] zsda: add zsdadev driver documents Hanxiao Li
2024-10-19 11:04 ` [PATCH v12 00/12] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-10-19 11:04 ` [PATCH v12 01/12] zsda: add zsdadev driver documents Hanxiao Li
2024-10-22 12:59 ` [PATCH v13 00/12] drivers/zsda: introduce zsda drivers Junlong Wang
2024-10-22 12:59 ` [PATCH v13 01/12] zsda: add zsdadev driver documents Junlong Wang
2024-10-22 12:59 ` [PATCH v13 02/12] config: add zsda device number Junlong Wang
2024-10-22 12:59 ` [PATCH v13 03/12] common/zsda: add some common functions Junlong Wang
2024-10-22 15:58 ` Stephen Hemminger
2024-10-22 12:59 ` [PATCH v13 04/12] common/zsda: configure zsda device Junlong Wang
2024-10-22 12:59 ` [PATCH v13 05/12] common/zsda: configure zsda queue base functions Junlong Wang
2024-10-22 12:59 ` [PATCH v13 06/12] common/zsda: configure zsda queue enqueue functions Junlong Wang
2024-10-22 12:59 ` [PATCH v13 07/12] common/zsda: configure zsda queue dequeue functions Junlong Wang
2024-10-22 12:59 ` [PATCH v13 08/12] compress/zsda: add zsda compress driver Junlong Wang
2024-10-22 12:59 ` [PATCH v13 09/12] compress/zsda: add zsda compress PMD Junlong Wang
2024-10-22 12:59 ` [PATCH v13 10/12] crypto/zsda: add crypto sessions configuration Junlong Wang
2024-10-22 12:59 ` [PATCH v13 11/12] crypto/zsda: add zsda crypto driver Junlong Wang
2024-10-22 12:59 ` [PATCH v13 12/12] crypto/zsda: add zsda crypto PMD Junlong Wang
2024-10-22 16:20 ` [PATCH v13 00/12] drivers/zsda: introduce zsda drivers Stephen Hemminger
2024-10-22 13:28 ` Hanxiao Li
2024-10-22 13:28 ` [PATCH v13 01/12] zsda: add zsdadev driver documents Hanxiao Li
2024-10-22 13:45 ` [v13,01/12] " Hanxiao Li
2024-10-22 13:28 ` [PATCH v13 02/12] config: add zsda device number Hanxiao Li
2024-10-22 13:28 ` [PATCH v13 03/12] common/zsda: add some common functions Hanxiao Li
2024-10-22 13:28 ` [PATCH v13 04/12] common/zsda: configure zsda device Hanxiao Li
2024-10-22 13:28 ` [PATCH v13 05/12] common/zsda: configure zsda queue base functions Hanxiao Li
2024-10-22 13:28 ` [PATCH v13 06/12] common/zsda: configure zsda queue enqueue functions Hanxiao Li
2024-10-22 13:28 ` [PATCH v13 07/12] common/zsda: configure zsda queue dequeue functions Hanxiao Li
2024-10-22 13:28 ` [PATCH v13 08/12] compress/zsda: add zsda compress driver Hanxiao Li
2024-10-22 13:28 ` [PATCH v13 09/12] compress/zsda: add zsda compress PMD Hanxiao Li
2024-10-22 13:28 ` [PATCH v13 10/12] crypto/zsda: add crypto sessions configuration Hanxiao Li
2024-10-22 13:28 ` [PATCH v13 11/12] crypto/zsda: add zsda crypto driver Hanxiao Li
2024-10-22 13:28 ` [PATCH v13 12/12] crypto/zsda: add zsda crypto PMD Hanxiao Li
2024-10-24 8:30 ` [PATCH v14 00/12] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-10-24 8:30 ` [PATCH v14 01/12] zsda: add zsdadev driver documents Hanxiao Li
2024-10-24 8:35 ` [PATCH v14 02/12] config: add zsda device number Hanxiao Li
2024-10-24 8:35 ` [PATCH v14 03/12] common/zsda: add some common functions Hanxiao Li
2024-10-24 8:35 ` [PATCH v14 04/12] common/zsda: configure zsda device Hanxiao Li
2024-10-24 8:35 ` [PATCH v14 05/12] common/zsda: configure zsda queue base functions Hanxiao Li
2024-10-24 8:35 ` [PATCH v14 06/12] common/zsda: configure zsda queue enqueue functions Hanxiao Li
2024-10-24 8:35 ` [PATCH v14 07/12] common/zsda: configure zsda queue dequeue functions Hanxiao Li
2024-10-24 8:35 ` [PATCH v14 08/12] compress/zsda: add zsda compress driver Hanxiao Li
2024-10-24 8:35 ` [PATCH v14 09/12] compress/zsda: add zsda compress PMD Hanxiao Li
2024-10-24 8:35 ` [PATCH v14 10/12] crypto/zsda: add crypto sessions configuration Hanxiao Li
2024-10-24 8:35 ` [PATCH v14 11/12] crypto/zsda: add zsda crypto driver Hanxiao Li
2024-10-24 8:35 ` [PATCH v14 12/12] crypto/zsda: add zsda crypto PMD Hanxiao Li
2024-10-25 14:08 ` [PATCH v15 00/21] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-10-25 14:08 ` [PATCH v15 01/21] zsda: add zsdadev driver documents Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 02/21] config: add zsda device number Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 03/21] common/zsda: add logging macros Hanxiao Li
2024-10-25 18:22 ` [EXTERNAL] " Akhil Goyal
2024-10-25 14:10 ` [PATCH v15 04/21] common/zsda: add common functions Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 05/21] common/zsda: configure pci_driver for zsda Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 06/21] common/zsda: add functions to operate hardware queue Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 07/21] common/zsda: configure queue operation Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 08/21] common/zsda: configure the enqueue datapath Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 09/21] common/zsda: configure the dequeue datapath Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 10/21] compress/zsda: add compression algo match Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 11/21] compress/zsda: add treatment of compressdev cqe and chksum Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 12/21] compress/zsda: add configuration of compressdev_ops Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 13/21] compress/zsda: add functions of compressdev create and destroy Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 14/21] crypto/zsda: introduce key expansion code Hanxiao Li
2024-10-25 19:34 ` [EXTERNAL] " Akhil Goyal
2024-10-25 14:10 ` [PATCH v15 15/21] crypto/zsda: configure session Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 16/21] crypto/zsda: add sym algo match Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 17/21] crypto/zsda: configure wqe of cryptodev Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 18/21] crypto/zsda: add treatment of cryptodev cqe Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 19/21] crypto/zsda: add capabilities of sym Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 20/21] crypto/zsda: add configuration of cryptodev_ops Hanxiao Li
2024-10-25 14:10 ` [PATCH v15 21/21] crypto/zsda: add functions of cryptodev create and destroy Hanxiao Li
2024-10-25 19:45 ` [EXTERNAL] " Akhil Goyal
2024-10-25 19:14 ` [EXTERNAL] [PATCH v15 01/21] zsda: add zsdadev driver documents Akhil Goyal
2024-10-26 15:55 ` [PATCH v16 00/14] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-10-26 15:55 ` [PATCH v16 01/14] config: add zsda device number Hanxiao Li
2024-10-26 15:58 ` [PATCH v16 02/14] common/zsda: configure pci_driver and logging macros for zsda Hanxiao Li
2024-10-26 15:58 ` [PATCH v16 03/14] common/zsda: add functions to operate hardware queue Hanxiao Li
2024-10-26 15:58 ` [PATCH v16 04/14] common/zsda: configure queue operation Hanxiao Li
2024-10-26 15:58 ` [PATCH v16 05/14] common/zsda: configure the enqueue datapath Hanxiao Li
2024-10-26 15:58 ` [PATCH v16 06/14] common/zsda: configure the dequeue datapath Hanxiao Li
2024-10-26 15:58 ` [PATCH v16 07/14] compress/zsda: initializate compressdev Hanxiao Li
2024-10-26 15:58 ` [PATCH v16 08/14] compress/zsda: add compression algo match Hanxiao Li
2024-10-26 15:58 ` [PATCH v16 09/14] compress/zsda: process wqe and cqe of compressdev Hanxiao Li
2024-10-26 15:58 ` [PATCH v16 10/14] crypto/zsda: initialize cryptodev of zsda Hanxiao Li
2024-10-26 15:58 ` [PATCH v16 11/14] crypto/zsda: configure session Hanxiao Li
2024-10-26 15:58 ` [PATCH v16 12/14] crypto/zsda: add crypto algo match Hanxiao Li
2024-10-26 15:58 ` [PATCH v16 13/14] crypto/zsda: process wqe and cqe Hanxiao Li
2024-10-26 15:58 ` [PATCH v16 14/14] app/test: add cryptodev test for zsda Hanxiao Li
2024-10-26 16:12 ` [PATCH v17 00/14] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-10-26 16:12 ` [PATCH v17 01/14] config: add zsda device number Hanxiao Li
2024-10-26 16:13 ` [PATCH v17 02/14] common/zsda: configure pci_driver and logging macros for zsda Hanxiao Li
2024-10-26 16:13 ` [PATCH v17 03/14] common/zsda: add functions to operate hardware queue Hanxiao Li
2024-10-26 16:13 ` [PATCH v17 04/14] common/zsda: configure queue operation Hanxiao Li
2024-10-26 16:13 ` [PATCH v17 05/14] common/zsda: configure the enqueue datapath Hanxiao Li
2024-10-26 16:13 ` [PATCH v17 06/14] common/zsda: configure the dequeue datapath Hanxiao Li
2024-10-26 16:13 ` [PATCH v17 07/14] compress/zsda: initialize compressdev Hanxiao Li
2024-10-26 16:13 ` [PATCH v17 08/14] compress/zsda: add compression algo match Hanxiao Li
2024-10-26 16:13 ` [PATCH v17 09/14] compress/zsda: process wqe and cqe of compressdev Hanxiao Li
2024-10-26 16:13 ` [PATCH v17 10/14] crypto/zsda: initialize cryptodev of zsda Hanxiao Li
2024-10-26 16:13 ` [PATCH v17 11/14] crypto/zsda: configure session Hanxiao Li
2024-10-26 16:13 ` [PATCH v17 12/14] crypto/zsda: add crypto algo match Hanxiao Li
2024-10-26 16:13 ` [PATCH v17 13/14] crypto/zsda: process wqe and cqe Hanxiao Li
2024-10-26 16:14 ` [PATCH v17 14/14] app/test: add cryptodev test for zsda Hanxiao Li
2024-10-28 8:09 ` [PATCH v18 00/15] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-10-28 8:09 ` [PATCH v18 01/15] config: add zsda device number Hanxiao Li
2024-10-28 8:11 ` [PATCH v18 02/15] common/zsda: configure pci_driver and logging macros for zsda Hanxiao Li
2024-10-28 8:11 ` [PATCH v18 03/15] common/zsda: configure definition of some functions Hanxiao Li
2024-10-28 8:11 ` [PATCH v18 04/15] common/zsda: add functions to operate hardware queue Hanxiao Li
2024-10-28 8:11 ` [PATCH v18 05/15] common/zsda: configure queue operation Hanxiao Li
2024-10-28 8:11 ` [PATCH v18 06/15] common/zsda: configure the enqueue datapath Hanxiao Li
2024-10-28 8:11 ` [PATCH v18 07/15] common/zsda: configure the dequeue datapath Hanxiao Li
2024-10-28 8:11 ` [PATCH v18 08/15] compress/zsda: initialize compressdev Hanxiao Li
2024-10-28 8:11 ` [PATCH v18 09/15] compress/zsda: add compression algo match Hanxiao Li
2024-10-28 8:12 ` [PATCH v18 10/15] compress/zsda: process wqe and cqe of compressdev Hanxiao Li
2024-10-28 8:12 ` [PATCH v18 11/15] crypto/zsda: initialize cryptodev of zsda Hanxiao Li
2024-11-06 8:31 ` [EXTERNAL] " Akhil Goyal
2024-10-28 8:12 ` [PATCH v18 12/15] crypto/zsda: configure session Hanxiao Li
2024-10-28 8:12 ` [PATCH v18 13/15] crypto/zsda: add crypto algo match Hanxiao Li
2024-10-28 8:12 ` [PATCH v18 14/15] crypto/zsda: process wqe and cqe Hanxiao Li
2024-10-28 8:12 ` [PATCH v18 15/15] app/test: add cryptodev test for zsda Hanxiao Li
2024-11-09 10:13 ` [PATCH v19 00/13] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-11-09 10:13 ` [PATCH v19 01/13] config: add zsda device number Hanxiao Li
2024-11-09 10:16 ` [PATCH v19 02/13] common/zsda: add zsdadev driver Hanxiao Li
2024-11-09 10:16 ` [PATCH v19 03/13] common/zsda: add logging macros Hanxiao Li
2024-11-09 10:16 ` [PATCH v19 04/13] common/zsda: add functions to operate hardware queue Hanxiao Li
2024-11-09 10:16 ` [PATCH v19 05/13] common/zsda: add definition and use of msg chan Hanxiao Li
2024-11-09 10:16 ` [PATCH v19 06/13] compress/zsda: add zsda compressdev driver skeleton Hanxiao Li
2024-11-09 10:16 ` [PATCH v19 07/13] compress/zsda: add zsda compressdev dev ops Hanxiao Li
2024-11-09 10:16 ` [PATCH v19 08/13] compress/zsda: add zsda compressdev stats ops Hanxiao Li
2024-11-09 10:16 ` [PATCH v19 09/13] compress/zsda: add zsda compressdev xform ops Hanxiao Li
2024-11-09 10:16 ` [PATCH v19 10/13] compress/zsda: add zsda compressdev qp ops Hanxiao Li
2024-11-09 10:16 ` [PATCH v19 11/13] compress/zsda: add zsda compressdev enqueue datapath Hanxiao Li
2024-11-09 10:16 ` [PATCH v19 12/13] compress/zsda: add zsda compressdev dequeue datapath Hanxiao Li
2024-11-09 10:16 ` [PATCH v19 13/13] compress/zsda: add zsda cryptodev capabilities Hanxiao Li
2024-11-09 10:36 ` [PATCH v20 00/13] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-11-09 10:36 ` [PATCH v20 01/13] config: add zsda device number Hanxiao Li
2024-11-09 10:37 ` [PATCH v20 02/13] common/zsda: add zsdadev driver Hanxiao Li
2024-11-09 10:37 ` [PATCH v20 03/13] common/zsda: add logging macros Hanxiao Li
2024-11-09 10:37 ` [PATCH v20 04/13] common/zsda: add functions to operate hardware queue Hanxiao Li
2024-11-09 10:37 ` [PATCH v20 05/13] common/zsda: add definition and use of msg chan Hanxiao Li
2024-11-09 10:37 ` [PATCH v20 06/13] compress/zsda: add zsda compressdev driver skeleton Hanxiao Li
2024-11-09 10:37 ` [PATCH v20 07/13] compress/zsda: add zsda compressdev dev ops Hanxiao Li
2024-11-09 10:37 ` [PATCH v20 08/13] compress/zsda: add zsda compressdev stats ops Hanxiao Li
2024-11-09 10:37 ` [PATCH v20 09/13] compress/zsda: add zsda compressdev xform ops Hanxiao Li
2024-11-09 10:37 ` [PATCH v20 10/13] compress/zsda: add zsda compressdev qp ops Hanxiao Li
2024-11-09 10:38 ` [PATCH v20 11/13] compress/zsda: add zsda compressdev enqueue datapath Hanxiao Li
2024-11-09 10:38 ` [PATCH v20 12/13] compress/zsda: add zsda compressdev dequeue datapath Hanxiao Li
2024-11-09 10:38 ` [PATCH v20 13/13] compress/zsda: add zsda cryptodev capabilities Hanxiao Li
2024-11-11 2:42 ` [PATCH v21 00/13] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-11-11 2:42 ` [PATCH v21 01/13] config: add zsda device number Hanxiao Li
2024-11-11 2:44 ` [PATCH v21 02/13] common/zsda: add zsdadev driver Hanxiao Li
2024-11-11 2:44 ` [PATCH v21 03/13] common/zsda: add logging macros Hanxiao Li
2024-11-11 2:44 ` [PATCH v21 04/13] common/zsda: add functions to operate hardware queue Hanxiao Li
2024-11-11 2:44 ` [PATCH v21 05/13] common/zsda: add definition and use of msg chan Hanxiao Li
2024-11-11 2:44 ` [PATCH v21 06/13] compress/zsda: add zsda compressdev driver skeleton Hanxiao Li
2024-11-11 2:44 ` [PATCH v21 07/13] compress/zsda: add zsda compressdev dev ops Hanxiao Li
2024-11-11 2:44 ` [PATCH v21 08/13] compress/zsda: add zsda compressdev stats ops Hanxiao Li
2024-11-11 2:44 ` [PATCH v21 09/13] compress/zsda: add zsda compressdev xform ops Hanxiao Li
2024-11-11 2:44 ` [PATCH v21 10/13] compress/zsda: add zsda compressdev qp ops Hanxiao Li
2024-11-11 2:44 ` [PATCH v21 11/13] compress/zsda: add zsda compressdev enqueue datapath Hanxiao Li
2024-11-11 2:44 ` [PATCH v21 12/13] compress/zsda: add zsda compressdev dequeue datapath Hanxiao Li
2024-11-11 2:44 ` [PATCH v21 13/13] compress/zsda: add zsda compressdev capabilities Hanxiao Li
2024-11-11 3:22 ` [v21,01/13] config: add zsda device number Hanxiao Li
2024-11-13 2:29 ` [PATCH v22 00/13] drivers/zsda: introduce zsda drivers Hanxiao Li
2024-11-13 2:29 ` [PATCH v22 01/13] config: add zsda device number Hanxiao Li
2024-11-13 2:33 ` [PATCH v22 02/13] common/zsda: add zsdadev driver Hanxiao Li
2024-11-13 2:33 ` [PATCH v22 03/13] common/zsda: add logging macros Hanxiao Li
2024-11-13 2:33 ` [PATCH v22 04/13] common/zsda: add functions to operate hardware queue Hanxiao Li
2024-11-13 2:33 ` [PATCH v22 05/13] common/zsda: add definition and use of msg chan Hanxiao Li
2024-11-13 2:33 ` [PATCH v22 06/13] compress/zsda: add zsda compressdev driver skeleton Hanxiao Li
2024-11-13 2:33 ` [PATCH v22 07/13] compress/zsda: add zsda compressdev dev ops Hanxiao Li
2024-11-13 2:33 ` [PATCH v22 08/13] compress/zsda: add zsda compressdev stats ops Hanxiao Li
2024-11-13 2:33 ` [PATCH v22 09/13] compress/zsda: add zsda compressdev xform ops Hanxiao Li
2024-11-13 2:33 ` [PATCH v22 10/13] compress/zsda: add zsda compressdev qp ops Hanxiao Li
2024-11-13 2:33 ` [PATCH v22 11/13] compress/zsda: add zsda compressdev enqueue datapath Hanxiao Li
2024-11-13 2:33 ` [PATCH v22 12/13] compress/zsda: add zsda compressdev dequeue datapath Hanxiao Li
2024-11-13 2:33 ` [PATCH v22 13/13] compress/zsda: add zsda compressdev capabilities Hanxiao Li
2024-11-09 15:57 ` [PATCH v20 00/13] drivers/zsda: introduce zsda drivers Thomas Monjalon
2024-10-19 11:04 ` [PATCH v12 02/12] config: add zsda device number Hanxiao Li
2024-10-19 11:04 ` [PATCH v12 03/12] common/zsda: add some common functions Hanxiao Li
2024-10-22 2:16 ` Stephen Hemminger
2024-10-19 11:04 ` [PATCH v12 04/12] common/zsda: configure zsda device Hanxiao Li
2024-10-19 11:04 ` [PATCH v12 05/12] common/zsda: configure zsda queue base functions Hanxiao Li
2024-10-19 11:04 ` [PATCH v12 06/12] common/zsda: configure zsda queue enqueue functions Hanxiao Li
2024-10-19 11:04 ` [PATCH v12 07/12] common/zsda: configure zsda queue dequeue functions Hanxiao Li
2024-10-19 11:04 ` [PATCH v12 08/12] compress/zsda: add zsda compress driver Hanxiao Li
2024-10-19 11:04 ` [PATCH v12 09/12] compress/zsda: add zsda compress PMD Hanxiao Li
2024-10-19 11:04 ` [PATCH v12 10/12] crypto/zsda: add crypto sessions configuration Hanxiao Li
2024-10-19 11:04 ` [PATCH v12 11/12] crypto/zsda: add zsda crypto driver Hanxiao Li
2024-10-19 11:04 ` [PATCH v12 12/12] crypto/zsda: add zsda crypto PMD Hanxiao Li
2024-10-21 8:52 ` [v12,12/12] " Hanxiao Li
2024-10-17 9:21 ` [PATCH v11 02/12] config: add zsda device number Hanxiao Li
2024-10-17 9:22 ` [PATCH v11 03/12] common/zsda: add some common functions Hanxiao Li
2024-10-17 9:22 ` [PATCH v11 04/12] common/zsda: configure zsda device Hanxiao Li
2024-10-17 9:22 ` [PATCH v11 05/12] common/zsda: configure zsda queue base functions Hanxiao Li
2024-10-17 19:30 ` Stephen Hemminger
2024-10-17 9:22 ` [PATCH v11 06/12] common/zsda: configure zsda queue enqueue functions Hanxiao Li
2024-10-17 9:22 ` [PATCH v11 07/12] common/zsda: configure zsda queue dequeue functions Hanxiao Li
2024-10-17 9:22 ` [PATCH v11 08/12] compress/zsda: add zsda compress driver Hanxiao Li
2024-10-17 9:22 ` [PATCH v11 09/12] compress/zsda: add zsda compress PMD Hanxiao Li
2024-10-17 9:22 ` [PATCH v11 10/12] crypto/zsda: add crypto sessions configuration Hanxiao Li
2024-10-17 9:22 ` [PATCH v11 11/12] crypto/zsda: add zsda crypto driver Hanxiao Li
2024-10-17 9:22 ` [PATCH v11 12/12] crypto/zsda: add zsda crypto PMD Hanxiao Li
2024-10-17 19:24 ` [PATCH v11 00/12] drivers/zsda: introduce zsda drivers Stephen Hemminger
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=20240911075447.4074486-3-li.hanxiao@zte.com.cn \
--to=li.hanxiao@zte.com.cn \
--cc=dev@dpdk.org \
--cc=wang.yong19@zte.com.cn \
/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).