get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 137828,
    "url": "http://patches.dpdk.org/api/patches/137828/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240303173833.100039-15-hkalra@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": "<20240303173833.100039-15-hkalra@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240303173833.100039-15-hkalra@marvell.com",
    "date": "2024-03-03T17:38:24",
    "name": "[v6,14/23] common/cnxk: get representees ethernet stats",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ab32baaedabd3135fd8c3a8cf4aa003cae56ed01",
    "submitter": {
        "id": 1182,
        "url": "http://patches.dpdk.org/api/people/1182/?format=api",
        "name": "Harman Kalra",
        "email": "hkalra@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/20240303173833.100039-15-hkalra@marvell.com/mbox/",
    "series": [
        {
            "id": 31353,
            "url": "http://patches.dpdk.org/api/series/31353/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31353",
            "date": "2024-03-03T17:38:10",
            "name": "net/cnxk: support for port representors",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/31353/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/137828/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/137828/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 F347643C3E;\n\tSun,  3 Mar 2024 18:40:32 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1845243685;\n\tSun,  3 Mar 2024 18:39:24 +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 4ADAB43685\n for <dev@dpdk.org>; Sun,  3 Mar 2024 18:39:22 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id\n 423Dsqmr027903 for <dev@dpdk.org>; Sun, 3 Mar 2024 09:39:21 -0800",
            "from dc6wp-exch02.marvell.com ([4.21.29.225])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3wm2bptru5-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Sun, 03 Mar 2024 09:39:21 -0800 (PST)",
            "from DC6WP-EXCH02.marvell.com (10.76.176.209) by\n DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.2.1258.12; Sun, 3 Mar 2024 09:39:20 -0800",
            "from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com\n (10.76.176.209) with Microsoft SMTP Server id 15.2.1258.12 via Frontend\n Transport; Sun, 3 Mar 2024 09:39:20 -0800",
            "from localhost.localdomain (unknown [10.29.52.211])\n by maili.marvell.com (Postfix) with ESMTP id B70D13F71A8;\n Sun,  3 Mar 2024 09:39:17 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-type; s=pfpt0220; bh=Swcp99AmSytwOqNQIkWIS\n AKIE97JDJWk0qa+ST+Rgic=; b=Ovz5zGf4nUVEQu+zX47Xquxs/jsmGLIQzlHLY\n 5C9a470LmUBqnxQ2MtGOvukjNA0k2v7jgQJsA8lVkbVjcDNLh4KDRMvCcRUALiD0\n XOUMxXu5K4kjtUbzmpCGYiUZBD1XpJZIlyYbPxiAejDM2po7RDBvteOnTeN+hkXG\n IV1xNa1iaHI1zQV59b8hJNgXqVMEuyXa7oVPZumeVKNaXFUCsjhYZWkLkjWz9WQv\n TLA/nNPtS1cBkZnpkq7f/awcWtYvSG+V2znRk9VGYjPpKPG/ab9DCyEcBrOnCgSo\n B3XdzkL3u40QSBa0AKimOiMAGxS2Vl5Hv6lq4ANk869LiI19w==",
        "From": "Harman Kalra <hkalra@marvell.com>",
        "To": "Nithin Dabilpuram <ndabilpuram@marvell.com>, Kiran Kumar K\n <kirankumark@marvell.com>, Sunil Kumar Kori <skori@marvell.com>, Satha Rao\n <skoteshwar@marvell.com>, Harman Kalra <hkalra@marvell.com>",
        "CC": "<dev@dpdk.org>",
        "Subject": "[PATCH v6 14/23] common/cnxk: get representees ethernet stats",
        "Date": "Sun, 3 Mar 2024 23:08:24 +0530",
        "Message-ID": "<20240303173833.100039-15-hkalra@marvell.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<20240303173833.100039-1-hkalra@marvell.com>",
        "References": "<20230811163419.165790-1-hkalra@marvell.com>\n <20240303173833.100039-1-hkalra@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "w0h05TJe5Iu_RxNN-lc8Yh9xNpLH9G93",
        "X-Proofpoint-ORIG-GUID": "w0h05TJe5Iu_RxNN-lc8Yh9xNpLH9G93",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2024-03-03_08,2024-03-01_03,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": "Implementing an mbox interface to fetch the representees's ethernet\nstats from the kernel.\n\nSigned-off-by: Harman Kalra <hkalra@marvell.com>\n---\n drivers/common/cnxk/roc_eswitch.c | 45 +++++++++++++++++++++++++++++++\n drivers/common/cnxk/roc_eswitch.h |  2 ++\n drivers/common/cnxk/roc_mbox.h    | 31 +++++++++++++++++++++\n drivers/common/cnxk/version.map   |  1 +\n 4 files changed, 79 insertions(+)",
    "diff": "diff --git a/drivers/common/cnxk/roc_eswitch.c b/drivers/common/cnxk/roc_eswitch.c\nindex 14819bad75..c67b4090a5 100644\n--- a/drivers/common/cnxk/roc_eswitch.c\n+++ b/drivers/common/cnxk/roc_eswitch.c\n@@ -342,3 +342,48 @@ roc_eswitch_nix_process_repte_notify_cb_unregister(struct roc_nix *roc_nix)\n \n \tdev->ops->repte_notify = NULL;\n }\n+\n+int\n+roc_eswitch_nix_repte_stats(struct roc_nix *roc_nix, uint16_t pf_func, struct roc_nix_stats *stats)\n+{\n+\tstruct nix *nix = roc_nix_to_nix_priv(roc_nix);\n+\tstruct dev *dev = &nix->dev;\n+\tstruct nix_get_lf_stats_req *req;\n+\tstruct nix_lf_stats_rsp *rsp;\n+\tstruct mbox *mbox;\n+\tint rc;\n+\n+\tmbox = mbox_get(dev->mbox);\n+\treq = mbox_alloc_msg_nix_get_lf_stats(mbox);\n+\tif (!req) {\n+\t\trc = -ENOSPC;\n+\t\tgoto exit;\n+\t}\n+\n+\treq->hdr.pcifunc = roc_nix_get_pf_func(roc_nix);\n+\treq->pcifunc = pf_func;\n+\n+\trc = mbox_process_msg(mbox, (void *)&rsp);\n+\tif (rc)\n+\t\tgoto exit;\n+\n+\tstats->rx_octs = rsp->rx.octs;\n+\tstats->rx_ucast = rsp->rx.ucast;\n+\tstats->rx_bcast = rsp->rx.bcast;\n+\tstats->rx_mcast = rsp->rx.mcast;\n+\tstats->rx_drop = rsp->rx.drop;\n+\tstats->rx_drop_octs = rsp->rx.drop_octs;\n+\tstats->rx_drop_bcast = rsp->rx.drop_bcast;\n+\tstats->rx_drop_mcast = rsp->rx.drop_mcast;\n+\tstats->rx_err = rsp->rx.err;\n+\n+\tstats->tx_ucast = rsp->tx.ucast;\n+\tstats->tx_bcast = rsp->tx.bcast;\n+\tstats->tx_mcast = rsp->tx.mcast;\n+\tstats->tx_drop = rsp->tx.drop;\n+\tstats->tx_octs = rsp->tx.octs;\n+\n+exit:\n+\tmbox_put(mbox);\n+\treturn rc;\n+}\ndiff --git a/drivers/common/cnxk/roc_eswitch.h b/drivers/common/cnxk/roc_eswitch.h\nindex e0df0038d4..b701ea69ee 100644\n--- a/drivers/common/cnxk/roc_eswitch.h\n+++ b/drivers/common/cnxk/roc_eswitch.h\n@@ -51,6 +51,8 @@ int __roc_api roc_eswitch_npc_rss_action_configure(struct roc_npc *roc_npc,\n /* NIX */\n int __roc_api roc_eswitch_nix_vlan_tpid_set(struct roc_nix *nix, uint32_t type, uint16_t tpid,\n \t\t\t\t\t    bool is_vf);\n+int __roc_api roc_eswitch_nix_repte_stats(struct roc_nix *roc_nix, uint16_t pf_func,\n+\t\t\t\t\t  struct roc_nix_stats *stats);\n int __roc_api roc_eswitch_nix_process_repte_notify_cb_register(struct roc_nix *roc_nix,\n \t\t\t\t\t\t    process_repte_notify_t proc_repte_nt);\n void __roc_api roc_eswitch_nix_process_repte_notify_cb_unregister(struct roc_nix *roc_nix);\ndiff --git a/drivers/common/cnxk/roc_mbox.h b/drivers/common/cnxk/roc_mbox.h\nindex d28e3ffd70..f1a3371ef9 100644\n--- a/drivers/common/cnxk/roc_mbox.h\n+++ b/drivers/common/cnxk/roc_mbox.h\n@@ -306,6 +306,7 @@ struct mbox_msghdr {\n \tM(NIX_MCAST_GRP_DESTROY, 0x802c, nix_mcast_grp_destroy, nix_mcast_grp_destroy_req, msg_rsp)\\\n \tM(NIX_MCAST_GRP_UPDATE, 0x802d, nix_mcast_grp_update, nix_mcast_grp_update_req,            \\\n \t  nix_mcast_grp_update_rsp)                                                                \\\n+\tM(NIX_GET_LF_STATS,    0x802e, nix_get_lf_stats, nix_get_lf_stats_req, nix_lf_stats_rsp)   \\\n \t/* MCS mbox IDs (range 0xa000 - 0xbFFF) */                                                 \\\n \tM(MCS_ALLOC_RESOURCES, 0xa000, mcs_alloc_resources, mcs_alloc_rsrc_req,                    \\\n \t  mcs_alloc_rsrc_rsp)                                                                      \\\n@@ -1850,6 +1851,36 @@ struct nix_mcast_grp_update_rsp {\n \tuint32_t __io mce_start_index;\n };\n \n+struct nix_get_lf_stats_req {\n+\tstruct mbox_msghdr hdr;\n+\tuint16_t __io pcifunc;\n+\tuint64_t __io rsvd;\n+};\n+\n+struct nix_lf_stats_rsp {\n+\tstruct mbox_msghdr hdr;\n+\tuint16_t __io pcifunc;\n+\tstruct {\n+\t\tuint64_t __io octs;\n+\t\tuint64_t __io ucast;\n+\t\tuint64_t __io bcast;\n+\t\tuint64_t __io mcast;\n+\t\tuint64_t __io drop;\n+\t\tuint64_t __io drop_octs;\n+\t\tuint64_t __io drop_mcast;\n+\t\tuint64_t __io drop_bcast;\n+\t\tuint64_t __io err;\n+\t\tuint64_t __io rsvd[5];\n+\t} rx;\n+\tstruct {\n+\t\tuint64_t __io ucast;\n+\t\tuint64_t __io bcast;\n+\t\tuint64_t __io mcast;\n+\t\tuint64_t __io drop;\n+\t\tuint64_t __io octs;\n+\t} tx;\n+};\n+\n /* Global NIX inline IPSec configuration */\n struct nix_inline_ipsec_cfg {\n \tstruct mbox_msghdr hdr;\ndiff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map\nindex 5dd42c8044..18c2d9d632 100644\n--- a/drivers/common/cnxk/version.map\n+++ b/drivers/common/cnxk/version.map\n@@ -89,6 +89,7 @@ INTERNAL {\n \troc_error_msg_get;\n \troc_eswitch_nix_process_repte_notify_cb_register;\n \troc_eswitch_nix_process_repte_notify_cb_unregister;\n+\troc_eswitch_nix_repte_stats;\n \troc_eswitch_nix_vlan_tpid_set;\n \troc_eswitch_npc_mcam_delete_rule;\n \troc_eswitch_npc_mcam_rx_rule;\n",
    "prefixes": [
        "v6",
        "14/23"
    ]
}