get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 73405,
    "url": "https://patches.dpdk.org/api/patches/73405/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200707092244.12791-26-hemant.agrawal@nxp.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": "<20200707092244.12791-26-hemant.agrawal@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200707092244.12791-26-hemant.agrawal@nxp.com",
    "date": "2020-07-07T09:22:40",
    "name": "[v2,25/29] net/dpaa2: add flow data sanity check",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ab3d74b77bc66c773de5d01bd3cd9d953411fdb8",
    "submitter": {
        "id": 477,
        "url": "https://patches.dpdk.org/api/people/477/?format=api",
        "name": "Hemant Agrawal",
        "email": "hemant.agrawal@nxp.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/20200707092244.12791-26-hemant.agrawal@nxp.com/mbox/",
    "series": [
        {
            "id": 10842,
            "url": "https://patches.dpdk.org/api/series/10842/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10842",
            "date": "2020-07-07T09:22:15",
            "name": "NXP DPAAx enhancements",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/10842/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/73405/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/73405/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 9F8D5A00BE;\n\tTue,  7 Jul 2020 11:32:28 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DFA001DE15;\n\tTue,  7 Jul 2020 11:27:37 +0200 (CEST)",
            "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n by dpdk.org (Postfix) with ESMTP id 22E1D1DD3C\n for <dev@dpdk.org>; Tue,  7 Jul 2020 11:27:16 +0200 (CEST)",
            "from inva020.nxp.com (localhost [127.0.0.1])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 096181A0A30;\n Tue,  7 Jul 2020 11:27:16 +0200 (CEST)",
            "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n [165.114.16.14])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 185651A0A4E;\n Tue,  7 Jul 2020 11:27:14 +0200 (CEST)",
            "from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net\n [10.232.133.63])\n by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id CE564402C8;\n Tue,  7 Jul 2020 17:27:11 +0800 (SGT)"
        ],
        "From": "Hemant Agrawal <hemant.agrawal@nxp.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com,\n\tJun Yang <jun.yang@nxp.com>",
        "Date": "Tue,  7 Jul 2020 14:52:40 +0530",
        "Message-Id": "<20200707092244.12791-26-hemant.agrawal@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200707092244.12791-1-hemant.agrawal@nxp.com>",
        "References": "<20200527132326.1382-1-hemant.agrawal@nxp.com>\n <20200707092244.12791-1-hemant.agrawal@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[dpdk-dev] [PATCH v2 25/29] net/dpaa2: add flow data sanity check",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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: Jun Yang <jun.yang@nxp.com>\n\nCheck flow attributions and actions before creating flow.\nOtherwise, the QoS table and FS table need to re-build\nif checking fails.\n\nSigned-off-by: Jun Yang <jun.yang@nxp.com>\n---\n drivers/net/dpaa2/dpaa2_flow.c | 84 ++++++++++++++++++++++++++--------\n 1 file changed, 65 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c\nindex 76f68b903..3601829c9 100644\n--- a/drivers/net/dpaa2/dpaa2_flow.c\n+++ b/drivers/net/dpaa2/dpaa2_flow.c\n@@ -3124,6 +3124,67 @@ dpaa2_flow_verify_attr(\n \treturn 0;\n }\n \n+static inline int\n+dpaa2_flow_verify_action(\n+\tstruct dpaa2_dev_priv *priv,\n+\tconst struct rte_flow_attr *attr,\n+\tconst struct rte_flow_action actions[])\n+{\n+\tint end_of_list = 0, i, j = 0;\n+\tconst struct rte_flow_action_queue *dest_queue;\n+\tconst struct rte_flow_action_rss *rss_conf;\n+\tstruct dpaa2_queue *rxq;\n+\n+\twhile (!end_of_list) {\n+\t\tswitch (actions[j].type) {\n+\t\tcase RTE_FLOW_ACTION_TYPE_QUEUE:\n+\t\t\tdest_queue = (const struct rte_flow_action_queue *)\n+\t\t\t\t\t(actions[j].conf);\n+\t\t\trxq = priv->rx_vq[dest_queue->index];\n+\t\t\tif (attr->group != rxq->tc_index) {\n+\t\t\t\tDPAA2_PMD_ERR(\n+\t\t\t\t\t\"RXQ[%d] does not belong to the group %d\",\n+\t\t\t\t\tdest_queue->index, attr->group);\n+\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\t\t\tbreak;\n+\t\tcase RTE_FLOW_ACTION_TYPE_RSS:\n+\t\t\trss_conf = (const struct rte_flow_action_rss *)\n+\t\t\t\t\t(actions[j].conf);\n+\t\t\tif (rss_conf->queue_num > priv->dist_queues) {\n+\t\t\t\tDPAA2_PMD_ERR(\n+\t\t\t\t\t\"RSS number exceeds the distrbution size\");\n+\t\t\t\treturn -ENOTSUP;\n+\t\t\t}\n+\t\t\tfor (i = 0; i < (int)rss_conf->queue_num; i++) {\n+\t\t\t\tif (rss_conf->queue[i] >= priv->nb_rx_queues) {\n+\t\t\t\t\tDPAA2_PMD_ERR(\n+\t\t\t\t\t\t\"RSS queue index exceeds the number of RXQs\");\n+\t\t\t\t\treturn -ENOTSUP;\n+\t\t\t\t}\n+\t\t\t\trxq = priv->rx_vq[rss_conf->queue[i]];\n+\t\t\t\tif (rxq->tc_index != attr->group) {\n+\t\t\t\t\tDPAA2_PMD_ERR(\n+\t\t\t\t\t\t\"Queue/Group combination are not supported\\n\");\n+\t\t\t\t\treturn -ENOTSUP;\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\tbreak;\n+\t\tcase RTE_FLOW_ACTION_TYPE_END:\n+\t\t\tend_of_list = 1;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tDPAA2_PMD_ERR(\"Invalid action type\");\n+\t\t\treturn -ENOTSUP;\n+\t\t}\n+\t\tj++;\n+\t}\n+\n+\treturn 0;\n+}\n+\n static int\n dpaa2_generic_flow_set(struct rte_flow *flow,\n \t\t       struct rte_eth_dev *dev,\n@@ -3150,6 +3211,10 @@ dpaa2_generic_flow_set(struct rte_flow *flow,\n \tif (ret)\n \t\treturn ret;\n \n+\tret = dpaa2_flow_verify_action(priv, attr, actions);\n+\tif (ret)\n+\t\treturn ret;\n+\n \t/* Parse pattern list to get the matching parameters */\n \twhile (!end_of_list) {\n \t\tswitch (pattern[i].type) {\n@@ -3405,25 +3470,6 @@ dpaa2_generic_flow_set(struct rte_flow *flow,\n \t\t\tbreak;\n \t\tcase RTE_FLOW_ACTION_TYPE_RSS:\n \t\t\trss_conf = (const struct rte_flow_action_rss *)(actions[j].conf);\n-\t\t\tif (rss_conf->queue_num > priv->dist_queues) {\n-\t\t\t\tDPAA2_PMD_ERR(\n-\t\t\t\t\t\"RSS number exceeds the distrbution size\");\n-\t\t\t\treturn -ENOTSUP;\n-\t\t\t}\n-\n-\t\t\tfor (i = 0; i < (int)rss_conf->queue_num; i++) {\n-\t\t\t\tif (rss_conf->queue[i] >= priv->nb_rx_queues) {\n-\t\t\t\t\tDPAA2_PMD_ERR(\n-\t\t\t\t\t\t\"RSS RXQ number exceeds the total number\");\n-\t\t\t\t\treturn -ENOTSUP;\n-\t\t\t\t}\n-\t\t\t\trxq = priv->rx_vq[rss_conf->queue[i]];\n-\t\t\t\tif (rxq->tc_index != attr->group) {\n-\t\t\t\t\tDPAA2_PMD_ERR(\n-\t\t\t\t\t\t\"RSS RXQ distributed is not in current group\");\n-\t\t\t\t\treturn -ENOTSUP;\n-\t\t\t\t}\n-\t\t\t}\n \n \t\t\tflow->action = RTE_FLOW_ACTION_TYPE_RSS;\n \t\t\tret = dpaa2_distset_to_dpkg_profile_cfg(rss_conf->types,\n",
    "prefixes": [
        "v2",
        "25/29"
    ]
}