Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/71211/?format=api
http://patches.dpdk.org/api/patches/71211/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200610185308.15220-1-arkadiuszx.kusztal@intel.com/", "project": { "id": 1, "url": "http://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": "<20200610185308.15220-1-arkadiuszx.kusztal@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200610185308.15220-1-arkadiuszx.kusztal@intel.com", "date": "2020-06-10T18:53:07", "name": "[1/2] cryptodev: add function to check if qp was setup", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "7cc2966a0d16482ade2ff5a63c7516119f563b39", "submitter": { "id": 452, "url": "http://patches.dpdk.org/api/people/452/?format=api", "name": "Arkadiusz Kusztal", "email": "arkadiuszx.kusztal@intel.com" }, "delegate": { "id": 6690, "url": "http://patches.dpdk.org/api/users/6690/?format=api", "username": "akhil", "first_name": "akhil", "last_name": "goyal", "email": "gakhil@marvell.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200610185308.15220-1-arkadiuszx.kusztal@intel.com/mbox/", "series": [ { "id": 10392, "url": "http://patches.dpdk.org/api/series/10392/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10392", "date": "2020-06-10T18:53:07", "name": "[1/2] cryptodev: add function to check if qp was setup", "version": 1, "mbox": "http://patches.dpdk.org/series/10392/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/71211/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/71211/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 29A36A051E;\n\tWed, 10 Jun 2020 20:53:17 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4A5211BF78;\n\tWed, 10 Jun 2020 20:53:16 +0200 (CEST)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by dpdk.org (Postfix) with ESMTP id C24671BF72\n for <dev@dpdk.org>; Wed, 10 Jun 2020 20:53:14 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 10 Jun 2020 11:53:13 -0700", "from akusztax-mobl.ger.corp.intel.com ([10.104.121.40])\n by fmsmga001.fm.intel.com with ESMTP; 10 Jun 2020 11:53:11 -0700" ], "IronPort-SDR": [ "\n CZGd6Rk3PeuZQuH5ORX27+Mjm+EBijtWOZrbIs5uSi3HVl9N8aUCwYL5qACkK98iqu/K7LCSqZ\n dRqiVTFvg/WA==", "\n i2ltTecL3WIap2drdGQqYKCl1RIhUP+rlrxEdWr0Dlpiopltn12wODg7dNgZlZ9ak3virBG42U\n 9T7hvcgUSXRg==" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.73,496,1583222400\"; d=\"scan'208\";a=\"380157183\"", "From": "Arek Kusztal <arkadiuszx.kusztal@intel.com>", "To": "dev@dpdk.org", "Cc": "akhil.goyal@nxp.com,\n\tfiona.trahe@intel.com,\n\tarkaduszx.kusztal@intel.com", "Date": "Wed, 10 Jun 2020 20:53:07 +0200", "Message-Id": "<20200610185308.15220-1-arkadiuszx.kusztal@intel.com>", "X-Mailer": "git-send-email 2.19.1.windows.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 1/2] cryptodev: add function to check if qp was\n\tsetup", "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 <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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Fiona Trahe <fiona.trahe@intel.com>\n\nThis patch adds function that can check if queue pair\nwas already setup. This may be useful when dealing with\nmulti process approach in cryptodev.\n\nSigned-off-by: Fiona Trahe <fiona.trahe@intel.com>\n---\n lib/librte_cryptodev/rte_cryptodev.c | 28 ++++++++++++++++++++++++++++\n lib/librte_cryptodev/rte_cryptodev.h | 14 ++++++++++++++\n 2 files changed, 42 insertions(+)", "diff": "diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c\nindex e37b83a..705387b 100644\n--- a/lib/librte_cryptodev/rte_cryptodev.c\n+++ b/lib/librte_cryptodev/rte_cryptodev.c\n@@ -1080,6 +1080,34 @@ rte_cryptodev_close(uint8_t dev_id)\n }\n \n int\n+rte_cryptodev_get_qp_status(uint8_t dev_id, uint16_t queue_pair_id)\n+{\n+\tstruct rte_cryptodev *dev;\n+\n+\tif (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {\n+\t\tCDEV_LOG_ERR(\"Invalid dev_id=%\" PRIu8, dev_id);\n+\t\treturn -(ENODEV);\n+\t}\n+\n+\tdev = &rte_crypto_devices[dev_id];\n+\tif (queue_pair_id >= dev->data->nb_queue_pairs) {\n+\t\tCDEV_LOG_ERR(\"Invalid queue_pair_id=%d\", queue_pair_id);\n+\t\treturn -(ENODEV);\n+\t}\n+\tvoid **qps = dev->data->queue_pairs;\n+\n+\tif (qps[queue_pair_id])\t{\n+\t\tCDEV_LOG_INFO(\"qp %d on dev %d is initialised\",\n+\t\t\tqueue_pair_id, dev_id);\n+\t\treturn 1;\n+\t}\n+\n+\tCDEV_LOG_INFO(\"qp %d on dev %d is not initialised\",\n+\t\tqueue_pair_id, dev_id);\n+\treturn 0;\n+}\n+\n+int\n rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,\n \t\tconst struct rte_cryptodev_qp_conf *qp_conf, int socket_id)\n \ndiff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h\nindex 4aaee73..d01a658 100644\n--- a/lib/librte_cryptodev/rte_cryptodev.h\n+++ b/lib/librte_cryptodev/rte_cryptodev.h\n@@ -727,6 +727,20 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,\n \t\tconst struct rte_cryptodev_qp_conf *qp_conf, int socket_id);\n \n /**\n+ * Get the status of queue pairs setup on a specific crypto device\n+ *\n+ * @param\tdev_id\t\t\tCrypto device identifier.\n+ * @param\tqueue_pair_id\tThe index of the queue pair to check.\n+ *\n+ * @return\n+ * - 0: qp was not configured\n+ * - 1: qp was configured\n+ * - -ENODEV: device was not configured\n+ */\n+int\n+rte_cryptodev_get_qp_status(uint8_t dev_id, uint16_t queue_pair_id);\n+\n+/**\n * Get the number of queue pairs on a specific crypto device\n *\n * @param\tdev_id\t\tCrypto device identifier.\n", "prefixes": [ "1/2" ] }{ "id": 71211, "url": "