get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 105117,
    "url": "http://patches.dpdk.org/api/patches/105117/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211213205633.5724-1-pbhagavatula@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": "<20211213205633.5724-1-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211213205633.5724-1-pbhagavatula@marvell.com",
    "date": "2021-12-13T20:56:33",
    "name": "common/cnxk: use XAQ create API for inline device",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ff68ce489b7786e854547da61f3bba1644970fff",
    "submitter": {
        "id": 1183,
        "url": "http://patches.dpdk.org/api/people/1183/?format=api",
        "name": "Pavan Nikhilesh Bhagavatula",
        "email": "pbhagavatula@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/20211213205633.5724-1-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 20935,
            "url": "http://patches.dpdk.org/api/series/20935/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=20935",
            "date": "2021-12-13T20:56:33",
            "name": "common/cnxk: use XAQ create API for inline device",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/20935/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/105117/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/105117/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 C9F49A00C3;\n\tMon, 13 Dec 2021 21:56:44 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9059A406A2;\n\tMon, 13 Dec 2021 21:56:44 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 2DD9240042\n for <dev@dpdk.org>; Mon, 13 Dec 2021 21:56:42 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id\n 1BDElJaH030051\n for <dev@dpdk.org>; Mon, 13 Dec 2021 12:56:41 -0800",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3cx88ahk4r-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Mon, 13 Dec 2021 12:56:41 -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, 13 Dec 2021 12:56:39 -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, 13 Dec 2021 12:56:39 -0800",
            "from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.177.176])\n by maili.marvell.com (Postfix) with ESMTP id 900F43F7078;\n Mon, 13 Dec 2021 12:56:37 -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 : mime-version : content-transfer-encoding :\n content-type; s=pfpt0220; bh=NPsLO+vE97WBEIMdMU6389p0bD9DXs7F90Og6gMLrUg=;\n b=ZifAXobfxMVpdKtT7lWPK9//p/tq9EYPojAIBJRvCvtYlKUbgZ4nPYoIGsPQaxHq7M0c\n x9YcyA4bELHlTIpZ7LPxryV74Hk1T3PSLyEf0ziIYn7oviOxyzRSvpQk0xsRNQmVW5qw\n YZU7Yfr3qlQMVyi4jD6VjFjz38INZvBCY+ye/lwE6mFXUh3NBozONrR7LpPEbrPnD3b/\n fSl/PHkp11Sqmosl8pTXy3r5QUHPL9l1Y/PDE6Rh72vb9aqYcxyC+RikfaeZjXcVeGz+\n z3e0bp1xtyFkzwEChCwvWCNL7iAk0uKvfR0u3pXyKK8EA8Eu80DTJG6y0TvX9fcio2jk ug==",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>, \"Kiran\n Kumar K\" <kirankumark@marvell.com>, Sunil Kumar Kori <skori@marvell.com>,\n Satha Rao <skoteshwar@marvell.com>",
        "CC": "<dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "Subject": "[PATCH] common/cnxk: use XAQ create API for inline device",
        "Date": "Tue, 14 Dec 2021 02:26:33 +0530",
        "Message-ID": "<20211213205633.5724-1-pbhagavatula@marvell.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "FJoHasMdRiM7odUUHYnkKNu1jSkPRL_q",
        "X-Proofpoint-ORIG-GUID": "FJoHasMdRiM7odUUHYnkKNu1jSkPRL_q",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513\n definitions=2021-12-13_10,2021-12-13_01,2021-12-02_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: Pavan Nikhilesh <pbhagavatula@marvell.com>\n\nUse the XAQ aura create and free API while initializing the\ninline device.\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n drivers/common/cnxk/roc_nix_debug.c    |  4 +-\n drivers/common/cnxk/roc_nix_inl_dev.c  | 53 ++++++--------------------\n drivers/common/cnxk/roc_nix_inl_priv.h |  3 +-\n 3 files changed, 15 insertions(+), 45 deletions(-)",
    "diff": "diff --git a/drivers/common/cnxk/roc_nix_debug.c b/drivers/common/cnxk/roc_nix_debug.c\nindex 266935a6c5..5886650d6e 100644\n--- a/drivers/common/cnxk/roc_nix_debug.c\n+++ b/drivers/common/cnxk/roc_nix_debug.c\n@@ -1257,8 +1257,8 @@ roc_nix_inl_dev_dump(struct roc_nix_inl_dev *roc_inl_dev)\n \tnix_dump(\"  \\txaq_buf_size = %u\", inl_dev->xaq_buf_size);\n \tnix_dump(\"  \\txae_waes = %u\", inl_dev->xae_waes);\n \tnix_dump(\"  \\tiue = %u\", inl_dev->iue);\n-\tnix_dump(\"  \\txaq_aura = 0x%\" PRIx64, inl_dev->xaq_aura);\n-\tnix_dump(\"  \\txaq_mem = 0x%p\", inl_dev->xaq_mem);\n+\tnix_dump(\"  \\txaq_aura = 0x%\" PRIx64, inl_dev->xaq.aura_handle);\n+\tnix_dump(\"  \\txaq_mem = 0x%p\", inl_dev->xaq.mem);\n \n \tnix_dump(\"  \\tinl_dev_rq:\");\n \troc_nix_rq_dump(&inl_dev->rq);\ndiff --git a/drivers/common/cnxk/roc_nix_inl_dev.c b/drivers/common/cnxk/roc_nix_inl_dev.c\nindex 10912a6c93..dd93765a2b 100644\n--- a/drivers/common/cnxk/roc_nix_inl_dev.c\n+++ b/drivers/common/cnxk/roc_nix_inl_dev.c\n@@ -5,8 +5,6 @@\n #include \"roc_api.h\"\n #include \"roc_priv.h\"\n \n-#define XAQ_CACHE_CNT 0x7\n-\n /* Default Rx Config for Inline NIX LF */\n #define NIX_INL_LF_RX_CFG                                                      \\\n \t(ROC_NIX_LF_RX_CFG_DROP_RE | ROC_NIX_LF_RX_CFG_L2_LEN_ERR |            \\\n@@ -220,10 +218,8 @@ nix_inl_sso_setup(struct nix_inl_dev *inl_dev)\n {\n \tstruct sso_lf_alloc_rsp *sso_rsp;\n \tstruct dev *dev = &inl_dev->dev;\n-\tuint32_t xaq_cnt, count, aura;\n \tuint16_t hwgrp[1] = {0};\n-\tstruct npa_pool_s pool;\n-\tuintptr_t iova;\n+\tuint32_t xae_cnt;\n \tint rc;\n \n \t/* Alloc SSOW LF */\n@@ -244,41 +240,17 @@ nix_inl_sso_setup(struct nix_inl_dev *inl_dev)\n \tinl_dev->xae_waes = sso_rsp->xaq_wq_entries;\n \tinl_dev->iue = sso_rsp->in_unit_entries;\n \n-\t/* Create XAQ pool */\n-\txaq_cnt = XAQ_CACHE_CNT;\n-\txaq_cnt += inl_dev->iue / inl_dev->xae_waes;\n-\tplt_sso_dbg(\"Configuring %d xaq buffers\", xaq_cnt);\n-\n-\tinl_dev->xaq_mem = plt_zmalloc(inl_dev->xaq_buf_size * xaq_cnt,\n-\t\t\t\t       inl_dev->xaq_buf_size);\n-\tif (!inl_dev->xaq_mem) {\n-\t\trc = NIX_ERR_NO_MEM;\n-\t\tplt_err(\"Failed to alloc xaq buf mem\");\n-\t\tgoto free_sso;\n-\t}\n-\n-\tmemset(&pool, 0, sizeof(struct npa_pool_s));\n-\tpool.nat_align = 1;\n-\trc = roc_npa_pool_create(&inl_dev->xaq_aura, inl_dev->xaq_buf_size,\n-\t\t\t\t xaq_cnt, NULL, &pool);\n+\txae_cnt = inl_dev->iue;\n+\trc = sso_hwgrp_init_xaq_aura(dev, &inl_dev->xaq, xae_cnt,\n+\t\t\t\t     inl_dev->xae_waes, inl_dev->xaq_buf_size,\n+\t\t\t\t     1);\n \tif (rc) {\n-\t\tplt_err(\"Failed to alloc aura for XAQ, rc=%d\", rc);\n-\t\tgoto free_mem;\n-\t}\n-\n-\t/* Fill the XAQ buffers */\n-\tiova = (uint64_t)inl_dev->xaq_mem;\n-\tfor (count = 0; count < xaq_cnt; count++) {\n-\t\troc_npa_aura_op_free(inl_dev->xaq_aura, 0, iova);\n-\t\tiova += inl_dev->xaq_buf_size;\n+\t\tplt_err(\"Failed to alloc SSO XAQ aura, rc=%d\", rc);\n+\t\tgoto free_sso;\n \t}\n-\troc_npa_aura_op_range_set(inl_dev->xaq_aura, (uint64_t)inl_dev->xaq_mem,\n-\t\t\t\t  iova);\n-\n-\taura = roc_npa_aura_handle_to_aura(inl_dev->xaq_aura);\n \n \t/* Setup xaq for hwgrps */\n-\trc = sso_hwgrp_alloc_xaq(dev, aura, 1);\n+\trc = sso_hwgrp_alloc_xaq(dev, inl_dev->xaq.aura_handle, 1);\n \tif (rc) {\n \t\tplt_err(\"Failed to setup hwgrp xaq aura, rc=%d\", rc);\n \t\tgoto destroy_pool;\n@@ -302,11 +274,7 @@ nix_inl_sso_setup(struct nix_inl_dev *inl_dev)\n release_xaq:\n \tsso_hwgrp_release_xaq(&inl_dev->dev, 1);\n destroy_pool:\n-\troc_npa_pool_destroy(inl_dev->xaq_aura);\n-\tinl_dev->xaq_aura = 0;\n-free_mem:\n-\tplt_free(inl_dev->xaq_mem);\n-\tinl_dev->xaq_mem = NULL;\n+\tsso_hwgrp_free_xaq_aura(dev, &inl_dev->xaq, 0);\n free_sso:\n \tsso_lf_free(dev, SSO_LF_TYPE_HWGRP, 1);\n free_ssow:\n@@ -335,6 +303,9 @@ nix_inl_sso_release(struct nix_inl_dev *inl_dev)\n \tsso_lf_free(&inl_dev->dev, SSO_LF_TYPE_HWS, 1);\n \tsso_lf_free(&inl_dev->dev, SSO_LF_TYPE_HWGRP, 1);\n \n+\t/* Free the XAQ aura */\n+\tsso_hwgrp_free_xaq_aura(&inl_dev->dev, &inl_dev->xaq, 0);\n+\n \treturn 0;\n }\n \ndiff --git a/drivers/common/cnxk/roc_nix_inl_priv.h b/drivers/common/cnxk/roc_nix_inl_priv.h\nindex be53a3fa81..2cdab6dc7a 100644\n--- a/drivers/common/cnxk/roc_nix_inl_priv.h\n+++ b/drivers/common/cnxk/roc_nix_inl_priv.h\n@@ -27,8 +27,7 @@ struct nix_inl_dev {\n \tuint32_t xaq_buf_size;\n \tuint32_t xae_waes;\n \tuint32_t iue;\n-\tuint64_t xaq_aura;\n-\tvoid *xaq_mem;\n+\tstruct roc_sso_xaq_data xaq;\n \troc_nix_inl_sso_work_cb_t work_cb;\n \tvoid *cb_args;\n \n",
    "prefixes": []
}