get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 137380,
    "url": "http://patches.dpdk.org/api/patches/137380/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240227191550.137687-8-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": "<20240227191550.137687-8-hkalra@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240227191550.137687-8-hkalra@marvell.com",
    "date": "2024-02-27T19:15:34",
    "name": "[v4,07/23] common/cnxk: interface to update VLAN TPID",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "50e8c7a0816e033b1c48f7b8609671ac26f6b7bc",
    "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/20240227191550.137687-8-hkalra@marvell.com/mbox/",
    "series": [
        {
            "id": 31259,
            "url": "http://patches.dpdk.org/api/series/31259/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31259",
            "date": "2024-02-27T19:15:27",
            "name": "net/cnxk: support for port representors",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/31259/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/137380/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/137380/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 D111443C06;\n\tTue, 27 Feb 2024 20:17:01 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A774242F27;\n\tTue, 27 Feb 2024 20:16:28 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 2CA7C42F11\n for <dev@dpdk.org>; Tue, 27 Feb 2024 20:16:27 +0100 (CET)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id\n 41RFhNwR005875 for <dev@dpdk.org>; Tue, 27 Feb 2024 11:16:26 -0800",
            "from dc5-exch05.marvell.com ([199.233.59.128])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3whjm694mh-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Tue, 27 Feb 2024 11:16:26 -0800 (PST)",
            "from DC5-EXCH05.marvell.com (10.69.176.209) by\n DC5-EXCH05.marvell.com (10.69.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; Tue, 27 Feb 2024 11:16:25 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com\n (10.69.176.209) with Microsoft SMTP Server id 15.2.1258.12 via Frontend\n Transport; Tue, 27 Feb 2024 11:16:25 -0800",
            "from localhost.localdomain (unknown [10.29.52.211])\n by maili.marvell.com (Postfix) with ESMTP id CF3083F71A7;\n Tue, 27 Feb 2024 11:16:22 -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=HsM+ZdhpJKnpcmQFxMUIR\n rpOV+0QMUEGWMwfmJgxyeU=; b=Fxj+f77ME5w8t0SLTc0yXxavQz7KVo5QOAajx\n VyUHq1YK+pBYQm+GBEIRSANXNTsoBiIhwojZaOHW4IeWma2pOKtn1feMveDagTbU\n 1I3cdcOz9TATC3rMGx92Ay6rbPjrkUBfkuJDBWD0efsZwCzSBOKzNjAgcr+f3kSh\n Jlf3HKAbNKfEFjBnsTgdl3BuGCV1BO1XZ3DHh9Y/fsdH3i8XgUvBFtPTc8eSvD4U\n 1+htXYJ0a8Hq134fpQsXu45437OQ3P+3zJ6t//torv9If6Qy/3MSjlrmpNpaHFQI\n s6OgBuKehkBiS8N3Au6T9VtP6NRuSTgyirnBHg5rtnHwuB8tA==",
        "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 v4 07/23] common/cnxk: interface to update VLAN TPID",
        "Date": "Wed, 28 Feb 2024 00:45:34 +0530",
        "Message-ID": "<20240227191550.137687-8-hkalra@marvell.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<20240227191550.137687-1-hkalra@marvell.com>",
        "References": "<20230811163419.165790-1-hkalra@marvell.com>\n <20240227191550.137687-1-hkalra@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "rpIk3oyJgdr0WToeul0CodEB6Th-XjFo",
        "X-Proofpoint-GUID": "rpIk3oyJgdr0WToeul0CodEB6Th-XjFo",
        "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-02-27_06,2024-02-27_01,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": "Introducing eswitch variant of set vlan tpid api which can be\nusing for PF and VF\n\nSigned-off-by: Harman Kalra <hkalra@marvell.com>\n---\n drivers/common/cnxk/roc_eswitch.c  | 15 +++++++++++++++\n drivers/common/cnxk/roc_eswitch.h  |  4 ++++\n drivers/common/cnxk/roc_nix_priv.h | 11 +++++------\n drivers/common/cnxk/roc_nix_vlan.c | 23 ++++++++++++++++++-----\n drivers/common/cnxk/version.map    |  1 +\n 5 files changed, 43 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/common/cnxk/roc_eswitch.c b/drivers/common/cnxk/roc_eswitch.c\nindex e480ab1046..020a891a32 100644\n--- a/drivers/common/cnxk/roc_eswitch.c\n+++ b/drivers/common/cnxk/roc_eswitch.c\n@@ -304,3 +304,18 @@ roc_eswitch_npc_rss_action_configure(struct roc_npc *roc_npc, struct roc_npc_flo\n \t\t((uint64_t)(rss_grp_idx & NPC_RSS_ACT_GRP_MASK) << NPC_RSS_ACT_GRP_OFFSET);\n \treturn 0;\n }\n+\n+int\n+roc_eswitch_nix_vlan_tpid_set(struct roc_nix *roc_nix, uint32_t type, uint16_t tpid, bool is_vf)\n+{\n+\tstruct nix *nix = roc_nix_to_nix_priv(roc_nix);\n+\tstruct dev *dev = &nix->dev;\n+\tint rc;\n+\n+\t/* Configuring for PF/VF */\n+\trc = nix_vlan_tpid_set(dev->mbox, dev->pf_func | is_vf, type, tpid);\n+\tif (rc)\n+\t\tplt_err(\"Failed to set tpid for PF, rc %d\", rc);\n+\n+\treturn rc;\n+}\ndiff --git a/drivers/common/cnxk/roc_eswitch.h b/drivers/common/cnxk/roc_eswitch.h\nindex cdbe808a71..34b75d10ac 100644\n--- a/drivers/common/cnxk/roc_eswitch.h\n+++ b/drivers/common/cnxk/roc_eswitch.h\n@@ -19,4 +19,8 @@ int __roc_api roc_eswitch_npc_mcam_delete_rule(struct roc_npc *roc_npc, struct r\n int __roc_api roc_eswitch_npc_rss_action_configure(struct roc_npc *roc_npc,\n \t\t\t\t\t\t   struct roc_npc_flow *flow, uint32_t flowkey_cfg,\n \t\t\t\t\t\t   uint16_t *reta_tbl);\n+\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 #endif /* __ROC_ESWITCH_H__ */\ndiff --git a/drivers/common/cnxk/roc_nix_priv.h b/drivers/common/cnxk/roc_nix_priv.h\nindex a582b9df33..3d99ade2b4 100644\n--- a/drivers/common/cnxk/roc_nix_priv.h\n+++ b/drivers/common/cnxk/roc_nix_priv.h\n@@ -469,13 +469,12 @@ void nix_tm_shaper_profile_free(struct nix_tm_shaper_profile *profile);\n uint64_t nix_get_blkaddr(struct dev *dev);\n void nix_lf_rq_dump(__io struct nix_cn10k_rq_ctx_s *ctx, FILE *file);\n int nix_lf_gen_reg_dump(uintptr_t nix_lf_base, uint64_t *data);\n-int nix_lf_stat_reg_dump(uintptr_t nix_lf_base, uint64_t *data,\n-\t\t\t uint8_t lf_tx_stats, uint8_t lf_rx_stats);\n-int nix_lf_int_reg_dump(uintptr_t nix_lf_base, uint64_t *data, uint16_t qints,\n-\t\t\tuint16_t cints);\n-int nix_q_ctx_get(struct dev *dev, uint8_t ctype, uint16_t qid,\n-\t\t  __io void **ctx_p);\n+int nix_lf_stat_reg_dump(uintptr_t nix_lf_base, uint64_t *data, uint8_t lf_tx_stats,\n+\t\t\t uint8_t lf_rx_stats);\n+int nix_lf_int_reg_dump(uintptr_t nix_lf_base, uint64_t *data, uint16_t qints, uint16_t cints);\n+int nix_q_ctx_get(struct dev *dev, uint8_t ctype, uint16_t qid, __io void **ctx_p);\n uint8_t nix_tm_lbk_relchan_get(struct nix *nix);\n+int nix_vlan_tpid_set(struct mbox *mbox, uint16_t pcifunc, uint32_t type, uint16_t tpid);\n \n /*\n  * Telemetry\ndiff --git a/drivers/common/cnxk/roc_nix_vlan.c b/drivers/common/cnxk/roc_nix_vlan.c\nindex abd2eb0571..db218593ad 100644\n--- a/drivers/common/cnxk/roc_nix_vlan.c\n+++ b/drivers/common/cnxk/roc_nix_vlan.c\n@@ -211,18 +211,17 @@ roc_nix_vlan_insert_ena_dis(struct roc_nix *roc_nix,\n }\n \n int\n-roc_nix_vlan_tpid_set(struct roc_nix *roc_nix, uint32_t type, uint16_t tpid)\n+nix_vlan_tpid_set(struct mbox *mbox, uint16_t pcifunc, uint32_t type, uint16_t tpid)\n {\n-\tstruct nix *nix = roc_nix_to_nix_priv(roc_nix);\n-\tstruct dev *dev = &nix->dev;\n-\tstruct mbox *mbox = mbox_get(dev->mbox);\n \tstruct nix_set_vlan_tpid *tpid_cfg;\n \tint rc = -ENOSPC;\n \n-\ttpid_cfg = mbox_alloc_msg_nix_set_vlan_tpid(mbox);\n+\t/* Configuring for PF */\n+\ttpid_cfg = mbox_alloc_msg_nix_set_vlan_tpid(mbox_get(mbox));\n \tif (tpid_cfg == NULL)\n \t\tgoto exit;\n \ttpid_cfg->tpid = tpid;\n+\ttpid_cfg->hdr.pcifunc = pcifunc;\n \n \tif (type & ROC_NIX_VLAN_TYPE_OUTER)\n \t\ttpid_cfg->vlan_type = NIX_VLAN_TYPE_OUTER;\n@@ -234,3 +233,17 @@ roc_nix_vlan_tpid_set(struct roc_nix *roc_nix, uint32_t type, uint16_t tpid)\n \tmbox_put(mbox);\n \treturn rc;\n }\n+\n+int\n+roc_nix_vlan_tpid_set(struct roc_nix *roc_nix, uint32_t type, uint16_t tpid)\n+{\n+\tstruct nix *nix = roc_nix_to_nix_priv(roc_nix);\n+\tstruct dev *dev = &nix->dev;\n+\tint rc;\n+\n+\trc = nix_vlan_tpid_set(dev->mbox, dev->pf_func, type, tpid);\n+\tif (rc)\n+\t\tplt_err(\"Failed to set tpid for PF, rc %d\", rc);\n+\n+\treturn rc;\n+}\ndiff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map\nindex a9b946d36f..2ee54c52d7 100644\n--- a/drivers/common/cnxk/version.map\n+++ b/drivers/common/cnxk/version.map\n@@ -91,6 +91,7 @@ INTERNAL {\n \troc_dpi_disable;\n \troc_dpi_enable;\n \troc_error_msg_get;\n+\troc_eswitch_nix_vlan_tpid_set;\n \troc_eswitch_npc_mcam_delete_rule;\n \troc_eswitch_npc_mcam_rx_rule;\n \troc_eswitch_npc_mcam_tx_rule;\n",
    "prefixes": [
        "v4",
        "07/23"
    ]
}