get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 123669,
    "url": "https://patches.dpdk.org/api/patches/123669/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230210082623.1005496-3-rkudurumalla@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": "<20230210082623.1005496-3-rkudurumalla@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230210082623.1005496-3-rkudurumalla@marvell.com",
    "date": "2023-02-10T08:26:23",
    "name": "[v6,3/3] net/cnxk: skip red drop for ingress policer",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "de90712642940a7deab038cb6c391e1bd6b434d0",
    "submitter": {
        "id": 2289,
        "url": "https://patches.dpdk.org/api/people/2289/?format=api",
        "name": "Rakesh Kudurumalla",
        "email": "rkudurumalla@marvell.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230210082623.1005496-3-rkudurumalla@marvell.com/mbox/",
    "series": [
        {
            "id": 26946,
            "url": "https://patches.dpdk.org/api/series/26946/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=26946",
            "date": "2023-02-10T08:26:21",
            "name": "[v6,1/3] ethdev: skip congestion management configuration",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/26946/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/123669/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/123669/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 A3CCB41C5D;\n\tFri, 10 Feb 2023 09:26:59 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DF95442D29;\n\tFri, 10 Feb 2023 09:26:41 +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 8DB9F42D20\n for <dev@dpdk.org>; Fri, 10 Feb 2023 09:26:39 +0100 (CET)",
            "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 31A7FfVe014769 for <dev@dpdk.org>; Fri, 10 Feb 2023 00:26:38 -0800",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3nnf7wgdf7-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Fri, 10 Feb 2023 00:26:38 -0800",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.42;\n Fri, 10 Feb 2023 00:26:36 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.42 via Frontend\n Transport; Fri, 10 Feb 2023 00:26:36 -0800",
            "from localhost.localdomain (unknown [10.28.36.154])\n by maili.marvell.com (Postfix) with ESMTP id 970B15B693D;\n Fri, 10 Feb 2023 00:26:34 -0800 (PST)"
        ],
        "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=+wkyq8QbbVdnmMuqFtIIZ0LFsMTiKqv6bGbHr1bg2nI=;\n b=Hhi32wcsYsxx6ytHnwrtoBKivPqxHYdLHcPOd3JBbIqvb3I1AvTY1dw+yKIk9HLnvNH/\n HZNBJfJawBnx68mKalYOVs6E+QJN2Bowzup8Ve5ZdiXrWP4rvx/hXJ0/hX0fW93k193F\n qwLmKixty4ZAnWx6Rn3XB2F6tPJWbDO4iQpcHu/PfAWqW1len66aLG372Uk7n+zodM2q\n SaGE1uPbZ6lST8ljCxN5+JCDbkwyLiuoZqyzBH70uxeSlxtyIDaY+PYsrU7lGklAvB2A\n 4BjFd06UmQ/NyQyDT6Zf6ZSY5BfFbN6CHEJM13NjlMKv1gf8/ok8hfueMCG5t2M0SgXQ Yw==",
        "From": "Rakesh Kudurumalla <rkudurumalla@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>",
        "CC": "<jerinj@marvell.com>, <dev@dpdk.org>, Rakesh Kudurumalla\n <rkudurumalla@marvell.com>",
        "Subject": "[PATCH v6 3/3] net/cnxk: skip red drop for ingress policer",
        "Date": "Fri, 10 Feb 2023 13:56:23 +0530",
        "Message-ID": "<20230210082623.1005496-3-rkudurumalla@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230210082623.1005496-1-rkudurumalla@marvell.com>",
        "References": "<20230210081422.1004901-1-rkudurumalla@marvell.com>\n <20230210082623.1005496-1-rkudurumalla@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "pfdGmZV9F9N4xsqP-Nb8wr4zpLU3QBXI",
        "X-Proofpoint-GUID": "pfdGmZV9F9N4xsqP-Nb8wr4zpLU3QBXI",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22\n definitions=2023-02-10_03,2023-02-09_03,2023-02-09_01",
        "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": "Dropping of packets is based on action configured\nto meter.If both skip_red and drop actions are configured\nthen tail dropping in invoked else if only drop action is\nconfigured then RED drop is invoked.This action is supported\nonly when RED is configured using rte_eth_cman_config_set()\n\nSigned-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>\n---\n doc/guides/nics/features/cnxk.ini    |  2 ++\n doc/guides/nics/features/cnxk_vf.ini |  1 +\n drivers/net/cnxk/cnxk_ethdev.h       |  1 +\n drivers/net/cnxk/cnxk_ethdev_mtr.c   | 50 ++++++++++++++++++++++++++++\n 4 files changed, 54 insertions(+)",
    "diff": "diff --git a/doc/guides/nics/features/cnxk.ini b/doc/guides/nics/features/cnxk.ini\nindex f81628da77..afbb6dc8c9 100644\n--- a/doc/guides/nics/features/cnxk.ini\n+++ b/doc/guides/nics/features/cnxk.ini\n@@ -80,6 +80,7 @@ vxlan_gpe            = Y\n \n [rte_flow actions]\n count                = Y\n+skip_cman\t     = Y\n drop                 = Y\n flag                 = Y\n mark                 = Y\n@@ -94,4 +95,5 @@ queue                = Y\n represented_port     = Y\n rss                  = Y\n security             = Y\n+skip_cman            = Y\n vf                   = Y\ndiff --git a/doc/guides/nics/features/cnxk_vf.ini b/doc/guides/nics/features/cnxk_vf.ini\nindex c4ee32a9ad..873e1dcc0a 100644\n--- a/doc/guides/nics/features/cnxk_vf.ini\n+++ b/doc/guides/nics/features/cnxk_vf.ini\n@@ -83,4 +83,5 @@ pf                   = Y\n queue                = Y\n rss                  = Y\n security             = Y\n+skip_cman            = Y\n vf                   = Y\ndiff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h\nindex f0eab4244c..ba35873124 100644\n--- a/drivers/net/cnxk/cnxk_ethdev.h\n+++ b/drivers/net/cnxk/cnxk_ethdev.h\n@@ -168,6 +168,7 @@ struct policy_actions {\n \t\tuint16_t queue;\n \t\tuint32_t mtr_id;\n \t\tstruct action_rss *rss_desc;\n+\t\tbool skip_red;\n \t};\n };\n \ndiff --git a/drivers/net/cnxk/cnxk_ethdev_mtr.c b/drivers/net/cnxk/cnxk_ethdev_mtr.c\nindex dcfa4223d5..27a6e4ef3d 100644\n--- a/drivers/net/cnxk/cnxk_ethdev_mtr.c\n+++ b/drivers/net/cnxk/cnxk_ethdev_mtr.c\n@@ -358,6 +358,9 @@ cnxk_nix_mtr_policy_validate(struct rte_eth_dev *dev,\n \t\t\t\tif (action->type == RTE_FLOW_ACTION_TYPE_VOID)\n \t\t\t\t\tsupported[i] = true;\n \n+\t\t\t\tif (action->type == RTE_FLOW_ACTION_TYPE_SKIP_CMAN)\n+\t\t\t\t\tsupported[i] = true;\n+\n \t\t\t\tif (!supported[i])\n \t\t\t\t\treturn update_mtr_err(i, error, true);\n \t\t\t}\n@@ -397,6 +400,10 @@ cnxk_fill_policy_actions(struct cnxk_mtr_policy_node *fmp,\n \t\t\t\t\tfmp->actions[i].action_fate =\n \t\t\t\t\t\taction->type;\n \t\t\t\t}\n+\n+\t\t\t\tif (action->type ==\n+\t\t\t\t\tRTE_FLOW_ACTION_TYPE_SKIP_CMAN)\n+\t\t\t\t\tfmp->actions[i].skip_red = true;\n \t\t\t}\n \t\t}\n \t}\n@@ -1306,6 +1313,45 @@ nix_mtr_config_map(struct cnxk_meter_node *mtr, struct roc_nix_bpf_cfg *cfg)\n \t\tcfg->action[ROC_NIX_BPF_COLOR_RED] = ROC_NIX_BPF_ACTION_DROP;\n }\n \n+static void\n+nix_mtr_config_red(struct cnxk_meter_node *mtr, struct roc_nix_rq *rq,\n+\t\t   struct roc_nix_bpf_cfg *cfg)\n+{\n+\tstruct cnxk_mtr_policy_node *policy = mtr->policy;\n+\n+\tif ((rq->red_pass && rq->red_pass >= rq->red_drop) ||\n+\t   (rq->spb_red_pass && rq->spb_red_pass >= rq->spb_red_drop)\t||\n+\t   (rq->xqe_red_pass && rq->xqe_red_pass >= rq->xqe_red_drop)) {\n+\t\tif (policy->actions[RTE_COLOR_GREEN].action_fate ==\n+\t\t\tRTE_FLOW_ACTION_TYPE_DROP) {\n+\t\t\tif (policy->actions[RTE_COLOR_GREEN].skip_red)\n+\t\t\t\tcfg->action[ROC_NIX_BPF_COLOR_GREEN] =\n+\t\t\t\t\t\tROC_NIX_BPF_ACTION_DROP;\n+\t\t\telse\n+\t\t\t\tcfg->action[ROC_NIX_BPF_COLOR_GREEN] =\n+\t\t\t\t\t\tROC_NIX_BPF_ACTION_RED;\n+\t\t}\n+\t\tif (policy->actions[RTE_COLOR_YELLOW].action_fate ==\n+\t\t\tRTE_FLOW_ACTION_TYPE_DROP) {\n+\t\t\tif (policy->actions[RTE_COLOR_YELLOW].skip_red)\n+\t\t\t\tcfg->action[ROC_NIX_BPF_COLOR_YELLOW] =\n+\t\t\t\t\t\tROC_NIX_BPF_ACTION_DROP;\n+\t\t\telse\n+\t\t\t\tcfg->action[ROC_NIX_BPF_COLOR_YELLOW] =\n+\t\t\t\t\t\tROC_NIX_BPF_ACTION_RED;\n+\t\t}\n+\t\tif (policy->actions[RTE_COLOR_RED].action_fate ==\n+\t\t\tRTE_FLOW_ACTION_TYPE_DROP) {\n+\t\t\tif (policy->actions[RTE_COLOR_RED].skip_red)\n+\t\t\t\tcfg->action[ROC_NIX_BPF_COLOR_RED] =\n+\t\t\t\t\t\tROC_NIX_BPF_ACTION_DROP;\n+\t\t\telse\n+\t\t\t\tcfg->action[ROC_NIX_BPF_COLOR_RED] =\n+\t\t\t\t\t\tROC_NIX_BPF_ACTION_RED;\n+\t\t}\n+\t}\n+}\n+\n static void\n nix_precolor_table_map(struct cnxk_meter_node *mtr,\n \t\t       struct roc_nix_bpf_precolor *tbl,\n@@ -1483,6 +1529,10 @@ nix_mtr_configure(struct rte_eth_dev *eth_dev, uint32_t id)\n \t\t\tif (!mtr[i]->is_used) {\n \t\t\t\tmemset(&cfg, 0, sizeof(struct roc_nix_bpf_cfg));\n \t\t\t\tnix_mtr_config_map(mtr[i], &cfg);\n+\t\t\t\tfor (j = 0; j < mtr[i]->rq_num; j++) {\n+\t\t\t\t\trq = &dev->rqs[mtr[i]->rq_id[j]];\n+\t\t\t\t\tnix_mtr_config_red(mtr[i], rq, &cfg);\n+\t\t\t\t}\n \t\t\t\trc = roc_nix_bpf_config(nix, mtr[i]->bpf_id,\n \t\t\t\t\t\t\tlvl_map[mtr[i]->level],\n \t\t\t\t\t\t\t&cfg);\n",
    "prefixes": [
        "v6",
        "3/3"
    ]
}