get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 123935,
    "url": "http://patches.dpdk.org/api/patches/123935/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230215062532.1169860-3-rkudurumalla@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": "<20230215062532.1169860-3-rkudurumalla@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230215062532.1169860-3-rkudurumalla@marvell.com",
    "date": "2023-02-15T06:25:32",
    "name": "[v9,3/3] net/cnxk: skip red drop for ingress policer",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "2d4739b0012608761b9838c6cdc45ca958b08794",
    "submitter": {
        "id": 2289,
        "url": "http://patches.dpdk.org/api/people/2289/?format=api",
        "name": "Rakesh Kudurumalla",
        "email": "rkudurumalla@marvell.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230215062532.1169860-3-rkudurumalla@marvell.com/mbox/",
    "series": [
        {
            "id": 27013,
            "url": "http://patches.dpdk.org/api/series/27013/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27013",
            "date": "2023-02-15T06:25:30",
            "name": "[v9,1/3] ethdev: skip congestion management configuration",
            "version": 9,
            "mbox": "http://patches.dpdk.org/series/27013/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/123935/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/123935/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 E326041C9F;\n\tWed, 15 Feb 2023 07:25:52 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id F226B42FF2;\n\tWed, 15 Feb 2023 07:25:48 +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 1DFEB42FF0\n for <dev@dpdk.org>; Wed, 15 Feb 2023 07:25:47 +0100 (CET)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 31F0NoVv030123 for <dev@dpdk.org>; Tue, 14 Feb 2023 22:25:46 -0800",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3nr516p841-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Tue, 14 Feb 2023 22:25:46 -0800",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.42;\n Tue, 14 Feb 2023 22:25:44 -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; Tue, 14 Feb 2023 22:25:44 -0800",
            "from localhost.localdomain (unknown [10.28.36.154])\n by maili.marvell.com (Postfix) with ESMTP id EE9433F7040;\n Tue, 14 Feb 2023 22:25:41 -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=TEod7rdm4kaiVR9Bu8+XqvsmlHHRLkJ98TF/ox6X+HI=;\n b=hVyIOk81WiHRyrfeLi+0UHfC1knnJtokoa26kdLKSPUSN9sBwXQEoRFyrhzl082F0s1y\n YwyyoAUiczfozW8PRD2IygS5HTWI5jdEcZ+pLHOsVvGLGqXPXK9HHrorGhp1ScszK207\n WrJF3qmLgNCCG8c/BB/AKNcQsHmNvOWbyk815pMdPKR6kStc2IxNkPFZlgMN0Hky5Mh2\n mQsPAdu4gj68u1r91Ew2k9DL2cQpngEEMR9kPDk9TSkuUG6NlwuVfvfAupCb9OHGcxft\n 2PYdGYiBHR8a5USkWBoyzTuG0g1uCbUZtcrQ2zjVAyuv1+u9Cc3e46w2nLNKngBS/oVa Tg==",
        "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 v9 3/3] net/cnxk: skip red drop for ingress policer",
        "Date": "Wed, 15 Feb 2023 11:55:32 +0530",
        "Message-ID": "<20230215062532.1169860-3-rkudurumalla@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230215062532.1169860-1-rkudurumalla@marvell.com>",
        "References": "<20230214130458.1114765-1-rkudurumalla@marvell.com>\n <20230215062532.1169860-1-rkudurumalla@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "Gw9tOmzji-fPg3dA9eTVo0c21ioz9W42",
        "X-Proofpoint-GUID": "Gw9tOmzji-fPg3dA9eTVo0c21ioz9W42",
        "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-15_02,2023-02-14_01,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      |  1 +\n doc/guides/nics/features/cnxk_vf.ini   |  1 +\n doc/guides/rel_notes/release_23_03.rst |  4 +++\n drivers/net/cnxk/cnxk_ethdev.h         |  1 +\n drivers/net/cnxk/cnxk_ethdev_mtr.c     | 50 ++++++++++++++++++++++++++\n 5 files changed, 57 insertions(+)",
    "diff": "diff --git a/doc/guides/nics/features/cnxk.ini b/doc/guides/nics/features/cnxk.ini\nindex f81628da77..7947c044bb 100644\n--- a/doc/guides/nics/features/cnxk.ini\n+++ b/doc/guides/nics/features/cnxk.ini\n@@ -94,4 +94,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/doc/guides/rel_notes/release_23_03.rst b/doc/guides/rel_notes/release_23_03.rst\nindex 1dd10e26db..9f53ded5fb 100644\n--- a/doc/guides/rel_notes/release_23_03.rst\n+++ b/doc/guides/rel_notes/release_23_03.rst\n@@ -98,6 +98,10 @@ New Features\n     ``rte_event_dev_config::nb_single_link_event_port_queues`` parameter\n     required for eth_rx, eth_tx, crypto and timer eventdev adapters.\n \n+* **Updated Marvell cnxk ethdev PMD.**\n+\n+  Added support to skip RED using new action\n+  ``RTE_FLOW_ACTION_TYPE_SKIP_CMAN``\n \n Removed Items\n -------------\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": [
        "v9",
        "3/3"
    ]
}