get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 94748,
    "url": "https://patches.dpdk.org/api/patches/94748/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210623044702.4240-53-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": "<20210623044702.4240-53-ndabilpuram@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210623044702.4240-53-ndabilpuram@marvell.com",
    "date": "2021-06-23T04:46:52",
    "name": "[v4,52/62] net/cnxk: add get register operation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "797ca1217872b894d9decfb28ae61bcc54d7721d",
    "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/20210623044702.4240-53-ndabilpuram@marvell.com/mbox/",
    "series": [
        {
            "id": 17449,
            "url": "https://patches.dpdk.org/api/series/17449/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17449",
            "date": "2021-06-23T04:46:00",
            "name": "Marvell CNXK Ethdev Driver",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/17449/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/94748/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/94748/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 77097A0C41;\n\tWed, 23 Jun 2021 06:53:01 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 88B2C411D8;\n\tWed, 23 Jun 2021 06:50:14 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 31756411D8\n for <dev@dpdk.org>; Wed, 23 Jun 2021 06:50:12 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id\n 15N4krfx026329 for <dev@dpdk.org>; Tue, 22 Jun 2021 21:50:11 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com with ESMTP id 39bptj1gvb-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Tue, 22 Jun 2021 21:50:11 -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.18;\n Tue, 22 Jun 2021 21:50:09 -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; Tue, 22 Jun 2021 21:50:09 -0700",
            "from hyd1588t430.marvell.com (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id 98F825B6986;\n Tue, 22 Jun 2021 21:50:03 -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-type; s=pfpt0220; bh=2za7x8NVe12Q0zaBlIM7ygeeEk054RB2M4wo8GKnC9k=;\n b=JIev56RsmTOIFoOXKQXw106JyVtTtON14V2Ie6Eb8CMiHn2kHh2CKK5UQYceBqhlcZMA\n LbR7nhy5PdIRVi+LzwuOObTxZOcEqn67ukRINmZzsvOV7CM6K8/bBT/0hEicmMa9xgFS\n 0VIQWiYKOLjOel4/Gnt1R2B1M5pszRonhGdDYzvhSmeFZ/sPZtJj3RMG5PH9wwaXXuQU\n /kSn+n611u7I7kDDTLkv/V0yPci6eOQaAhuUeBxhJdFGx2pItgpTcMIDWiepR9CMrtsf\n 3Om2JpmQEYepjtEkZeZKOPHjmUv0UXEKF1UoS68HCus7wlZ/HtqrFepCFxHcbsj0eb1I nQ==",
        "From": "Nithin Dabilpuram <ndabilpuram@marvell.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<jerinj@marvell.com>, <skori@marvell.com>, <skoteshwar@marvell.com>,\n <pbhagavatula@marvell.com>, <kirankumark@marvell.com>,\n <psatheesh@marvell.com>, <asekhar@marvell.com>, <hkalra@marvell.com>",
        "Date": "Wed, 23 Jun 2021 10:16:52 +0530",
        "Message-ID": "<20210623044702.4240-53-ndabilpuram@marvell.com>",
        "X-Mailer": "git-send-email 2.8.4",
        "In-Reply-To": "<20210623044702.4240-1-ndabilpuram@marvell.com>",
        "References": "<20210306153404.10781-1-ndabilpuram@marvell.com>\n <20210623044702.4240-1-ndabilpuram@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "KGiI6KWHhfaoHmln8yGdHe0bun7P7ovp",
        "X-Proofpoint-GUID": "KGiI6KWHhfaoHmln8yGdHe0bun7P7ovp",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790\n definitions=2021-06-23_01:2021-06-22,\n 2021-06-23 signatures=0",
        "Subject": "[dpdk-dev] [PATCH v4 52/62] net/cnxk: add get register operation",
        "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": "From: Satha Rao <skoteshwar@marvell.com>\n\nWith this patch implemented api to dump platform registers for\ndebug purposes.\n\nSigned-off-by: Satha Rao <skoteshwar@marvell.com>\n---\n doc/guides/nics/cnxk.rst              |  1 +\n doc/guides/nics/features/cnxk.ini     |  1 +\n doc/guides/nics/features/cnxk_vec.ini |  1 +\n doc/guides/nics/features/cnxk_vf.ini  |  1 +\n drivers/net/cnxk/cnxk_ethdev.c        |  1 +\n drivers/net/cnxk/cnxk_ethdev.h        |  4 ++++\n drivers/net/cnxk/cnxk_ethdev_ops.c    | 25 +++++++++++++++++++++++++\n 7 files changed, 34 insertions(+)",
    "diff": "diff --git a/doc/guides/nics/cnxk.rst b/doc/guides/nics/cnxk.rst\nindex cc71b22..e561321 100644\n--- a/doc/guides/nics/cnxk.rst\n+++ b/doc/guides/nics/cnxk.rst\n@@ -32,6 +32,7 @@ Features of the CNXK Ethdev PMD are:\n - MTU update\n - Scatter-Gather IO support\n - Vector Poll mode driver\n+- Debug utilities - Context dump and error interrupt support\n - Support Rx interrupt\n \n Prerequisites\ndiff --git a/doc/guides/nics/features/cnxk.ini b/doc/guides/nics/features/cnxk.ini\nindex d43b1c4..246caf9 100644\n--- a/doc/guides/nics/features/cnxk.ini\n+++ b/doc/guides/nics/features/cnxk.ini\n@@ -37,6 +37,7 @@ Stats per queue      = Y\n Extended stats       = Y\n FW version           = Y\n Module EEPROM dump   = Y\n+Registers dump       = Y\n Linux                = Y\n ARMv8                = Y\n Usage doc            = Y\ndiff --git a/doc/guides/nics/features/cnxk_vec.ini b/doc/guides/nics/features/cnxk_vec.ini\nindex 8fb54d4..6c6aeb0 100644\n--- a/doc/guides/nics/features/cnxk_vec.ini\n+++ b/doc/guides/nics/features/cnxk_vec.ini\n@@ -35,6 +35,7 @@ Stats per queue      = Y\n Extended stats       = Y\n FW version           = Y\n Module EEPROM dump   = Y\n+Registers dump       = Y\n Linux                = Y\n ARMv8                = Y\n Usage doc            = Y\ndiff --git a/doc/guides/nics/features/cnxk_vf.ini b/doc/guides/nics/features/cnxk_vf.ini\nindex 2da2252..8ec326a 100644\n--- a/doc/guides/nics/features/cnxk_vf.ini\n+++ b/doc/guides/nics/features/cnxk_vf.ini\n@@ -32,6 +32,7 @@ Stats per queue      = Y\n Extended stats       = Y\n FW version           = Y\n Module EEPROM dump   = Y\n+Registers dump       = Y\n Linux                = Y\n ARMv8                = Y\n Usage doc            = Y\ndiff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c\nindex 26e4ddf..b76442d 100644\n--- a/drivers/net/cnxk/cnxk_ethdev.c\n+++ b/drivers/net/cnxk/cnxk_ethdev.c\n@@ -1227,6 +1227,7 @@ struct eth_dev_ops cnxk_eth_dev_ops = {\n \t.txq_info_get = cnxk_nix_txq_info_get,\n \t.tx_done_cleanup = cnxk_nix_tx_done_cleanup,\n \t.flow_ops_get = cnxk_nix_flow_ops_get,\n+\t.get_reg = cnxk_nix_dev_get_reg,\n };\n \n static int\ndiff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h\nindex a25be8a..d51a6d7 100644\n--- a/drivers/net/cnxk/cnxk_ethdev.h\n+++ b/drivers/net/cnxk/cnxk_ethdev.h\n@@ -328,6 +328,10 @@ void *cnxk_nix_fastpath_lookup_mem_get(void);\n int cnxk_ethdev_parse_devargs(struct rte_devargs *devargs,\n \t\t\t      struct cnxk_eth_dev *dev);\n \n+/* Debug */\n+int cnxk_nix_dev_get_reg(struct rte_eth_dev *eth_dev,\n+\t\t\t struct rte_dev_reg_info *regs);\n+\n /* Inlines */\n static __rte_always_inline uint64_t\n cnxk_pktmbuf_detach(struct rte_mbuf *m)\ndiff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c\nindex 228c624..c879b25 100644\n--- a/drivers/net/cnxk/cnxk_ethdev_ops.c\n+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c\n@@ -697,3 +697,28 @@ cnxk_nix_tx_done_cleanup(void *txq, uint32_t free_cnt)\n \n \treturn 0;\n }\n+\n+int\n+cnxk_nix_dev_get_reg(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)\n+{\n+\tstruct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);\n+\tstruct roc_nix *nix = &dev->nix;\n+\tuint64_t *data = regs->data;\n+\tint rc = -ENOTSUP;\n+\n+\tif (data == NULL) {\n+\t\trc = roc_nix_lf_get_reg_count(nix);\n+\t\tif (rc > 0) {\n+\t\t\tregs->length = rc;\n+\t\t\tregs->width = 8;\n+\t\t\trc = 0;\n+\t\t}\n+\t\treturn rc;\n+\t}\n+\n+\tif (!regs->length ||\n+\t    regs->length == (uint32_t)roc_nix_lf_get_reg_count(nix))\n+\t\treturn roc_nix_lf_reg_dump(nix, data);\n+\n+\treturn rc;\n+}\n",
    "prefixes": [
        "v4",
        "52/62"
    ]
}