get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 94819,
    "url": "https://patches.dpdk.org/api/patches/94819/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1624599410-29689-14-git-send-email-anoobj@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": "<1624599410-29689-14-git-send-email-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1624599410-29689-14-git-send-email-anoobj@marvell.com",
    "date": "2021-06-25T05:36:45",
    "name": "[v2,13/17] common/cnxk: add lmtline init",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a5e05cac03c4d5de760418dfd753616f06a17a16",
    "submitter": {
        "id": 1205,
        "url": "https://patches.dpdk.org/api/people/1205/?format=api",
        "name": "Anoob Joseph",
        "email": "anoobj@marvell.com"
    },
    "delegate": {
        "id": 6690,
        "url": "https://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1624599410-29689-14-git-send-email-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 17482,
            "url": "https://patches.dpdk.org/api/series/17482/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17482",
            "date": "2021-06-25T05:36:32",
            "name": "Add CPT in Marvell CNXK common driver",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/17482/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/94819/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/94819/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 87D34A0C40;\n\tFri, 25 Jun 2021 07:38:39 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B9B0C410FC;\n\tFri, 25 Jun 2021 07:38:18 +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 83CB2410D7\n for <dev@dpdk.org>; Fri, 25 Jun 2021 07:38:17 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id\n 15P5ab9h018611; Thu, 24 Jun 2021 22:38:16 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com with ESMTP id 39d24dhh6b-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 24 Jun 2021 22:38:16 -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.18;\n Thu, 24 Jun 2021 22:38:15 -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.18 via Frontend\n Transport; Thu, 24 Jun 2021 22:38:14 -0700",
            "from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218])\n by maili.marvell.com (Postfix) with ESMTP id D36453F7068;\n Thu, 24 Jun 2021 22:38:11 -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=upfKLzL/gh7Yv4wfTTAdQJjEzOkMFWkuRxVGAE18my4=;\n b=lEIxpCiKPciLuwIvafgL88mpgzXNf6X+uOQ5FGH9J5vmTss10GFN6hJQeL0Uum/ML5jI\n 7QzEI/Po8BYd6Tc50B7eSwBU85O1MzezNeGonJmee5T2PPdQKT2xY+Lr1rMTYAyUf9B2\n eAnRCOOo2nGPBsjBqQMNB1AXpzQXZyCgzvvr8jt1KaIu6YHW6KI84elSge8XaS4VIOB/\n OSu1Ejl0Q8i3h/sdeRX7TB9m3Jrpfb5lXBKyQ20Lj9FAqQgoe/H/DGE311pAXAAiJJ0U\n 5456j78pD7c5CiP+CcyGNCV3vD5m3bmDKBoQafqfdS9bcD8N0T2X7MhW09P7FqoqqvWy mQ==",
        "From": "Anoob Joseph <anoobj@marvell.com>",
        "To": "Akhil Goyal <gakhil@marvell.com>, Thomas Monjalon <thomas@monjalon.net>",
        "CC": "Anoob Joseph <anoobj@marvell.com>, Jerin Jacob <jerinj@marvell.com>,\n \"Ankur Dwivedi\" <adwivedi@marvell.com>, Tejasree Kondoj\n <ktejasree@marvell.com>, <dev@dpdk.org>",
        "Date": "Fri, 25 Jun 2021 11:06:45 +0530",
        "Message-ID": "<1624599410-29689-14-git-send-email-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1624599410-29689-1-git-send-email-anoobj@marvell.com>",
        "References": "\n <patches.dpdk.org/project/dpdk/patch/1622649385-22652-1-git-send-email-anoobj@marvell.com/>\n <1624599410-29689-1-git-send-email-anoobj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "pBINZaI99R4eAaVVUJAWGlZUZWFty6NP",
        "X-Proofpoint-ORIG-GUID": "pBINZaI99R4eAaVVUJAWGlZUZWFty6NP",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790\n definitions=2021-06-25_01:2021-06-24,\n 2021-06-25 signatures=0",
        "Subject": "[dpdk-dev] [PATCH v2 13/17] common/cnxk: add lmtline init",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add routine to initialize LMTLINE which facilitates instruction\nsubmission to CPT. Add common macros required in the enqueue\noperations.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Ankur Dwivedi <adwivedi@marvell.com>\n\n---\n drivers/common/cnxk/roc_cpt.c   | 20 ++++++++++++++++++++\n drivers/common/cnxk/roc_cpt.h   | 32 ++++++++++++++++++++++++++++++++\n drivers/common/cnxk/version.map |  1 +\n 3 files changed, 53 insertions(+)",
    "diff": "diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c\nindex 81e8b15..788b28a 100644\n--- a/drivers/common/cnxk/roc_cpt.c\n+++ b/drivers/common/cnxk/roc_cpt.c\n@@ -806,3 +806,23 @@ roc_cpt_iq_disable(struct roc_cpt_lf *lf)\n \tlf_inprog.s.eena = 0x0;\n \tplt_write64(lf_inprog.u, lf->rbase + CPT_LF_INPROG);\n }\n+\n+int\n+roc_cpt_lmtline_init(struct roc_cpt *roc_cpt, struct roc_cpt_lmtline *lmtline,\n+\t\t     int lf_id)\n+{\n+\tstruct roc_cpt_lf *lf;\n+\n+\tlf = roc_cpt->lf[lf_id];\n+\tif (lf == NULL)\n+\t\treturn -ENOTSUP;\n+\n+\tlmtline->io_addr = lf->io_addr;\n+\tif (roc_model_is_cn10k())\n+\t\tlmtline->io_addr |= ROC_CN10K_CPT_INST_DW_M1 << 4;\n+\n+\tlmtline->fc_addr = lf->fc_addr;\n+\tlmtline->lmt_base = lf->lmt_base;\n+\n+\treturn 0;\n+}\ndiff --git a/drivers/common/cnxk/roc_cpt.h b/drivers/common/cnxk/roc_cpt.h\nindex 5577fea..8dd2b5e 100644\n--- a/drivers/common/cnxk/roc_cpt.h\n+++ b/drivers/common/cnxk/roc_cpt.h\n@@ -16,6 +16,30 @@\n #define ROC_CPT_DFLT_ENG_GRP_AE\t   2UL\n \n #define ROC_CPT_MAX_LFS 64\n+#define ROC_CN10K_CPT_INST_DW_M1                                               \\\n+\t((uint64_t)(((sizeof(struct cpt_inst_s) / 16) - 1) & 0x7))\n+#define ROC_CN10K_TWO_CPT_INST_DW_M1                                           \\\n+\t((uint64_t)(((sizeof(struct cpt_inst_s) * 2 / 16) - 1) & 0x7))\n+\n+/* Vector of sizes in the burst of 16 CPT inst except first in 63:19 of\n+ * APT_LMT_ARG_S\n+ */\n+#define ROC_CN10K_CPT_LMT_ARG                                                  \\\n+\t(ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 0) |                            \\\n+\t ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 1) |                            \\\n+\t ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 2) |                            \\\n+\t ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 3) |                            \\\n+\t ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 4) |                            \\\n+\t ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 5) |                            \\\n+\t ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 6) |                            \\\n+\t ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 7) |                            \\\n+\t ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 8) |                            \\\n+\t ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 9) |                            \\\n+\t ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 10) |                           \\\n+\t ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 11) |                           \\\n+\t ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 12) |                           \\\n+\t ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 13) |                           \\\n+\t ROC_CN10K_CPT_INST_DW_M1 << (19 + 3 * 14))\n \n /* CPT helper macros */\n #define ROC_CPT_AH_HDR_LEN\t 12\n@@ -51,6 +75,12 @@\n #define ROC_CPT_TUNNEL_IPV4_HDR_LEN 20\n #define ROC_CPT_TUNNEL_IPV6_HDR_LEN 40\n \n+struct roc_cpt_lmtline {\n+\tuint64_t io_addr;\n+\tuint64_t *fc_addr;\n+\tuintptr_t lmt_base;\n+};\n+\n struct roc_cpt_lf {\n \t/* Input parameters */\n \tuint16_t lf_id;\n@@ -109,5 +139,7 @@ int __roc_api roc_cpt_inline_ipsec_inb_cfg(struct roc_cpt *roc_cpt,\n int __roc_api roc_cpt_afs_print(struct roc_cpt *roc_cpt);\n int __roc_api roc_cpt_lfs_print(struct roc_cpt *roc_cpt);\n void __roc_api roc_cpt_iq_disable(struct roc_cpt_lf *lf);\n+int __roc_api roc_cpt_lmtline_init(struct roc_cpt *roc_cpt,\n+\t\t\t\t   struct roc_cpt_lmtline *lmtline, int lf_id);\n \n #endif /* _ROC_CPT_H_ */\ndiff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map\nindex 59d7d91..e079bc7 100644\n--- a/drivers/common/cnxk/version.map\n+++ b/drivers/common/cnxk/version.map\n@@ -24,6 +24,7 @@ INTERNAL {\n \troc_cpt_lf_init;\n \troc_cpt_lf_fini;\n \troc_cpt_lfs_print;\n+\troc_cpt_lmtline_init;\n \troc_cpt_rxc_time_cfg;\n \troc_error_msg_get;\n \troc_idev_cpt_get;\n",
    "prefixes": [
        "v2",
        "13/17"
    ]
}