get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66626,
    "url": "http://patches.dpdk.org/api/patches/66626/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200313020806.21654-7-wei.zhao1@intel.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": "<20200313020806.21654-7-wei.zhao1@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200313020806.21654-7-wei.zhao1@intel.com",
    "date": "2020-03-13T02:08:05",
    "name": "[6/7] net/ice: add action number check for swicth",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8e7635e1e09a8c7a0d902db13f663f8b2bb7d849",
    "submitter": {
        "id": 495,
        "url": "http://patches.dpdk.org/api/people/495/?format=api",
        "name": "Zhao1, Wei",
        "email": "wei.zhao1@intel.com"
    },
    "delegate": {
        "id": 31221,
        "url": "http://patches.dpdk.org/api/users/31221/?format=api",
        "username": "yexl",
        "first_name": "xiaolong",
        "last_name": "ye",
        "email": "xiaolong.ye@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200313020806.21654-7-wei.zhao1@intel.com/mbox/",
    "series": [
        {
            "id": 8900,
            "url": "http://patches.dpdk.org/api/series/8900/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8900",
            "date": "2020-03-13T02:07:59",
            "name": "add switch filter support for intel DCF",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8900/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/66626/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/66626/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 01417A0567;\n\tFri, 13 Mar 2020 03:29:49 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 7535E1C0B5;\n\tFri, 13 Mar 2020 03:28:55 +0100 (CET)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by dpdk.org (Postfix) with ESMTP id A2FDE1C00E;\n Fri, 13 Mar 2020 03:28:51 +0100 (CET)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 12 Mar 2020 19:28:51 -0700",
            "from unknown (HELO localhost.localdomain.bj.intel.com)\n ([172.16.182.123])\n by fmsmga004.fm.intel.com with ESMTP; 12 Mar 2020 19:28:49 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.70,546,1574150400\"; d=\"scan'208\";a=\"266587201\"",
        "From": "Wei Zhao <wei.zhao1@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qi.z.zhang@intel.com, xiaolong.ye@intel.com, stable@dpdk.org,\n Wei Zhao <wei.zhao1@intel.com>",
        "Date": "Fri, 13 Mar 2020 10:08:05 +0800",
        "Message-Id": "<20200313020806.21654-7-wei.zhao1@intel.com>",
        "X-Mailer": "git-send-email 2.19.1",
        "In-Reply-To": "<20200313020806.21654-1-wei.zhao1@intel.com>",
        "References": "<20200313020806.21654-1-wei.zhao1@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 6/7] net/ice: add action number check for swicth",
        "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": "The action number can only be one for DCF or PF\nswitch filter, not support large action.\n\nCc: stable@dpdk.org\nFixes: 47d460d63233 (\"net/ice: rework switch filter\")\n\nSigned-off-by: Wei Zhao <wei.zhao1@intel.com>\n---\n drivers/net/ice/ice_switch_filter.c | 48 +++++++++++++++++++++++++++++\n 1 file changed, 48 insertions(+)",
    "diff": "diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c\nindex 7ca922602..48d689deb 100644\n--- a/drivers/net/ice/ice_switch_filter.c\n+++ b/drivers/net/ice/ice_switch_filter.c\n@@ -1079,6 +1079,46 @@ ice_switch_parse_action(struct ice_pf *pf,\n \treturn -rte_errno;\n }\n \n+static int\n+ice_switch_check_action(const struct rte_flow_action *actions,\n+\t\t\t    struct rte_flow_error *error)\n+{\n+\tconst struct rte_flow_action *action;\n+\tenum rte_flow_action_type action_type;\n+\tuint16_t actions_num = 0;\n+\n+\tfor (action = actions; action->type !=\n+\t\t\t\tRTE_FLOW_ACTION_TYPE_END; action++) {\n+\t\taction_type = action->type;\n+\t\tswitch (action_type) {\n+\t\tcase RTE_FLOW_ACTION_TYPE_VF:\n+\t\tcase RTE_FLOW_ACTION_TYPE_RSS:\n+\t\tcase RTE_FLOW_ACTION_TYPE_QUEUE:\n+\t\tcase RTE_FLOW_ACTION_TYPE_DROP:\n+\t\t\tactions_num++;\n+\t\t\tbreak;\n+\t\tcase RTE_FLOW_ACTION_TYPE_VOID:\n+\t\t\tcontinue;\n+\t\tdefault:\n+\t\t\trte_flow_error_set(error,\n+\t\t\t\t\t   EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,\n+\t\t\t\t\t   actions,\n+\t\t\t\t\t   \"Invalid action type\");\n+\t\t\treturn -rte_errno;\n+\t\t}\n+\t}\n+\n+\tif (actions_num > 1) {\n+\t\trte_flow_error_set(error,\n+\t\t\t\t   EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,\n+\t\t\t\t   actions,\n+\t\t\t\t   \"Invalid action number\");\n+\t\treturn -rte_errno;\n+\t}\n+\n+\treturn 0;\n+}\n+\n static int\n ice_switch_parse_pattern_action(struct ice_adapter *ad,\n \t\tstruct ice_pattern_match_item *array,\n@@ -1164,6 +1204,14 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,\n \t\tgoto error;\n \t}\n \n+\tret = ice_switch_check_action(actions, error);\n+\tif (ret) {\n+\t\trte_flow_error_set(error, EINVAL,\n+\t\t\t\t   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,\n+\t\t\t\t   \"Invalid input action number\");\n+\t\tgoto error;\n+\t}\n+\n \tif (ad->hw.dcf_enabled)\n \t\tret = ice_switch_parse_dcf_action(actions, error, &rule_info);\n \telse\n",
    "prefixes": [
        "6/7"
    ]
}