get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 132036,
    "url": "http://patches.dpdk.org/api/patches/132036/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230927183052.17347-9-syalavarthi@marvell.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": "<20230927183052.17347-9-syalavarthi@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230927183052.17347-9-syalavarthi@marvell.com",
    "date": "2023-09-27T18:30:21",
    "name": "[v3,08/35] ml/cnxk: update queue-pair handling functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "1a37ce23237c815f45589a378642207d48b7126c",
    "submitter": {
        "id": 2480,
        "url": "http://patches.dpdk.org/api/people/2480/?format=api",
        "name": "Srikanth Yalavarthi",
        "email": "syalavarthi@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230927183052.17347-9-syalavarthi@marvell.com/mbox/",
    "series": [
        {
            "id": 29661,
            "url": "http://patches.dpdk.org/api/series/29661/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29661",
            "date": "2023-09-27T18:30:13",
            "name": "Implemenation of revised ml/cnxk driver",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/29661/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/132036/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/132036/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 9D80B4262B;\n\tWed, 27 Sep 2023 20:31:44 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CDA1640E6E;\n\tWed, 27 Sep 2023 20:31:13 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 0DB6140A6E\n for <dev@dpdk.org>; Wed, 27 Sep 2023 20:31:07 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 38RCK78p015701 for <dev@dpdk.org>; Wed, 27 Sep 2023 11:31:07 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3tcma5sftc-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Wed, 27 Sep 2023 11:31:06 -0700",
            "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.48;\n Wed, 27 Sep 2023 11:31:05 -0700",
            "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.48 via Frontend\n Transport; Wed, 27 Sep 2023 11:31:05 -0700",
            "from ml-host-33.caveonetworks.com (unknown [10.110.143.233])\n by maili.marvell.com (Postfix) with ESMTP id F3A3B3F70A3;\n Wed, 27 Sep 2023 11:31:04 -0700 (PDT)"
        ],
        "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=eg4TMnpVuL1vgb9bF2gO3n5F8Fy/MygxKeVTgq89Fj4=;\n b=PrDUQRye+mSeaOH9+5y84jfNDAwS9i5+HnN8wFVZ0V5EFwTjVOgVHGbkcTRPUrEfIu2g\n mj0yw/0HRwJ55sElz6fBfe6wxCt00ligr5Gpb7M5gWPJ79GkOAOJg+glxxY7REl3ZsBF\n 96GMLxjIXsFQ3hpr/O074ClPt3+BsXsPApal3PE0QGC9EW0GXOHCvkPpJa2nB4YgMqNc\n XqwDlu/7xM9d4AO6/XivdLQGhV4XOI+lR6rRqa0PEbyg2Cx9NhrIQVq2AB27vq+FUdjA\n fYBGj4L/oBl2yndLpqJhVyQGepLHBQVn+o/PDVKJjwCzT10XCZSSC2IE6i87DzQfI0Mn Hw==",
        "From": "Srikanth Yalavarthi <syalavarthi@marvell.com>",
        "To": "Srikanth Yalavarthi <syalavarthi@marvell.com>",
        "CC": "<dev@dpdk.org>, <sshankarnara@marvell.com>, <aprabhu@marvell.com>,\n <ptakkar@marvell.com>",
        "Subject": "[PATCH v3 08/35] ml/cnxk: update queue-pair handling functions",
        "Date": "Wed, 27 Sep 2023 11:30:21 -0700",
        "Message-ID": "<20230927183052.17347-9-syalavarthi@marvell.com>",
        "X-Mailer": "git-send-email 2.41.0",
        "In-Reply-To": "<20230927183052.17347-1-syalavarthi@marvell.com>",
        "References": "<20230830155927.3566-1-syalavarthi@marvell.com>\n <20230927183052.17347-1-syalavarthi@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "iq1bTDCqI0rIUMVjWvDg6TwaA_uqKjvG",
        "X-Proofpoint-ORIG-GUID": "iq1bTDCqI0rIUMVjWvDg6TwaA_uqKjvG",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2023-09-27_12,2023-09-27_01,2023-05-22_02",
        "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": "Added cnxk wrapper function to handle ML device queue-pairs.\n\nSigned-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>\n---\n drivers/ml/cnxk/cn10k_ml_ops.c | 135 +----------------------------\n drivers/ml/cnxk/cn10k_ml_ops.h |   7 +-\n drivers/ml/cnxk/cnxk_ml_ops.c  | 153 ++++++++++++++++++++++++++++++++-\n drivers/ml/cnxk/cnxk_ml_ops.h  |   3 -\n 4 files changed, 154 insertions(+), 144 deletions(-)",
    "diff": "diff --git a/drivers/ml/cnxk/cn10k_ml_ops.c b/drivers/ml/cnxk/cn10k_ml_ops.c\nindex 6d8f2c8777..e3c688a55f 100644\n--- a/drivers/ml/cnxk/cn10k_ml_ops.c\n+++ b/drivers/ml/cnxk/cn10k_ml_ops.c\n@@ -95,93 +95,12 @@ cn10k_ml_get_poll_ptr(struct cnxk_ml_req *req)\n \treturn plt_read64(req->status);\n }\n \n-static void\n-qp_memzone_name_get(char *name, int size, int dev_id, int qp_id)\n-{\n-\tsnprintf(name, size, \"cnxk_ml_qp_mem_%u:%u\", dev_id, qp_id);\n-}\n-\n-int\n-cnxk_ml_qp_destroy(const struct rte_ml_dev *dev, struct cnxk_ml_qp *qp)\n-{\n-\tconst struct rte_memzone *qp_mem;\n-\tchar name[RTE_MEMZONE_NAMESIZE];\n-\tint ret;\n-\n-\tqp_memzone_name_get(name, RTE_MEMZONE_NAMESIZE, dev->data->dev_id, qp->id);\n-\tqp_mem = rte_memzone_lookup(name);\n-\tret = rte_memzone_free(qp_mem);\n-\tif (ret)\n-\t\treturn ret;\n-\n-\trte_free(qp);\n-\n-\treturn 0;\n-}\n-\n-int\n-cn10k_ml_dev_queue_pair_release(struct rte_ml_dev *dev, uint16_t queue_pair_id)\n-{\n-\tstruct cnxk_ml_qp *qp;\n-\tint ret;\n-\n-\tqp = dev->data->queue_pairs[queue_pair_id];\n-\tif (qp == NULL)\n-\t\treturn -EINVAL;\n-\n-\tret = cnxk_ml_qp_destroy(dev, qp);\n-\tif (ret) {\n-\t\tplt_err(\"Could not destroy queue pair %u\", queue_pair_id);\n-\t\treturn ret;\n-\t}\n-\n-\tdev->data->queue_pairs[queue_pair_id] = NULL;\n-\n-\treturn 0;\n-}\n-\n-static struct cnxk_ml_qp *\n-cnxk_ml_qp_create(const struct rte_ml_dev *dev, uint16_t qp_id, uint32_t nb_desc, int socket_id)\n+void\n+cn10k_ml_qp_initialize(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_qp *qp)\n {\n-\tconst struct rte_memzone *qp_mem;\n-\tchar name[RTE_MEMZONE_NAMESIZE];\n-\tstruct cnxk_ml_qp *qp;\n-\tuint32_t len;\n-\tuint8_t *va;\n \tuint64_t i;\n \n-\t/* Allocate queue pair */\n-\tqp = rte_zmalloc_socket(\"cn10k_ml_pmd_queue_pair\", sizeof(struct cnxk_ml_qp), ROC_ALIGN,\n-\t\t\t\tsocket_id);\n-\tif (qp == NULL) {\n-\t\tplt_err(\"Could not allocate queue pair\");\n-\t\treturn NULL;\n-\t}\n-\n-\t/* For request queue */\n-\tlen = nb_desc * sizeof(struct cnxk_ml_req);\n-\tqp_memzone_name_get(name, RTE_MEMZONE_NAMESIZE, dev->data->dev_id, qp_id);\n-\tqp_mem = rte_memzone_reserve_aligned(\n-\t\tname, len, socket_id, RTE_MEMZONE_SIZE_HINT_ONLY | RTE_MEMZONE_256MB, ROC_ALIGN);\n-\tif (qp_mem == NULL) {\n-\t\tplt_err(\"Could not reserve memzone: %s\", name);\n-\t\tgoto qp_free;\n-\t}\n-\n-\tva = qp_mem->addr;\n-\tmemset(va, 0, len);\n-\n-\t/* Initialize Request queue */\n-\tqp->id = qp_id;\n-\tqp->queue.reqs = (struct cnxk_ml_req *)va;\n-\tqp->queue.head = 0;\n-\tqp->queue.tail = 0;\n-\tqp->queue.wait_cycles = ML_CNXK_CMD_TIMEOUT * plt_tsc_hz();\n-\tqp->nb_desc = nb_desc;\n-\tqp->stats.enqueued_count = 0;\n-\tqp->stats.dequeued_count = 0;\n-\tqp->stats.enqueue_err_count = 0;\n-\tqp->stats.dequeue_err_count = 0;\n+\tRTE_SET_USED(cnxk_mldev);\n \n \t/* Initialize job command */\n \tfor (i = 0; i < qp->nb_desc; i++) {\n@@ -189,13 +108,6 @@ cnxk_ml_qp_create(const struct rte_ml_dev *dev, uint16_t qp_id, uint32_t nb_desc\n \t\tqp->queue.reqs[i].cn10k_req.jcmd.w1.s.jobptr =\n \t\t\tPLT_U64_CAST(&qp->queue.reqs[i].cn10k_req.jd);\n \t}\n-\n-\treturn qp;\n-\n-qp_free:\n-\trte_free(qp);\n-\n-\treturn NULL;\n }\n \n static void\n@@ -1002,47 +914,6 @@ cn10k_ml_dev_stop(struct cnxk_ml_dev *cnxk_mldev)\n \treturn 0;\n }\n \n-int\n-cn10k_ml_dev_queue_pair_setup(struct rte_ml_dev *dev, 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_info dev_info;\n-\tstruct cnxk_ml_qp *qp;\n-\tuint32_t nb_desc;\n-\n-\tif (queue_pair_id >= dev->data->nb_queue_pairs) {\n-\t\tplt_err(\"Queue-pair id = %u (>= max queue pairs supported, %u)\\n\", queue_pair_id,\n-\t\t\tdev->data->nb_queue_pairs);\n-\t\treturn -EINVAL;\n-\t}\n-\n-\tif (dev->data->queue_pairs[queue_pair_id] != NULL)\n-\t\tcn10k_ml_dev_queue_pair_release(dev, queue_pair_id);\n-\n-\tcnxk_ml_dev_info_get(dev, &dev_info);\n-\tif ((qp_conf->nb_desc > dev_info.max_desc) || (qp_conf->nb_desc == 0)) {\n-\t\tplt_err(\"Could not setup queue pair for %u descriptors\", qp_conf->nb_desc);\n-\t\treturn -EINVAL;\n-\t}\n-\tplt_ml_dbg(\"Creating queue-pair, queue_pair_id = %u, nb_desc = %u\", queue_pair_id,\n-\t\t   qp_conf->nb_desc);\n-\n-\t/* As the number of usable descriptors is 1 less than the queue size being created, we\n-\t * increment the size of queue by 1 than the requested size, except when the requested size\n-\t * is equal to the maximum possible size.\n-\t */\n-\tnb_desc =\n-\t\t(qp_conf->nb_desc == dev_info.max_desc) ? dev_info.max_desc : qp_conf->nb_desc + 1;\n-\tqp = cnxk_ml_qp_create(dev, queue_pair_id, nb_desc, socket_id);\n-\tif (qp == NULL) {\n-\t\tplt_err(\"Could not create queue pair %u\", queue_pair_id);\n-\t\treturn -ENOMEM;\n-\t}\n-\tdev->data->queue_pairs[queue_pair_id] = qp;\n-\n-\treturn 0;\n-}\n-\n int\n cn10k_ml_dev_stats_get(struct rte_ml_dev *dev, struct rte_ml_dev_stats *stats)\n {\ndiff --git a/drivers/ml/cnxk/cn10k_ml_ops.h b/drivers/ml/cnxk/cn10k_ml_ops.h\nindex d50b5bede7..2d0a49d5cd 100644\n--- a/drivers/ml/cnxk/cn10k_ml_ops.h\n+++ b/drivers/ml/cnxk/cn10k_ml_ops.h\n@@ -296,9 +296,6 @@ int cn10k_ml_dev_start(struct cnxk_ml_dev *cnxk_mldev);\n int cn10k_ml_dev_stop(struct cnxk_ml_dev *cnxk_mldev);\n int cn10k_ml_dev_dump(struct rte_ml_dev *dev, FILE *fp);\n int cn10k_ml_dev_selftest(struct rte_ml_dev *dev);\n-int cn10k_ml_dev_queue_pair_setup(struct rte_ml_dev *dev, uint16_t queue_pair_id,\n-\t\t\t\t  const struct rte_ml_dev_qp_conf *qp_conf, int socket_id);\n-int cn10k_ml_dev_queue_pair_release(struct rte_ml_dev *dev, uint16_t queue_pair_id);\n \n int cn10k_ml_dev_stats_get(struct rte_ml_dev *dev, struct rte_ml_dev_stats *stats);\n void cn10k_ml_dev_stats_reset(struct rte_ml_dev *dev);\n@@ -339,7 +336,7 @@ __rte_hot int cn10k_ml_op_error_get(struct rte_ml_dev *dev, struct rte_ml_op *op\n \t\t\t\t    struct rte_ml_op_error *error);\n __rte_hot int cn10k_ml_inference_sync(struct rte_ml_dev *dev, struct rte_ml_op *op);\n \n-/* Temporarily set below functions as non-static */\n-int cnxk_ml_qp_destroy(const struct rte_ml_dev *dev, struct cnxk_ml_qp *qp);\n+/* Misc ops */\n+void cn10k_ml_qp_initialize(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_qp *qp);\n \n #endif /* _CN10K_ML_OPS_H_ */\ndiff --git a/drivers/ml/cnxk/cnxk_ml_ops.c b/drivers/ml/cnxk/cnxk_ml_ops.c\nindex 07a4daabc5..aa56dd2276 100644\n--- a/drivers/ml/cnxk/cnxk_ml_ops.c\n+++ b/drivers/ml/cnxk/cnxk_ml_ops.c\n@@ -10,7 +10,107 @@\n #include \"cnxk_ml_model.h\"\n #include \"cnxk_ml_ops.h\"\n \n-int\n+static void\n+qp_memzone_name_get(char *name, int size, int dev_id, int qp_id)\n+{\n+\tsnprintf(name, size, \"cnxk_ml_qp_mem_%u:%u\", dev_id, qp_id);\n+}\n+\n+static int\n+cnxk_ml_qp_destroy(const struct rte_ml_dev *dev, struct cnxk_ml_qp *qp)\n+{\n+\tconst struct rte_memzone *qp_mem;\n+\tchar name[RTE_MEMZONE_NAMESIZE];\n+\tint ret;\n+\n+\tqp_memzone_name_get(name, RTE_MEMZONE_NAMESIZE, dev->data->dev_id, qp->id);\n+\tqp_mem = rte_memzone_lookup(name);\n+\tret = rte_memzone_free(qp_mem);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\trte_free(qp);\n+\n+\treturn 0;\n+}\n+\n+static int\n+cnxk_ml_dev_queue_pair_release(struct rte_ml_dev *dev, uint16_t queue_pair_id)\n+{\n+\tstruct cnxk_ml_qp *qp;\n+\tint ret;\n+\n+\tqp = dev->data->queue_pairs[queue_pair_id];\n+\tif (qp == NULL)\n+\t\treturn -EINVAL;\n+\n+\tret = cnxk_ml_qp_destroy(dev, qp);\n+\tif (ret) {\n+\t\tplt_err(\"Could not destroy queue pair %u\", queue_pair_id);\n+\t\treturn ret;\n+\t}\n+\n+\tdev->data->queue_pairs[queue_pair_id] = NULL;\n+\n+\treturn 0;\n+}\n+\n+static struct cnxk_ml_qp *\n+cnxk_ml_qp_create(const struct rte_ml_dev *dev, uint16_t qp_id, uint32_t nb_desc, int socket_id)\n+{\n+\tconst struct rte_memzone *qp_mem;\n+\tchar name[RTE_MEMZONE_NAMESIZE];\n+\tstruct cnxk_ml_dev *cnxk_mldev;\n+\tstruct cnxk_ml_qp *qp;\n+\tuint32_t len;\n+\tuint8_t *va;\n+\n+\tcnxk_mldev = dev->data->dev_private;\n+\n+\t/* Allocate queue pair */\n+\tqp = rte_zmalloc_socket(\"cnxk_ml_pmd_queue_pair\", sizeof(struct cnxk_ml_qp), ROC_ALIGN,\n+\t\t\t\tsocket_id);\n+\tif (qp == NULL) {\n+\t\tplt_err(\"Could not allocate queue pair\");\n+\t\treturn NULL;\n+\t}\n+\n+\t/* For request queue */\n+\tlen = nb_desc * sizeof(struct cnxk_ml_req);\n+\tqp_memzone_name_get(name, RTE_MEMZONE_NAMESIZE, dev->data->dev_id, qp_id);\n+\tqp_mem = rte_memzone_reserve_aligned(\n+\t\tname, len, socket_id, RTE_MEMZONE_SIZE_HINT_ONLY | RTE_MEMZONE_256MB, ROC_ALIGN);\n+\tif (qp_mem == NULL) {\n+\t\tplt_err(\"Could not reserve memzone: %s\", name);\n+\t\tgoto qp_free;\n+\t}\n+\n+\tva = qp_mem->addr;\n+\tmemset(va, 0, len);\n+\n+\t/* Initialize Request queue */\n+\tqp->id = qp_id;\n+\tqp->queue.reqs = (struct cnxk_ml_req *)va;\n+\tqp->queue.head = 0;\n+\tqp->queue.tail = 0;\n+\tqp->queue.wait_cycles = ML_CNXK_CMD_TIMEOUT * plt_tsc_hz();\n+\tqp->nb_desc = nb_desc;\n+\tqp->stats.enqueued_count = 0;\n+\tqp->stats.dequeued_count = 0;\n+\tqp->stats.enqueue_err_count = 0;\n+\tqp->stats.dequeue_err_count = 0;\n+\n+\tcn10k_ml_qp_initialize(cnxk_mldev, qp);\n+\n+\treturn qp;\n+\n+qp_free:\n+\trte_free(qp);\n+\n+\treturn NULL;\n+}\n+\n+static int\n cnxk_ml_dev_info_get(struct rte_ml_dev *dev, struct rte_ml_dev_info *dev_info)\n {\n \tstruct cnxk_ml_dev *cnxk_mldev;\n@@ -93,7 +193,7 @@ cnxk_ml_dev_configure(struct rte_ml_dev *dev, const struct rte_ml_dev_config *co\n \t\tfor (qp_id = 0; qp_id < dev->data->nb_queue_pairs; qp_id++) {\n \t\t\tqp = dev->data->queue_pairs[qp_id];\n \t\t\tif (qp != NULL) {\n-\t\t\t\tret = cn10k_ml_dev_queue_pair_release(dev, qp_id);\n+\t\t\t\tret = cnxk_ml_dev_queue_pair_release(dev, qp_id);\n \t\t\t\tif (ret < 0)\n \t\t\t\t\treturn ret;\n \t\t\t}\n@@ -283,6 +383,51 @@ cnxk_ml_dev_stop(struct rte_ml_dev *dev)\n \treturn 0;\n }\n \n+static int\n+cnxk_ml_dev_queue_pair_setup(struct rte_ml_dev *dev, 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_info dev_info;\n+\tstruct cnxk_ml_qp *qp;\n+\tuint32_t nb_desc;\n+\n+\tif (queue_pair_id >= dev->data->nb_queue_pairs) {\n+\t\tplt_err(\"Queue-pair id = %u (>= max queue pairs supported, %u)\\n\", queue_pair_id,\n+\t\t\tdev->data->nb_queue_pairs);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (dev->data->queue_pairs[queue_pair_id] != NULL)\n+\t\tcnxk_ml_dev_queue_pair_release(dev, queue_pair_id);\n+\n+\tcnxk_ml_dev_info_get(dev, &dev_info);\n+\tif (qp_conf->nb_desc == 0) {\n+\t\tplt_err(\"Could not setup queue pair for %u descriptors\", qp_conf->nb_desc);\n+\t\treturn -EINVAL;\n+\t} else if (qp_conf->nb_desc > dev_info.max_desc) {\n+\t\tplt_err(\"Could not setup queue pair for %u descriptors (> %u)\", qp_conf->nb_desc,\n+\t\t\tdev_info.max_desc);\n+\t\treturn -EINVAL;\n+\t}\n+\tplt_ml_dbg(\"Creating queue-pair, queue_pair_id = %u, nb_desc = %u\", queue_pair_id,\n+\t\t   qp_conf->nb_desc);\n+\n+\t/* As the number of usable descriptors is 1 less than the queue size being created, we\n+\t * increment the size of queue by 1 than the requested size, except when the requested size\n+\t * is equal to the maximum possible size.\n+\t */\n+\tnb_desc =\n+\t\t(qp_conf->nb_desc == dev_info.max_desc) ? dev_info.max_desc : qp_conf->nb_desc + 1;\n+\tqp = cnxk_ml_qp_create(dev, queue_pair_id, nb_desc, socket_id);\n+\tif (qp == NULL) {\n+\t\tplt_err(\"Could not create queue pair %u\", queue_pair_id);\n+\t\treturn -ENOMEM;\n+\t}\n+\tdev->data->queue_pairs[queue_pair_id] = qp;\n+\n+\treturn 0;\n+}\n+\n struct rte_ml_dev_ops cnxk_ml_ops = {\n \t/* Device control ops */\n \t.dev_info_get = cnxk_ml_dev_info_get,\n@@ -294,8 +439,8 @@ struct rte_ml_dev_ops cnxk_ml_ops = {\n \t.dev_selftest = cn10k_ml_dev_selftest,\n \n \t/* Queue-pair handling ops */\n-\t.dev_queue_pair_setup = cn10k_ml_dev_queue_pair_setup,\n-\t.dev_queue_pair_release = cn10k_ml_dev_queue_pair_release,\n+\t.dev_queue_pair_setup = cnxk_ml_dev_queue_pair_setup,\n+\t.dev_queue_pair_release = cnxk_ml_dev_queue_pair_release,\n \n \t/* Stats ops */\n \t.dev_stats_get = cn10k_ml_dev_stats_get,\ndiff --git a/drivers/ml/cnxk/cnxk_ml_ops.h b/drivers/ml/cnxk/cnxk_ml_ops.h\nindex 2996928d7d..a925c07580 100644\n--- a/drivers/ml/cnxk/cnxk_ml_ops.h\n+++ b/drivers/ml/cnxk/cnxk_ml_ops.h\n@@ -62,7 +62,4 @@ struct cnxk_ml_qp {\n \n extern struct rte_ml_dev_ops cnxk_ml_ops;\n \n-/* Temporarily set cnxk driver functions as non-static */\n-int cnxk_ml_dev_info_get(struct rte_ml_dev *dev, struct rte_ml_dev_info *dev_info);\n-\n #endif /* _CNXK_ML_OPS_H_ */\n",
    "prefixes": [
        "v3",
        "08/35"
    ]
}