get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/119826/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 119826,
    "url": "https://patches.dpdk.org/api/patches/119826/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20221114120238.2143832-5-jerinj@marvell.com/",
    "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": "<20221114120238.2143832-5-jerinj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221114120238.2143832-5-jerinj@marvell.com",
    "date": "2022-11-14T12:02:30",
    "name": "[v1,04/12] mldev: support device queue-pair setup",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "6d153ef428d678c724393f1b11f1dded2ae647d8",
    "submitter": {
        "id": 1188,
        "url": "https://patches.dpdk.org/api/people/1188/?format=api",
        "name": "Jerin Jacob Kollanukkaran",
        "email": "jerinj@marvell.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20221114120238.2143832-5-jerinj@marvell.com/mbox/",
    "series": [
        {
            "id": 25753,
            "url": "https://patches.dpdk.org/api/series/25753/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=25753",
            "date": "2022-11-14T12:02:26",
            "name": "mldev: introduce machine learning device library",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/25753/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/119826/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/119826/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 7985BA00C4;\n\tMon, 14 Nov 2022 13:07:27 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6873242C29;\n\tMon, 14 Nov 2022 13:07:27 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id A08D542C29\n for <dev@dpdk.org>; Mon, 14 Nov 2022 13:07:25 +0100 (CET)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 2AE6h5OC008532; Mon, 14 Nov 2022 04:05:02 -0800",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3kugnb0wsn-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 14 Nov 2022 04:05:02 -0800",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Mon, 14 Nov 2022 04:05:00 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Mon, 14 Nov 2022 04:05:00 -0800",
            "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n by maili.marvell.com (Postfix) with ESMTP id 8767C5C68E5;\n Mon, 14 Nov 2022 04:04:35 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=Vp26mkqtBcpq1xhaIvt9jFoMF0fXCPchxamtym9jhMo=;\n b=g/R5uoYukDcQT+8af1H5gt4X+w852ib4PLOH3rlwNdD1IaK0Qa3KUrr730hfKNxUdJsm\n qcjpthlONEONDkMCAcfV+nK1oVFSmnzfgKgd3Ixgs50vs3vGkbrAkjm4V9+eMPavV528\n o+6hYHBfIa6sQFOaCI58tIAQa0iL46QPF9tdrAi5OEqChCtrNOrc/dgdZbVnD8wy2LjN\n +XV5mzluTGQmjlA3cNsu6FKqaS8TWatn/kHhH0lKMHqjfdPFIxkc5E8Fp6DZBOBJnqcT\n pYNU9Z+td14p5Fi/Bu/M/8lct8MpUMkj/HjTslD6j61LHnASmXre+BKY1/BzainTHkLW Ng==",
        "From": "<jerinj@marvell.com>",
        "To": "<dev@dpdk.org>, Srikanth Yalavarthi <syalavarthi@marvell.com>",
        "CC": "<thomas@monjalon.net>, <ferruh.yigit@xilinx.com>,\n <ajit.khaparde@broadcom.com>, <aboyer@pensando.io>,\n <andrew.rybchenko@oktetlabs.ru>, <beilei.xing@intel.com>,\n <bruce.richardson@intel.com>, <chas3@att.com>, <chenbo.xia@intel.com>,\n <ciara.loftus@intel.com>, <dsinghrawat@marvell.com>,\n <ed.czeck@atomicrules.com>, <evgenys@amazon.com>, <grive@u256.net>,\n <g.singh@nxp.com>, <zhouguoyang@huawei.com>, <haiyue.wang@intel.com>,\n <hkalra@marvell.com>, <heinrich.kuhn@corigine.com>,\n <hemant.agrawal@nxp.com>, <hyonkim@cisco.com>, <igorch@amazon.com>,\n <irusskikh@marvell.com>, <jgrajcia@cisco.com>,\n <jasvinder.singh@intel.com>, <jianwang@trustnetic.com>,\n <jiawenwu@trustnetic.com>, <jingjing.wu@intel.com>,\n <johndale@cisco.com>, <john.miller@atomicrules.com>,\n <linville@tuxdriver.com>, <keith.wiles@intel.com>,\n <kirankumark@marvell.com>, <oulijun@huawei.com>, <lironh@marvell.com>,\n <longli@microsoft.com>, <mw@semihalf.com>, <spinler@cesnet.cz>,\n <matan@nvidia.com>, <matt.peters@windriver.com>,\n <maxime.coquelin@redhat.com>, <mk@semihalf.com>, <humin29@huawei.com>,\n <pnalla@marvell.com>, <ndabilpuram@marvell.com>,\n <qiming.yang@intel.com>, <qi.z.zhang@intel.com>, <radhac@marvell.com>,\n <rahul.lakkireddy@chelsio.com>, <rmody@marvell.com>,\n <rosen.xu@intel.com>, <sachin.saxena@oss.nxp.com>,\n <skoteshwar@marvell.com>, <shshaikh@marvell.com>,\n <shaibran@amazon.com>, <shepard.siegel@atomicrules.com>,\n <asomalap@amd.com>, <somnath.kotur@broadcom.com>,\n <sthemmin@microsoft.com>, <steven.webster@windriver.com>,\n <skori@marvell.com>, <mtetsuyah@gmail.com>, <vburru@marvell.com>,\n <viacheslavo@nvidia.com>, <xiao.w.wang@intel.com>,\n <cloud.wangxiaoyun@huawei.com>, <yisen.zhuang@huawei.com>,\n <yongwang@vmware.com>, <xuanziyang2@huawei.com>, <pkapoor@marvell.com>,\n <nadavh@marvell.com>, <sburla@marvell.com>, <pathreya@marvell.com>,\n <gakhil@marvell.com>, <mdr@ashroe.eu>, <dmitry.kozliuk@gmail.com>,\n <anatoly.burakov@intel.com>, <cristian.dumitrescu@intel.com>,\n <honnappa.nagarahalli@arm.com>, <mattias.ronnblom@ericsson.com>,\n <ruifeng.wang@arm.com>, <drc@linux.vnet.ibm.com>,\n <konstantin.ananyev@intel.com>, <olivier.matz@6wind.com>,\n <jay.jayatheerthan@intel.com>, <asekhar@marvell.com>,\n <pbhagavatula@marvell.com>, <eagostini@nvidia.com>,\n <dchickles@marvell.com>, <sshankarnara@marvell.com>,\n Jerin Jacob <jerinj@marvell.com>",
        "Subject": "[dpdk-dev] [PATCH v1 04/12] mldev: support device queue-pair setup",
        "Date": "Mon, 14 Nov 2022 17:32:30 +0530",
        "Message-ID": "<20221114120238.2143832-5-jerinj@marvell.com>",
        "X-Mailer": "git-send-email 2.38.1",
        "In-Reply-To": "<20221114120238.2143832-1-jerinj@marvell.com>",
        "References": "<20220803132839.2747858-2-jerinj@marvell.com>\n <20221114120238.2143832-1-jerinj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "lngkZEJddPk4tlgAqT8Alj28HZ5JdUbh",
        "X-Proofpoint-GUID": "lngkZEJddPk4tlgAqT8Alj28HZ5JdUbh",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1\n definitions=2022-11-14_10,2022-11-11_01,2022-06-22_01",
        "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": "From: Srikanth Yalavarthi <syalavarthi@marvell.com>\n\nAdded APIs to create a queue-pair attached to ML device.\nQueue pairs are created with a user specified ID. Added\nfunction prototypes to be used by ML drivers for queue\npair create and destroy.\n\nSigned-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>\nSigned-off-by: Jerin Jacob <jerinj@marvell.com>\n---\n lib/mldev/rte_mldev.c      | 33 ++++++++++++++++++++++++++++\n lib/mldev/rte_mldev_core.h | 44 ++++++++++++++++++++++++++++++++++++++\n lib/mldev/version.map      |  1 +\n 3 files changed, 78 insertions(+)",
    "diff": "diff --git a/lib/mldev/rte_mldev.c b/lib/mldev/rte_mldev.c\nindex 651f8b2f7c..c8672cff8e 100644\n--- a/lib/mldev/rte_mldev.c\n+++ b/lib/mldev/rte_mldev.c\n@@ -306,3 +306,36 @@ rte_ml_dev_stop(int16_t dev_id)\n \n \treturn ret;\n }\n+\n+int\n+rte_ml_dev_queue_pair_setup(int16_t dev_id, uint16_t queue_pair_id,\n+\t\t\t    const struct rte_ml_dev_qp_conf *qp_conf, int socket_id)\n+{\n+\tstruct rte_ml_dev *dev;\n+\n+\tif (!rte_ml_dev_is_valid_dev(dev_id)) {\n+\t\tML_DEV_LOG(ERR, \"Invalid dev_id = %d\\n\", dev_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tdev = rte_ml_dev_pmd_get_dev(dev_id);\n+\tif (*dev->dev_ops->dev_queue_pair_setup == NULL)\n+\t\treturn -ENOTSUP;\n+\n+\tif (queue_pair_id >= dev->data->nb_queue_pairs) {\n+\t\tML_DEV_LOG(ERR, \"Invalid queue_pair_id = %d\", queue_pair_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (qp_conf == NULL) {\n+\t\tML_DEV_LOG(ERR, \"Dev %d, qp_conf cannot be NULL\\n\", dev_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (dev->data->dev_started) {\n+\t\tML_DEV_LOG(ERR, \"Device %d must be stopped to allow configuration\", dev_id);\n+\t\treturn -EBUSY;\n+\t}\n+\n+\treturn (*dev->dev_ops->dev_queue_pair_setup)(dev, queue_pair_id, qp_conf, socket_id);\n+}\ndiff --git a/lib/mldev/rte_mldev_core.h b/lib/mldev/rte_mldev_core.h\nindex 1405cce7f7..e2a16034d6 100644\n--- a/lib/mldev/rte_mldev_core.h\n+++ b/lib/mldev/rte_mldev_core.h\n@@ -117,6 +117,44 @@ typedef int (*mldev_start_t)(struct rte_ml_dev *dev);\n  */\n typedef int (*mldev_stop_t)(struct rte_ml_dev *dev);\n \n+/**\n+ * @internal\n+ *\n+ * Setup a queue pair for a device.\n+ *\n+ * @param dev\n+ *\tML device pointer.\n+ * @param queue_pair_id\n+ *\tQueue pair index.\n+ * @param queue_pair_conf\n+ *\tQueue pair configuration structure.\n+ * @param socket_id\n+ *\tSocket index.\n+ *\n+ * @return\n+ *\t- 0 on success.\n+ *\t- < 0, error on failure.\n+ */\n+typedef int (*mldev_queue_pair_setup_t)(struct rte_ml_dev *dev, uint16_t queue_pair_id,\n+\t\t\t\t\tconst struct rte_ml_dev_qp_conf *queue_pair_conf,\n+\t\t\t\t\tint socket_id);\n+\n+/**\n+ * @internal\n+ *\n+ * Release memory resources allocated by given queue pair.\n+ *\n+ * @param dev\n+ *\tML device pointer.\n+ * @param queue_pair_id\n+ *\tQueue pair index.\n+ *\n+ * @return\n+ *\t- 0 on success.\n+ *\t- -EAGAIN, if can't close as device is busy.\n+ */\n+typedef int (*mldev_queue_pair_release_t)(struct rte_ml_dev *dev, uint16_t queue_pair_id);\n+\n /**\n  * @internal\n  *\n@@ -137,6 +175,12 @@ struct rte_ml_dev_ops {\n \n \t/** Stop device. */\n \tmldev_stop_t dev_stop;\n+\n+\t/** Set up a device queue pair. */\n+\tmldev_queue_pair_setup_t dev_queue_pair_setup;\n+\n+\t/** Release a device queue pair. */\n+\tmldev_queue_pair_release_t dev_queue_pair_release;\n };\n \n /**\ndiff --git a/lib/mldev/version.map b/lib/mldev/version.map\nindex 1be508ab5f..cd44c05f3a 100644\n--- a/lib/mldev/version.map\n+++ b/lib/mldev/version.map\n@@ -6,6 +6,7 @@ EXPERIMENTAL {\n \trte_ml_dev_count;\n \trte_ml_dev_info_get;\n \trte_ml_dev_is_valid_dev;\n+\trte_ml_dev_queue_pair_setup;\n \trte_ml_dev_socket_id;\n \trte_ml_dev_start;\n \trte_ml_dev_stop;\n",
    "prefixes": [
        "v1",
        "04/12"
    ]
}