Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/42418/?format=api
http://patchwork.dpdk.org/api/patches/42418/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1530811980-24334-9-git-send-email-fiona.trahe@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<1530811980-24334-9-git-send-email-fiona.trahe@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1530811980-24334-9-git-send-email-fiona.trahe@intel.com", "date": "2018-07-05T17:32:52", "name": "[v3,08/16] compress/qat: setup queue-pairs for compression service", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "b061e52adbd222b35b8722f1f7660d7907ce71cc", "submitter": { "id": 423, "url": "http://patchwork.dpdk.org/api/people/423/?format=api", "name": "Fiona Trahe", "email": "fiona.trahe@intel.com" }, "delegate": { "id": 22, "url": "http://patchwork.dpdk.org/api/users/22/?format=api", "username": "pdelarag", "first_name": "Pablo", "last_name": "de Lara Guarch", "email": "pablo.de.lara.guarch@intel.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1530811980-24334-9-git-send-email-fiona.trahe@intel.com/mbox/", "series": [ { "id": 433, "url": "http://patchwork.dpdk.org/api/series/433/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=433", "date": "2018-07-05T17:32:52", "name": null, "version": 3, "mbox": "http://patchwork.dpdk.org/series/433/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/42418/comments/", "check": "fail", "checks": "http://patchwork.dpdk.org/api/patches/42418/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 075721BF9A;\n\tThu, 5 Jul 2018 19:33:30 +0200 (CEST)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id 2EBE91BF6F\n\tfor <dev@dpdk.org>; Thu, 5 Jul 2018 19:33:21 +0200 (CEST)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Jul 2018 10:33:19 -0700", "from sivswdev01.ir.intel.com (HELO localhost.localdomain)\n\t([10.237.217.45])\n\tby fmsmga008.fm.intel.com with ESMTP; 05 Jul 2018 10:33:18 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.51,313,1526367600\"; d=\"scan'208\";a=\"52875156\"", "From": "Fiona Trahe <fiona.trahe@intel.com>", "To": "dev@dpdk.org", "Cc": "pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com,\n\ttomaszx.jozwiak@intel.com", "Date": "Thu, 5 Jul 2018 18:32:52 +0100", "Message-Id": "<1530811980-24334-9-git-send-email-fiona.trahe@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "In-Reply-To": "<1530806730-11822-1-git-send-email-fiona.trahe@intel.com>", "References": "<1530806730-11822-1-git-send-email-fiona.trahe@intel.com>", "Subject": "[dpdk-dev] [PATCH v3 08/16] compress/qat: setup queue-pairs for\n\tcompression service", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Setup and clear queue-pairs for handling compression\nrequests and responses.\n\nSigned-off-by: Fiona Trahe <fiona.trahe@intel.com>\nSigned-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>\n---\n drivers/compress/qat/qat_comp.h | 2 ++\n drivers/compress/qat/qat_comp_pmd.c | 62 +++++++++++++++++++++++++++++++++++++\n drivers/compress/qat/qat_comp_pmd.h | 6 ++++\n 3 files changed, 70 insertions(+)", "diff": "diff --git a/drivers/compress/qat/qat_comp.h b/drivers/compress/qat/qat_comp.h\nindex 937f3c8..9e6861b 100644\n--- a/drivers/compress/qat/qat_comp.h\n+++ b/drivers/compress/qat/qat_comp.h\n@@ -24,6 +24,8 @@ enum qat_comp_request_type {\n \tREQ_COMP_END\n };\n \n+struct qat_comp_op_cookie {\n+};\n \n struct qat_comp_xform {\n \tstruct icp_qat_fw_comp_req qat_comp_req_tmpl;\ndiff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c\nindex 6feffb7..e7252b2 100644\n--- a/drivers/compress/qat/qat_comp_pmd.c\n+++ b/drivers/compress/qat/qat_comp_pmd.c\n@@ -2,6 +2,7 @@\n * Copyright(c) 2015-2018 Intel Corporation\n */\n \n+#include \"qat_comp.h\"\n #include \"qat_comp_pmd.h\"\n \n void\n@@ -38,3 +39,64 @@ qat_comp_stats_reset(struct rte_compressdev *dev)\n \tqat_stats_reset(qat_priv->qat_dev, QAT_SERVICE_COMPRESSION);\n \n }\n+\n+int\n+qat_comp_qp_release(struct rte_compressdev *dev, uint16_t queue_pair_id)\n+{\n+\tstruct qat_comp_dev_private *qat_private = dev->data->dev_private;\n+\n+\tQAT_LOG(DEBUG, \"Release comp qp %u on device %d\",\n+\t\t\t\tqueue_pair_id, dev->data->dev_id);\n+\n+\tqat_private->qat_dev->qps_in_use[QAT_SERVICE_COMPRESSION][queue_pair_id]\n+\t\t\t\t\t\t= NULL;\n+\n+\treturn qat_qp_release((struct qat_qp **)\n+\t\t\t&(dev->data->queue_pairs[queue_pair_id]));\n+}\n+\n+int\n+qat_comp_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,\n+\t\t uint32_t max_inflight_ops, int socket_id)\n+{\n+\tint ret = 0;\n+\tstruct qat_qp_config qat_qp_conf;\n+\n+\tstruct qat_qp **qp_addr =\n+\t\t\t(struct qat_qp **)&(dev->data->queue_pairs[qp_id]);\n+\tstruct qat_comp_dev_private *qat_private = dev->data->dev_private;\n+\tconst struct qat_qp_hw_data *comp_hw_qps =\n+\t\t\tqat_gen_config[qat_private->qat_dev->qat_dev_gen]\n+\t\t\t\t .qp_hw_data[QAT_SERVICE_COMPRESSION];\n+\tconst struct qat_qp_hw_data *qp_hw_data = comp_hw_qps + qp_id;\n+\n+\t/* If qp is already in use free ring memory and qp metadata. */\n+\tif (*qp_addr != NULL) {\n+\t\tret = qat_comp_qp_release(dev, qp_id);\n+\t\tif (ret < 0)\n+\t\t\treturn ret;\n+\t}\n+\tif (qp_id >= qat_qps_per_service(comp_hw_qps,\n+\t\t\t\t\t QAT_SERVICE_COMPRESSION)) {\n+\t\tQAT_LOG(ERR, \"qp_id %u invalid for this device\", qp_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tqat_qp_conf.hw = qp_hw_data;\n+\tqat_qp_conf.build_request = qat_comp_build_request;\n+\tqat_qp_conf.cookie_size = sizeof(struct qat_comp_op_cookie);\n+\tqat_qp_conf.nb_descriptors = max_inflight_ops;\n+\tqat_qp_conf.socket_id = socket_id;\n+\tqat_qp_conf.service_str = \"comp\";\n+\n+\tret = qat_qp_setup(qat_private->qat_dev, qp_addr, qp_id, &qat_qp_conf);\n+\tif (ret != 0)\n+\t\treturn ret;\n+\n+\t/* store a link to the qp in the qat_pci_device */\n+\tqat_private->qat_dev->qps_in_use[QAT_SERVICE_COMPRESSION][qp_id]\n+\t\t\t\t\t\t\t= *qp_addr;\n+\n+\treturn ret;\n+}\n+\ndiff --git a/drivers/compress/qat/qat_comp_pmd.h b/drivers/compress/qat/qat_comp_pmd.h\nindex 27d84c8..5a4bc31 100644\n--- a/drivers/compress/qat/qat_comp_pmd.h\n+++ b/drivers/compress/qat/qat_comp_pmd.h\n@@ -34,6 +34,12 @@ qat_comp_stats_reset(struct rte_compressdev *dev);\n void\n qat_comp_stats_get(struct rte_compressdev *dev,\n \t\tstruct rte_compressdev_stats *stats);\n+int\n+qat_comp_qp_release(struct rte_compressdev *dev, uint16_t queue_pair_id);\n+\n+int\n+qat_comp_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,\n+\t\t uint32_t max_inflight_ops, int socket_id);\n \n #endif\n #endif /* _QAT_COMP_PMD_H_ */\n", "prefixes": [ "v3", "08/16" ] }{ "id": 42418, "url": "