get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 127311,
    "url": "https://patches.dpdk.org/api/patches/127311/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230524100407.3796139-25-ndabilpuram@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": "<20230524100407.3796139-25-ndabilpuram@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230524100407.3796139-25-ndabilpuram@marvell.com",
    "date": "2023-05-24T10:04:00",
    "name": "[v2,25/32] common/cnxk: avoid inline dev CPT lf detach multiple times",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "1e4565020b19627425536a4f04e7095c6ec94607",
    "submitter": {
        "id": 1202,
        "url": "https://patches.dpdk.org/api/people/1202/?format=api",
        "name": "Nithin Dabilpuram",
        "email": "ndabilpuram@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "https://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230524100407.3796139-25-ndabilpuram@marvell.com/mbox/",
    "series": [
        {
            "id": 28150,
            "url": "https://patches.dpdk.org/api/series/28150/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=28150",
            "date": "2023-05-24T10:03:38",
            "name": "[v2,01/32] common/cnxk: allocate dynamic BPIDs",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/28150/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/127311/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/127311/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 7D6BB42B8C;\n\tWed, 24 May 2023 12:07:29 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C889842FBA;\n\tWed, 24 May 2023 12:05:31 +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 D7B7542FBA\n for <dev@dpdk.org>; Wed, 24 May 2023 12:05:30 +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 34O4qPOO025150 for <dev@dpdk.org>; Wed, 24 May 2023 03:05:30 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3qsbxes2wk-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Wed, 24 May 2023 03:05:29 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Wed, 24 May 2023 03:05:28 -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, 24 May 2023 03:05:28 -0700",
            "from hyd1588t430.caveonetworks.com (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id 31BE73F7043;\n Wed, 24 May 2023 03:05:25 -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=FPvW2ZCf8hMabLK14AvQKjf76l7c1JJ/ZzmnBFoHcu4=;\n b=HJEpMP80P2VTOCCMg2iK33QJN8uWpXxYHd8/eorPCtLKQlj0+UlLGIAKsoGCjXXSPmXH\n J2WXw7gtRtI10K5F9n9i8c4seE8afSP4oO396sb26J4p34T597iE8zj+4YvlS7FSNAFN\n xhk52z2qxJLZLRWCwlrKzqJerbC75nhFPN4cxu7jZenEVsgcTggvDmrCNrzB1dl7uqNp\n mW2QPTUCXY6dd61rHtOFGnyBfmnokxBf02Og5kH0ZQBuAFWul/aZgkgf8v/bTWsZ6XOe\n M09zZZ8vWhajkOXeR6HakZ6eQ/o3ewk7GISbQ7u85/6t1lOYsa71WW2w7R3p/BfsDeeb dg==",
        "From": "Nithin Dabilpuram <ndabilpuram@marvell.com>",
        "To": "Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>, Kiran Kumar K\n <kirankumark@marvell.com>, Sunil Kumar Kori <skori@marvell.com>, Satha Rao\n <skoteshwar@marvell.com>",
        "CC": "<jerinj@marvell.com>, <dev@dpdk.org>",
        "Subject": "[PATCH v2 25/32] common/cnxk: avoid inline dev CPT lf detach multiple\n times",
        "Date": "Wed, 24 May 2023 15:34:00 +0530",
        "Message-ID": "<20230524100407.3796139-25-ndabilpuram@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230524100407.3796139-1-ndabilpuram@marvell.com>",
        "References": "<20230411091144.1087887-1-ndabilpuram@marvell.com>\n <20230524100407.3796139-1-ndabilpuram@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "B2lAOy8tIlum8Htcsk77OM7hKqXm3kRU",
        "X-Proofpoint-GUID": "B2lAOy8tIlum8Htcsk77OM7hKqXm3kRU",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26\n definitions=2023-05-24_05,2023-05-23_02,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": "CPT LF detach is done along with all other LF's of inline\ndevice. Hence remove it from nix_inl_cpt_release().\nAlso provide ROC API for setup and release of CPT LF\nseparately.\n\nSigned-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>\n---\n drivers/common/cnxk/roc_nix_inl.h     |  2 +\n drivers/common/cnxk/roc_nix_inl_dev.c | 59 ++++++++++++++++++++-------\n drivers/common/cnxk/version.map       |  2 +\n 3 files changed, 48 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/drivers/common/cnxk/roc_nix_inl.h b/drivers/common/cnxk/roc_nix_inl.h\nindex 885d95335e..ab1e9c0f98 100644\n--- a/drivers/common/cnxk/roc_nix_inl.h\n+++ b/drivers/common/cnxk/roc_nix_inl.h\n@@ -158,6 +158,8 @@ void __roc_api roc_nix_inl_dev_unlock(void);\n int __roc_api roc_nix_inl_dev_xaq_realloc(uint64_t aura_handle);\n int __roc_api roc_nix_inl_dev_stats_get(struct roc_nix_stats *stats);\n uint16_t __roc_api roc_nix_inl_dev_pffunc_get(void);\n+int __roc_api roc_nix_inl_dev_cpt_setup(bool use_inl_dev_sso);\n+int __roc_api roc_nix_inl_dev_cpt_release(void);\n \n /* NIX Inline Inbound API */\n int __roc_api roc_nix_inl_inb_init(struct roc_nix *roc_nix);\ndiff --git a/drivers/common/cnxk/roc_nix_inl_dev.c b/drivers/common/cnxk/roc_nix_inl_dev.c\nindex ca948d3bc7..d76158e30d 100644\n--- a/drivers/common/cnxk/roc_nix_inl_dev.c\n+++ b/drivers/common/cnxk/roc_nix_inl_dev.c\n@@ -172,7 +172,7 @@ nix_inl_nix_ipsec_cfg(struct nix_inl_dev *inl_dev, bool ena)\n }\n \n static int\n-nix_inl_cpt_setup(struct nix_inl_dev *inl_dev)\n+nix_inl_cpt_setup(struct nix_inl_dev *inl_dev, bool inl_dev_sso)\n {\n \tstruct roc_cpt_lf *lf = &inl_dev->cpt_lf;\n \tstruct dev *dev = &inl_dev->dev;\n@@ -186,7 +186,7 @@ nix_inl_cpt_setup(struct nix_inl_dev *inl_dev)\n \teng_grpmask = (1ULL << ROC_CPT_DFLT_ENG_GRP_SE |\n \t\t       1ULL << ROC_CPT_DFLT_ENG_GRP_SE_IE |\n \t\t       1ULL << ROC_CPT_DFLT_ENG_GRP_AE);\n-\trc = cpt_lfs_alloc(dev, eng_grpmask, RVU_BLOCK_ADDR_CPT0, false);\n+\trc = cpt_lfs_alloc(dev, eng_grpmask, RVU_BLOCK_ADDR_CPT0, inl_dev_sso);\n \tif (rc) {\n \t\tplt_err(\"Failed to alloc CPT LF resources, rc=%d\", rc);\n \t\treturn rc;\n@@ -218,7 +218,7 @@ nix_inl_cpt_release(struct nix_inl_dev *inl_dev)\n {\n \tstruct roc_cpt_lf *lf = &inl_dev->cpt_lf;\n \tstruct dev *dev = &inl_dev->dev;\n-\tint rc, ret = 0;\n+\tint rc;\n \n \tif (!inl_dev->attach_cptlf)\n \t\treturn 0;\n@@ -228,17 +228,11 @@ nix_inl_cpt_release(struct nix_inl_dev *inl_dev)\n \n \t/* Free LF resources */\n \trc = cpt_lfs_free(dev);\n-\tif (rc)\n+\tif (!rc)\n+\t\tlf->dev = NULL;\n+\telse\n \t\tplt_err(\"Failed to free CPT LF resources, rc=%d\", rc);\n-\tret |= rc;\n-\n-\t/* Detach LF */\n-\trc = cpt_lfs_detach(dev);\n-\tif (rc)\n-\t\tplt_err(\"Failed to detach CPT LF, rc=%d\", rc);\n-\tret |= rc;\n-\n-\treturn ret;\n+\treturn rc;\n }\n \n static int\n@@ -940,7 +934,7 @@ roc_nix_inl_dev_init(struct roc_nix_inl_dev *roc_inl_dev)\n \t\tgoto nix_release;\n \n \t/* Setup CPT LF */\n-\trc = nix_inl_cpt_setup(inl_dev);\n+\trc = nix_inl_cpt_setup(inl_dev, false);\n \tif (rc)\n \t\tgoto sso_release;\n \n@@ -1035,8 +1029,11 @@ roc_nix_inl_dev_fini(struct roc_nix_inl_dev *roc_inl_dev)\n \t/* Flush Inbound CTX cache entries */\n \tnix_inl_cpt_ctx_cache_sync(inl_dev);\n \n+\t/* Release CPT */\n+\trc = nix_inl_cpt_release(inl_dev);\n+\n \t/* Release SSO */\n-\trc = nix_inl_sso_release(inl_dev);\n+\trc |= nix_inl_sso_release(inl_dev);\n \n \t/* Release NIX */\n \trc |= nix_inl_nix_release(inl_dev);\n@@ -1052,3 +1049,35 @@ roc_nix_inl_dev_fini(struct roc_nix_inl_dev *roc_inl_dev)\n \tidev->nix_inl_dev = NULL;\n \treturn 0;\n }\n+\n+int\n+roc_nix_inl_dev_cpt_setup(bool use_inl_dev_sso)\n+{\n+\tstruct idev_cfg *idev = idev_get_cfg();\n+\tstruct nix_inl_dev *inl_dev = NULL;\n+\n+\tif (!idev || !idev->nix_inl_dev)\n+\t\treturn -ENOENT;\n+\tinl_dev = idev->nix_inl_dev;\n+\n+\tif (inl_dev->cpt_lf.dev != NULL)\n+\t\treturn -EBUSY;\n+\n+\treturn nix_inl_cpt_setup(inl_dev, use_inl_dev_sso);\n+}\n+\n+int\n+roc_nix_inl_dev_cpt_release(void)\n+{\n+\tstruct idev_cfg *idev = idev_get_cfg();\n+\tstruct nix_inl_dev *inl_dev = NULL;\n+\n+\tif (!idev || !idev->nix_inl_dev)\n+\t\treturn -ENOENT;\n+\tinl_dev = idev->nix_inl_dev;\n+\n+\tif (inl_dev->cpt_lf.dev == NULL)\n+\t\treturn 0;\n+\n+\treturn nix_inl_cpt_release(inl_dev);\n+}\ndiff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map\nindex c76564b46e..e1335e9068 100644\n--- a/drivers/common/cnxk/version.map\n+++ b/drivers/common/cnxk/version.map\n@@ -174,6 +174,8 @@ INTERNAL {\n \troc_nix_inl_cb_register;\n \troc_nix_inl_cb_unregister;\n \troc_nix_inl_ctx_write;\n+\troc_nix_inl_dev_cpt_setup;\n+\troc_nix_inl_dev_cpt_release;\n \troc_nix_inl_dev_dump;\n \troc_nix_inl_dev_fini;\n \troc_nix_inl_dev_init;\n",
    "prefixes": [
        "v2",
        "25/32"
    ]
}