Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/139611/?format=api
https://patches.dpdk.org/api/patches/139611/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240422143102.251-4-zhangfei.gao@linaro.org/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20240422143102.251-4-zhangfei.gao@linaro.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20240422143102.251-4-zhangfei.gao@linaro.org", "date": "2024-04-22T14:31:02", "name": "[3/3] compress/uadk: support burst enqueue/dequeue", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "826e26bbe148b1e8f79181916657e292c0512fbb", "submitter": { "id": 2701, "url": "https://patches.dpdk.org/api/people/2701/?format=api", "name": "Zhangfei Gao", "email": "zhangfei.gao@linaro.org" }, "delegate": { "id": 6690, "url": "https://patches.dpdk.org/api/users/6690/?format=api", "username": "akhil", "first_name": "akhil", "last_name": "goyal", "email": "gakhil@marvell.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20240422143102.251-4-zhangfei.gao@linaro.org/mbox/", "series": [ { "id": 31802, "url": "https://patches.dpdk.org/api/series/31802/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=31802", "date": "2024-04-22T14:30:59", "name": "Introduce UADK compression driver", "version": 1, "mbox": "https://patches.dpdk.org/series/31802/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/139611/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/139611/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 99EAE43EDB;\n\tMon, 22 Apr 2024 16:31:41 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3E3A040696;\n\tMon, 22 Apr 2024 16:31:25 +0200 (CEST)", "from mail-pj1-f50.google.com (mail-pj1-f50.google.com\n [209.85.216.50]) by mails.dpdk.org (Postfix) with ESMTP id 79F8F40648\n for <dev@dpdk.org>; Mon, 22 Apr 2024 16:31:23 +0200 (CEST)", "by mail-pj1-f50.google.com with SMTP id\n 98e67ed59e1d1-2a53b331400so2865740a91.1\n for <dev@dpdk.org>; Mon, 22 Apr 2024 07:31:23 -0700 (PDT)", "from localhost.localdomain ([121.37.54.139])\n by smtp.gmail.com with ESMTPSA id\n v17-20020a17090ad59100b0029c19285192sm9481284pju.44.2024.04.22.07.31.20\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 22 Apr 2024 07:31:22 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1713796283; x=1714401083; darn=dpdk.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=Bke7GsIMNdY53LfN2ieTrVMGxeO10Vi7ref4oetuTNQ=;\n b=q1eBOl4dyq9bw/o6Vcxypf/aROBdlUZONFSe2uMZC8AhxpiA2faowg+df259LsBDOl\n d0+/M/ETWMP1K/9umFkKzWnoN/BlJx/4LYi+8JtNXqQd5VYDRi1QiIVDuyawuzhHslds\n 6+CW+Gi/KEdt3MlttRyLGh5VJb+Qw0Op/SBoN8167qtBBxoJk0gyu11t/Ve4KyYtXmJM\n xCXoov60fZNrLbGRgU3qxR4oSRN+Ky0/0oEdl7fbE7PBZJoViUwmdszu31uiDDsHw4P7\n KE6lRHav+zk44PGqtDtp3mi7aE54NSImqPhcW3qVtexmfi40YJP/gds2dRy2T5hjfXPV\n 4fVg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1713796283; x=1714401083;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=Bke7GsIMNdY53LfN2ieTrVMGxeO10Vi7ref4oetuTNQ=;\n b=SH5Vds8/IlN9IOcGsxAHmu93HAID4wWAf6bt6sM9FoSoybymaUYgVYXyiH8/FebIjc\n Rq14ZWQLsbNb1W6eqONAUVJSusLGBBcNIKkr3oPc/5N08JwnUGHYQDspTNS+WChYZ5Hh\n kzh6fMw+tQf3U2CF6aeCGNaARwrKe9cophr6oAwLjFkWcCgS/19jSLQsVnN0FGi8wISu\n JEu6Ez2+gpj6lXxnsB9eJXlG4PzGuq5y1IltNC4brnQkbposzoaSuN4C3RrkZwFu0Pzl\n 9cj5DT3S4M1Izq14DHeWFrm0RQ0FOzvXMBazECaQTDGpzPavZ9wGFDTHfRxF44hrcUau\n zhSQ==", "X-Gm-Message-State": "AOJu0YzoJp3PR+wn73rtsABLftSwzSxcL5ct827b7F1GJVWgcKSY3Oie\n zPKkaNcHqPq5bUsaY6cgmQ9xZWyvWFa2xrrWdmSgFSH1xI7tRTiCLlzKmIGq/TY=", "X-Google-Smtp-Source": "\n AGHT+IFihvHJ8D+pzCXKB/AlYawLNFsz6Gmh8oo1omfub80tEX6KHXPr+YZza3cSa46CQysowOI6pw==", "X-Received": "by 2002:a17:90a:5d04:b0:2a0:4c3b:2c39 with SMTP id\n s4-20020a17090a5d0400b002a04c3b2c39mr9829014pji.23.1713796282666;\n Mon, 22 Apr 2024 07:31:22 -0700 (PDT)", "From": "Zhangfei Gao <zhangfei.gao@linaro.org>", "To": "Akhil Goyal <gakhil@marvell.com>, Fan Zhang <fanzhang.oss@gmail.com>,\n Ashish Gupta <ashish.gupta@marvell.com>", "Cc": "dev@dpdk.org,\n\tZhangfei Gao <zhangfei.gao@linaro.org>", "Subject": "[PATCH 3/3] compress/uadk: support burst enqueue/dequeue", "Date": "Mon, 22 Apr 2024 14:31:02 +0000", "Message-Id": "<20240422143102.251-4-zhangfei.gao@linaro.org>", "X-Mailer": "git-send-email 2.33.0", "In-Reply-To": "<20240422143102.251-1-zhangfei.gao@linaro.org>", "References": "<20240422143102.251-1-zhangfei.gao@linaro.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "This commit adds the burst enqueue and dequeue operations.\n\nSigned-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>\n---\n drivers/compress/uadk/uadk_compress_pmd.c | 88 ++++++++++++++++++++++-\n 1 file changed, 86 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/compress/uadk/uadk_compress_pmd.c b/drivers/compress/uadk/uadk_compress_pmd.c\nindex 25858855e6..312aa5c744 100644\n--- a/drivers/compress/uadk/uadk_compress_pmd.c\n+++ b/drivers/compress/uadk/uadk_compress_pmd.c\n@@ -331,6 +331,90 @@ static struct rte_compressdev_ops uadk_compress_pmd_ops = {\n \t\t.stream_free\t\t= NULL,\n };\n \n+static uint16_t\n+uadk_compress_pmd_enqueue_burst_sync(void *queue_pair,\n+\t\t\t\t struct rte_comp_op **ops, uint16_t nb_ops)\n+{\n+\tstruct uadk_qp *qp = queue_pair;\n+\tstruct uadk_stream *stream;\n+\tstruct rte_comp_op *op;\n+\tuint16_t enqd = 0;\n+\tint i, ret = 0;\n+\n+\tfor (i = 0; i < nb_ops; i++) {\n+\t\top = ops[i];\n+\n+\t\tif (op->op_type == RTE_COMP_OP_STATEFUL) {\n+\t\t\top->status = RTE_COMP_OP_STATUS_INVALID_ARGS;\n+\t\t} else {\n+\t\t\t/* process stateless ops */\n+\t\t\tstream = (struct uadk_stream *)op->private_xform;\n+\t\t\tif (stream) {\n+\t\t\t\tstruct wd_comp_req req = {0};\n+\t\t\t\tuint16_t dst_len = rte_pktmbuf_data_len(op->m_dst);\n+\n+\t\t\t\treq.src = rte_pktmbuf_mtod(op->m_src, uint8_t *);\n+\t\t\t\treq.src_len = op->src.length;\n+\t\t\t\treq.dst = rte_pktmbuf_mtod(op->m_dst, uint8_t *);\n+\t\t\t\treq.dst_len = dst_len;\n+\t\t\t\treq.op_type = (enum wd_comp_op_type)stream->type;\n+\t\t\t\treq.cb = NULL;\n+\t\t\t\treq.data_fmt = WD_FLAT_BUF;\n+\t\t\t\tdo {\n+\t\t\t\t\tret = wd_do_comp_sync(stream->handle, &req);\n+\t\t\t\t} while (ret == -WD_EBUSY);\n+\n+\t\t\t\top->consumed += req.src_len;\n+\n+\t\t\t\tif (req.dst_len <= dst_len) {\n+\t\t\t\t\top->produced += req.dst_len;\n+\t\t\t\t\top->status = RTE_COMP_OP_STATUS_SUCCESS;\n+\t\t\t\t} else {\n+\t\t\t\t\top->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;\n+\t\t\t\t}\n+\n+\t\t\t\tif (ret) {\n+\t\t\t\t\top->status = RTE_COMP_OP_STATUS_ERROR;\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t} else {\n+\t\t\t\top->status = RTE_COMP_OP_STATUS_INVALID_ARGS;\n+\t\t\t}\n+\t\t}\n+\n+\t\t/* Whatever is out of op, put it into completion queue with\n+\t\t * its status\n+\t\t */\n+\t\tif (!ret)\n+\t\t\tret = rte_ring_enqueue(qp->processed_pkts, (void *)op);\n+\n+\t\tif (unlikely(ret)) {\n+\t\t\t/* increment count if failed to enqueue op */\n+\t\t\tqp->qp_stats.enqueue_err_count++;\n+\t\t} else {\n+\t\t\tqp->qp_stats.enqueued_count++;\n+\t\t\tenqd++;\n+\t\t}\n+\t}\n+\n+\treturn enqd;\n+}\n+\n+static uint16_t\n+uadk_compress_pmd_dequeue_burst_sync(void *queue_pair,\n+\t\t\t\t struct rte_comp_op **ops,\n+\t\t\t\t uint16_t nb_ops)\n+{\n+\tstruct uadk_qp *qp = queue_pair;\n+\tunsigned int nb_dequeued = 0;\n+\n+\tnb_dequeued = rte_ring_dequeue_burst(qp->processed_pkts,\n+\t\t\t(void **)ops, nb_ops, NULL);\n+\tqp->qp_stats.dequeued_count += nb_dequeued;\n+\n+\treturn nb_dequeued;\n+}\n+\n static int\n uadk_compress_probe(struct rte_vdev_device *vdev)\n {\n@@ -358,8 +442,8 @@ uadk_compress_probe(struct rte_vdev_device *vdev)\n \t}\n \n \tcompressdev->dev_ops = &uadk_compress_pmd_ops;\n-\tcompressdev->dequeue_burst = NULL;\n-\tcompressdev->enqueue_burst = NULL;\n+\tcompressdev->dequeue_burst = uadk_compress_pmd_dequeue_burst_sync;\n+\tcompressdev->enqueue_burst = uadk_compress_pmd_enqueue_burst_sync;\n \tcompressdev->feature_flags = RTE_COMPDEV_FF_HW_ACCELERATED;\n \n \treturn 0;\n", "prefixes": [ "3/3" ] }{ "id": 139611, "url": "